aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Keeping EJB as Client ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Keeping EJB as Client ?" Watch "Keeping EJB as Client ?" New topic
Author

Keeping EJB as Client ?

vikasids sharma
Ranch Hand

Joined: Aug 01, 2003
Posts: 157
hi all
My ejb client calls for a session bean. Now i want this session bean to call some entity bean which resides at different application server.
Please let me know which out of two options is better and why?
1. I make this session bean as client for entity bean existing at diiferent server and calls it using JNDI.
2. I make a call to session bean and on the basis of what it returns makes call to another session bean(this session bean further calls entity bean)existing at different application server from same client code.
thanks
Vikas


Thanks
Vikas Sharma
SCJP(1.4)
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I'd vote for option 1.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Definitely go with number 1. The client shouldn't need to know all the gory details...
Naveen Sharma
Ranch Hand

Joined: Mar 23, 2001
Posts: 65
Go with a clean approach ... No. 1
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Keeping EJB as Client ?