WAR and EJB-JAR in Seperated Server

S

steven

Hi, group

In the sample of Sun's J2EE 1.3 tutorial, WAR and EJB-JAR are combined
into an EAR and deployed. For some reasons, however, I have to deploy
the EJBs part of a application into Sun's J2EE RI while deploy the
WARs part of the same application into another server such as TomCat.
Of course, the classes in WARs need to communicate with EJBs in J2EE
RI.

My questions are,

1, Is it possible to deployee only EJBs onto the J2EE RI? In this
case, what file form I need to creat, a EJB-JAR or a EAR in which an
EJB-JAR is hold?

2, Should I write a two seperated runtime descriptor, one of which in
the WAR, another of which in the EJB-JAR?

Thanks in advance.
 
D

Dobromir Gaydarov

steven said:
Hi, group

In the sample of Sun's J2EE 1.3 tutorial, WAR and EJB-JAR are combined
into an EAR and deployed. For some reasons, however, I have to deploy
the EJBs part of a application into Sun's J2EE RI while deploy the
WARs part of the same application into another server such as TomCat.
Of course, the classes in WARs need to communicate with EJBs in J2EE
RI.

My questions are,

1, Is it possible to deployee only EJBs onto the J2EE RI? In this
case, what file form I need to creat, a EJB-JAR or a EAR in which an
EJB-JAR is hold?
EAR

2, Should I write a two seperated runtime descriptor, one of which in
the WAR, another of which in the EJB-JAR?

Deployment descriptor you mean?
You already have web.xml for the WAR file and ejb-jar.xml for the EJB,
and you will need 2 application.xml files, one for the EAR containing the
WAR, another for the EAR containing the EJB.

Most of the servers will allow you to deploy WAR or EJB without being inside
EAR, although I believe this is against the spec.
To compesate for the missing application.xml they will force you to add some
server specific deployment descriptor to the WAR or EJB.
Just for example if you deploy a WAR file by itself there is no standard way
to specify context root - it normally comes from the application.xml.

Regards,
Dobromir
 
S

steven

Thank you!

Dobromir Gaydarov said:
Deployment descriptor you mean?
You already have web.xml for the WAR file and ejb-jar.xml for the EJB,
and you will need 2 application.xml files, one for the EAR containing the
WAR, another for the EAR containing the EJB.

Most of the servers will allow you to deploy WAR or EJB without being inside
EAR, although I believe this is against the spec.
To compesate for the missing application.xml they will force you to add some
server specific deployment descriptor to the WAR or EJB.
Just for example if you deploy a WAR file by itself there is no standard way
to specify context root - it normally comes from the application.xml.

Regards,
Dobromir
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top