aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes �Rich Client + EJB� Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "�Rich Client + EJB�" Watch "�Rich Client + EJB�" New topic
Author

�Rich Client + EJB�

jose maria
Greenhorn

Joined: Jan 29, 2002
Posts: 5
I'm developing a web EJB app. whose client is a web browser but in the next version a java rich client GUI will be used and will communicate with server through http with xml. In client GUI I'll use some classes encapsulated in EJB but I can't use EJB directly.
How can I mantain a single class definition usable from EJB and GUI client java class?
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Originally posted by jose maria:

How can I mantain a single class definition usable from EJB and GUI client java class?

I think you mentioned web and gui client, isn�t it?
Well you should build a class using the Service Locator pattern accessed by classes that implement the command pattern and then you�ll be able to use the same classes for web and gui clients.
There�s a good descriptions of this patterns on the book Core J2EE Patterns and I suggest you to by it if you�re building applications using J2EE.
Next I�ll post code for a Service Locator class.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

One thing to watch out for, though - EJB's aren't easy to access directly from Internet clients. They use TCP/IP ports that are often firewalled.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: �Rich Client + EJB�