Results 1 to 4 of 4
- 10-09-2010, 01:44 PM #1Member
- Join Date
- Aug 2010
- Rep Power
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
- 10-10-2010, 02:55 AM #2
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)
- 10-10-2010, 02:02 PM #3Member
- Join Date
- Aug 2010
- Rep Power
Thanks a lot
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.
- 10-11-2010, 01:18 AM #4
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.
- By koxy in forum Advanced JavaReplies: 2Last Post: 04-02-2010, 02:58 PM
- By mlibot in forum New To JavaReplies: 3Last Post: 10-13-2009, 11:24 AM
- By mlibot in forum NetBeansReplies: 9Last Post: 09-25-2009, 07:45 AM
- By Implode in forum New To JavaReplies: 4Last Post: 09-12-2009, 03:37 PM
- By mark305 in forum New To JavaReplies: 1Last Post: 02-23-2009, 09:02 PM