Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Accessing WebService within session facade, or another SLSB

 
Ranch Hand
Posts: 528
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Marcelo Ortega
Ranch Hand
Posts: 528
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My thoughts exactly! Thanks Nilessh. Just need that extra bit of confirmation.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic