This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hello everyone I am new to swing component, i ve some question to ask. I am developing and a reporting tool for some compnay but they want to be done by using java swing, but the company have some office in other countries. My question is that how can java swing application communicate with the database in usa, because it is not the web application.
Can i use EJB architecture is that use full for secure transaction and it is compatible with swing.
I heard about java start web but dont know about much ....
Java webstart has nothing to do with the communication that you are going to need between client and server. Webstart is an application distribution mechanism. Using Java Webstart you can put your application on a webserver and it will be downloaded when a user requests it.
Swing and EJB can work together perfectly. There is a problem however. EJB uses RMI and RMI uses different TCP/IP ports to communicate between client and server. EJB/RMI will be blocked by firewalls. It is OK for an Intranet application but not for an internet application.
You can use webservices (eg. Apache Axis) to communicate between your Swing application and your server. This can be done using HTTPS (so it's secure).
You might look at some of the HTTP remoting options. Take a look at the various options that Spring provides. Once you plug those in communications is only another layer in your client server app. You can worry about the Swing client and the EJB server components without concering yourself with how objects are moved from point A to B. The only thing that you do have to think about however is that your objects are detached from your server side session. This means you have to worry about keeping various client sessions in synch.
If you just want to securely connect to a remote database, using EJBs would be way overkill.
In fact, you can already connect a remote DB using plain JDBC. Now you only need to take care that it happens over a secured route - voila!
For details, you should probably start a new thread in the JDBC forum.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Apr 18, 2005
thanks for replies, but i m getting confuse wht should i do now b/c it is my first job. Some of dont recommend me eJB, some recommend web service and simple jdbc. Any good suggestion please and thanks for promt answer. You guys are much experienced than me
Joined: Jul 11, 2001
The general advice would be to start with the simplest solution and see if you can possibly get it to work. In my not so humble opinion, that would be JDBC. Both webservices and EJBs just add complexity on top of that you probably don't need.
Joined: Apr 18, 2005
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com