File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling Web Service from JSF Managed Bean v/s Session Bean

 
Rajan Choudhary
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Can anybody please share Pros/cons (In an EJB centric application) of calling an intranet, light & synchronous web service from web tier v/s stateless session bean?

I can start with my understanding: putting web service call in SLB would help in scaling the solution whereas calling from web tier is handy and saves the trip to business logic tier in some cases so I would prefer to call from web tier specially when performance is the key.
What if performance and scalability both are keys?

2) Same question for putting the messages on JMS Queues/Topics: from web tier or SLB. I would do it directly from web tier and process the messages in EJB tier.

Please contribute.
 
Rajan Choudhary
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody to share the thoughts?
 
giuseppe fanuzzi
Ranch Hand
Posts: 99
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Rajan,
i think that adding an additional layer, like EJB, for read-only web service data, if there are no strong messaging, security and transactional requirements, could be uselessly weighty.
in this scenario not using EJB:
- it not affects the scalability (data are not stored in session, right?)
- it affects very the performance (calling web service directly from JSF or servlet)
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree that unless there are transactional or security requirements that warrant use of EJB, using them would actually will add to performance overhead.

Just to maintain seperation of concerns i feel that you can have a POJO based service layer & web service can be called by the service layer.
 
Sharma Ashutosh
Bartender
Posts: 346
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start thinking this way:
1) Is the BDM is good enough or you want to make slight modifications into it?
2) Once the step # 1 is done design Service Facade and Service layer.

From step # 2, decide whether your Service Facade/Service makes a call to DAO(to do CRUD operations) or talks to another interface(via client it could be WS client or RMI client or anything else).

I took this approach and within 2 weeks i had a very high level SuD in front of me(Class diagram and Component diagram) which i worked further and completed the assignment.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic