Differnce between Java Bean and Enterprise Java Bean

M

Markku Salminen

I am a new user of Java. Please ans the followings. I would really
appriciate.

1. Is there any difference between Java Bean and Enterprise Java Bean(EJB),
if so, what is/are those?

They are totally different. Bean is just a class with private
attributes handled with get and set methods. EJB's are
server components.
2. As a programmer point of view, is there any difference between tomcat and
WebSphere or JBoss?

It depends what are you doing? If you want to learn how to develope
the enterprise applications then JBoss is good choise. WebSphere is
commercial product.
 
Z

Zee

Hi All

I am a new user of Java. Please ans the followings. I would really
appriciate.

1. Is there any difference between Java Bean and Enterprise Java Bean(EJB),
if so, what is/are those?
2. As a programmer point of view, is there any difference between tomcat and
WebSphere or JBoss?

Thanks in advance

zee
 
T

Tom Cole

Markku Salminen said:
They are totally different. Bean is just a class with private
attributes handled with get and set methods. EJB's are
server components.

No correlation at all. Enterprise Java Bean was probably not the best name
for those, seeing the JavaBean came first...
It depends what are you doing? If you want to learn how to develope
the enterprise applications then JBoss is good choise. WebSphere is
commercial product.

Tomcat is a Servlet container. It serves Servlets and JSP content. It does
not server EJBs.

JBoss is an application server, it serves EJBs. It does not serve Servlets
or JSPs. (At least I don't believe it does. Never tried it. They provide a
pre-wired version with Tomcat or Jetty as the servlet container).

The typical web application environment would utilize both Tomcat (or Jetty
or other Servlet container) and JBoss (or JoNaS, or Enhydra or other
application server) as well as an http server like Apache or IIS, each piece
doing it's thing: Apache/IIS --> static content; Tomcat --> Servlets & JSP;
JBoss --> EJBs.
 
M

Michael Borgwardt

Markku said:
They are totally different. Bean is just a class with private
attributes handled with get and set methods.

I think the specification also requires a public no-args constructor and
that the class should be serializable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top