How can I deploy J2EE application (with EJB) to Websphere 5.1

I am not sure if this question has been already posted, but I tried to search the forum and found no answer yet.

I am currently using ANT build tool to deploy my EAR file into Websphere.

The following is the contents of my EAR file created by ANT.
- miscellaneous jar files like struts.jar, etc.
- EJB.jar (contains stubs and skeletons)
- WEB.war (contains JSP files, struts action classes, struts form classes, etc.)
- dao.jar (contains entity persisters, dao managers, etc.)

The following is the structure of my development environment.

-myproj\src\com...\web
-myproj\src\com...\ejb

-myproj\war
-myproj\war\WEB-INF

-dao\src\.....

I tried using IntelliJ ver 7.0.1 but I don't know how to create project/modules that will enable me to deploy the way I deploy using ANT build tool.

I tried revising my project structure into the following to create separate modules:

WEB MODULE(Web Facet)
-myproj\web\src\com...\web
-myproj\web\war
-myproj\web\war\WEB-INF

EJB MODULE (EJB Facet)
-myproj\ejb\src\...\ejb

JAVA MODULE
-dao\src\.....

I have also added EE Facet to include the above facet to deployment.

Problems:
1) When EAR file is created, dao.jar was not included.
2) When EJB.jar is created, it just put all the classes into jar and not created the stubs and skeletons of EJB.

Is my project structure correct?
Could someone tell me how to do it or direct me to an instruction manual on how to do it?
I want to use the Webpshere debugging feature of Intellij.

Thank you very much to all!

2 comments

Hi Nick,

The structure looks ok I would say. A few settings you might wanna check are

1) is the ejb-jar.xml linked in EJB Facet | EJB Settings tab ?
- and is the dependency to your dao present and the correct packaging method set?
2) maybe check : EJB Facet | EJB Settings tab | 'source root for EJB classes' (at the bottom)

HTH, Ruben

0

Thank you very much for the insight!

I will try and will inform you the result.

0

Please sign in to leave a comment.