wood burning stoves 2.0*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Accessing WebService within session facade, or another SLSB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Accessing WebService within session facade, or another SLSB" Watch "Accessing WebService within session facade, or another SLSB" New topic
Author

Accessing WebService within session facade, or another SLSB

Marcelo Ortega
Ranch Hand

Joined: May 31, 2005
Posts: 519

I have a session facade implemented as a Stateless session bean (with Local interface).
The session facde is centralizing security and transaction management, plus some minor business logic.
It has an EntityManager which it uses for persisting / retrieving JPA Entities

My question is, given all of the responsibilities of the above session facade, should we use the same
to access a webservice (using @WebServiceRef), or should we delegate this access to another stateless session bean?
I don't want to add additional overhead by adding more EJB types - but at the same time I want a scalable approach to accessing
the webservice. If we leave the WebService access to the session facade, it may get a bit cluttered and / or lose focus.

Any views on this?


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA

Live life to an interface, not an implementation!
Nilessh Ganu
Ranch Hand

Joined: Dec 22, 2009
Posts: 100
Marcelo Ortega wrote:I have a session facade implemented as a Stateless session bean (with Local interface).
The session facde is centralizing security and transaction management, plus some minor business logic.
It has an EntityManager which it uses for persisting / retrieving JPA Entities

My question is, given all of the responsibilities of the above session facade, should we use the same
to access a webservice (using @WebServiceRef), or should we delegate this access to another stateless session bean?
I don't want to add additional overhead by adding more EJB types - but at the same time I want a scalable approach to accessing
the webservice. If we leave the WebService access to the session facade, it may get a bit cluttered and / or lose focus.

Any views on this?


In my opinion, better to move out the @WebServiceRef to another SLSB as it's sole purpose would be to act as a WS client.
Also it will improve the scalability.


Nilesh
SCJP SCWCD OCMJEA
Marcelo Ortega
Ranch Hand

Joined: May 31, 2005
Posts: 519

My thoughts exactly! Thanks Nilessh. Just need that extra bit of confirmation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing WebService within session facade, or another SLSB
 
Similar Threads
Session facade
Statelesss Session Bean Vs Java class
Business Delegate/Session Facade Question
Use of Stateful Session Bean for Shopping Cart
Session Facade implementation