Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

�Rich Client + EJB�

 
jose maria
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic