my dog learned polymorphism
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Statelesss Session Bean Vs Java class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Reply locked New topic

Statelesss Session Bean Vs Java class

Srivastava Praveen

Joined: Aug 14, 2007
Posts: 14
I am preparing for SCEA-Part II. In one scenario, I have sesion facade which is stateless session bean. Now I want to call another class from session facade to do the rest of task. What type of class should I create to help session facade and code rest of business logic. Should I go for statelss session bean or simple java class to code business logic? Please suggest.

Sub swamy
Ranch Hand

Joined: Oct 02, 2002
Posts: 121
I too have a similar question. Is there any advantage in having the business logic in POJO classes - does(or doesn't) that make the application light weight and hence perform and scale better ? Is (or isn't) it a good practice to reduce the number of EJBs?

Also, wont usage of POJO classes minimize the EJB-EJB call, yet give us the container capabilities that come with the usage of EJBs?
badari gururaj
Ranch Hand

Joined: Feb 25, 2002
Posts: 63
A few questions...this might help you decide what to do...

what are the benifits of having an EJB behind the facade layer?

Do you want to handle any transcations and security in this EJB or will you do it from facade layer?

Can you isolate your business logic into a POJO and use it as a statless service being called from the facade layer?

Is the information propagating out of POJO into another layer (Database, EIS etc)? Can this propagation be handled from the POJO in a statless manner (You mentioned you want this layer to handle information in a stateless manner?)


Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11776

Welcome to JavaRanch.

As specified in the JavaRanch SCEA FAQ:
  • What is the policy on posting questions I saw on the exam / details of how to do the assignment?

  • You may not describe or talk about the questions you saw on any of the Sun exams - see the JavaRanch Policy on Real Questions for further details. (

    For questions / discussions on the assignment, in general we will allow discussion where members are trying to understand the domain model and/or terms used in the assignment. We will also allow questions about which tools to use.

    But we will not allow discussion on a solution to the assignment (or a part of the assignment) itself.

    Refer to the thread IMPORTANT - Position on real assignment (Part 2) questions for more information.

    Normally I would remove this question, however Badari has provided generic questions that may help you in finding an answer. So I am leaving your question and his answer, but closing this topic.

    Regards, Andrew

    The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
    I agree. Here's the link:
    subject: Statelesss Session Bean Vs Java class
    It's not a secret anymore!