Results 1 to 4 of 4
  1. #1
    alok_sharma is offline Member
    Join Date
    Aug 2010
    Posts
    11
    Rep Power
    0

    Question Need guidelines on creating LAN enabled J2SE Application With DB

    hi i have worked in VB/C# where i created LAN enabled applications like apps for record handling and MIS/ERP solution type, now i have switched to java so i want to know a few queries as:

    1. Do we have to go JSP/EJB for LAN applications or i can make them in core Java too.

    2.if,its possible to create application like that in core java ,what kind of classes/packages i need for them(other then java.net) and 3rd party api's for simple working?

    3. how can such application be going to interact with each other or do i need threads (thread executions) to make it understand about every process going between diiferent client and one server?

    4. Is it not possible to achieve such facility with DB connection call with diff server ip/port instead of making the app to listen for its server and then work ?

    5.in Above,, which one will going to be smooth in between them?

    i know its too much in one go but if someone can look into this topic, please answer even one question which you like.

    ____________

    Thanks and Regards

    Alok Sharma

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    1. Yes, you can create a custom Java application that boots up outside of a container like a JSP or EJB container. I usually find it is convenient to package my applications as a web application (.war) file and stuff it into something like tomcat, so that I can get the application start up as a windows service done for me by tomcat. Also, later on when I do want to create some web page user interfaces for administration or logging, it is straight forward to add jsp pages to my existing application, everything is already there in the module.

    2) the third party api that might come in handy might be something like the 'spring framework' (an inversion of control and general framework for assembling components), 'hibernate' ( an object relational mapping api), 'quartz' (a job scheduling framework). There is really everything imaginable under the sun. and often several open source projects that try to do the same kind of feature, so you need to spend some time learing what each has to offer and what everyone else is using and recommends, and what is best for your current uses.

    3) Related to #2, a good way to interact from client to server communications is likely to use some kind of XML based remote procedure call mechanism, e.g. Web services. The standard of the day seems to be that "SOAP" web services. There are a lot of specifications and a lot of implementations to choose from. I found a good one to get into is "Apache CXF". It provides a server and client side toolkit to produce and consume web services. The motivation of using SOAP being, it is likely possible in theory anyway to create a dot net server and have a java client interact with it, or to have a dot net client interact with a Java based server side application. or to have a Java based server application interact with a different dot net server side application. Typically the model here, because the SOAP is over HTTP, is the messaging is a stateless kind of request/response mechanism, where the client invokes requests to a listening server side thread pool handler service. Again, web service toolkits like Apache CXF or Apache Axis(2) take care of this details for you, you just need to write your service implementation.

    4). not sure i understand the question. But likely it should be possible to create an application that listens for requests such as thru a SOAP interface and invokes operations onto a database using hibernate, or ibatis, or jdbc operations. and to have this run concurrently beside the existing server application, listening on a different ip, port, or installed into a different application context (path within the url to the site, e.g. tomcat connected to apache using mod_jk)

  3. #3
    alok_sharma is offline Member
    Join Date
    Aug 2010
    Posts
    11
    Rep Power
    0

    Default Thanks a lot

    @travishein

    Thanks for your time and answers ,it is much clear to me now.

    by the 4. point i meant about the jdbcodbc database connection string where we pass host ip and port no. what will happen if i go and pass there server ip and port(like e.g. connectordriver/localhost : port/username/pass so i will going to pass here the serverip instead of localhost) for client apps will they work the same way or will it creates complications.

    Regards
    Alok sharma

  4. #4
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    I'm not sure about the jdbc/odbc driver, that might require the client be on the same machine as the odbc data source it is exposing, unless the odbc source is exposed over a network somehow, I am not familiar with that very much.

    Generally using JDBC works just as well over a network as locally. The only considerations are to expect slightly less performance due to network latency and the speed of which large amounts of data can be transferred, usually limited by the end user's network connection, e.g. slow DSL link. And more importantly, you would need to consider a security mechanism, such as firewall restricting remote access by IP address to prevent just anyone from attaching to your database port.

Similar Threads

  1. class not enabled error ?????
    By koxy in forum Advanced Java
    Replies: 2
    Last Post: 04-02-2010, 03:58 PM
  2. How to set enabled my JButton...?
    By mlibot in forum New To Java
    Replies: 3
    Last Post: 10-13-2009, 12:24 PM
  3. how to enabled, disabled radio buttons
    By mlibot in forum NetBeans
    Replies: 9
    Last Post: 09-25-2009, 08:45 AM
  4. Guidelines
    By Implode in forum New To Java
    Replies: 4
    Last Post: 09-12-2009, 04:37 PM
  5. Java J2SE Bluetooth Application
    By mark305 in forum New To Java
    Replies: 1
    Last Post: 02-23-2009, 10:02 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •