• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Interaction b/w Managed Bean and Web Service

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the managed bean need to get some data or update some data by calling the web service, then which would be best way
1. Managed bean --> Business Delegate --> Service Locator --> Stateless session bean(Session Facade)--> Calling the Web Service
2. Managed Bean--> Business Delegate (Assuming Server Side Component )--> Calling the Web Service

Which would be best Approach?

Hope some can answer my question

Thanks,
-Medha
 
Ranch Hand
Posts: 45
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Managed bean --> Business Delegate --> Service Locator --> Stateless session bean(Session Facade)--> Calling the Web Service



I assume BD is a POJO here. The Stateless session bean that invokes the web service looks more like a DAO to me. Does it hold any other business logic as well?. I assume not(Assumption 1).

Managed Bean--> Business Delegate (Assuming Server Side Component )--> Calling the Web Service



I assume here that BD is a stateless session bean(Assumption 2).

(At the risk of oversimplifying,)If both my above assumptions are true, the choice is between using service locator(your Option 1) or dependency injection(your Option 2).

You have to choose one or the other. This article is a good read.

-SP
 
s patnaik
Ranch Hand
Posts: 45
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey here is a discussion on the same topic -

https://coderanch.com/t/518596/java-Architect-SCEA/certification/Business-Delegate-Stateless-Session-Bean

Is there a topic that is not discussed on this forum !
 
Medha Polishetty
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

s patnaik wrote:

Managed bean --> Business Delegate --> Service Locator --> Stateless session bean(Session Facade)--> Calling the Web Service

I assume BD is a POJO here. The Stateless session bean that invokes the web service looks more like a DAO to me. Does it hold any other business logic as well?. I assume not(Assumption 1)



If i Use the dependency Injection i could avoid the Service Locator b/w the Business Delegate and Stateless session bean . This was brining me one another question with the data which is coming from the Webservice if I'm not changing anything or if i dont have the business logic I'm just wondering do i still need to have the Session Bean? Or Can i simply have something like this

Managed bean --> Business Delegate -->Calling the Web Service , Here my business delegate acting like converting all the remote exception to application specific exceptions and caching the results. Is this is a good approach?



 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic