?
Solved

Folder Structure for J2EE applications

Posted on 2005-03-04
6
Medium Priority
?
22,725 Views
Last Modified: 2013-12-10
Hi,
I am new to websphere and I am not very sure about how the ear file is deployed on this server. From what I understand on J2EE, the ear file structure is supposed to be like this:
Ear
   -- WAR
   --JAR(EJB)
   --META-INF
               --application.xml

My War structure is like this:
 applicationName
        --JSP
       --image
       -- other folders like scripts, styles, tiles(i am working on a struts application)
       --WEB-INF
                 -- struts-config.xml
                 --web.xml
                 --classes
                          --application pacakage
                          --applicationresources.properties
                 --tld
                       --Contains the struts tld.
               
I have been working on Iplanet app server and in this server it is possible to include the ejb files in the ear file and the stub and skeletal classes are generated on deployment.
However, I am not sure about how the ejb folder structure should be in the ejb jar file in websphere.

what are the various classs files that are supposed to be in this jar(bean, remote,etc) and how does the websphere application server generate the stubs and skeletal classes for the ejb. Does it generate on deployment or we have to generate is before deployment, package the generated class files in a jar file for the ejb.

Basically I would like to know the what the entire folder structure of a EAR file should be and its sub components and their folder structure. How are the ejb's compiled, the entire deployment process. I am totally lost as of now and if any one could help me, I would be grateful to that person.
Thanks in advance.
Sumit
0
Comment
Question by:SumitSinghRawat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 7

Expert Comment

by:damonf
ID: 13460804
EAR project:

>META-INF
  >application.xml

EJB project:
>ejbModule
 >META-INF
   >ejbJar.xml
   >MANIFEST.MF
 >com
   >youcompany
     >...

web project:
>WebContent
  >any files and folders you want
  >META-INF
    >MANIFEST.MF
  >WEB-INF
    >web.xml
    >any tlds
    >lib
      >any jars
    >classes
      >your packages

0
 
LVL 7

Accepted Solution

by:
damonf earned 1000 total points
ID: 13460855
I think what you want to do is use the Application Assembly Toolkit (AAT), now known as WAS Assembly Toolkit.  You will assemble and EAR project, an EJB project, and a web project.  The web and EJB projects will be children of the EAR project.  Then you install the EAR on your server using the admin console.  The "wizard" that installs your app has a checkbox "deploy EJBs".  Check that, and it will generate the stubs and ties for you.  I think in the toolkit you can also generate stubs and ties before you build the EAR, in which case you won't need to redeploy when you actually install the EAR.

If you use WSAD, just run "generate deploy and RMIC code" and then build your EAR file.  Then you can just install it on the server.
0
 

Author Comment

by:SumitSinghRawat
ID: 13461080
Hi,
Thanks for the folder structure, you are absolutely right on using the AAt but I have a trial version of WAS 5.1 and it does not have the AAT and I have tried getting hold of it but I have not been successful :(. Infact I spent the last 4 days hunting for it but it is not available and I got hold of one from the IBM site but the installer launches and then disappears, it does not proceed further.
Just of confirmation ,my understanding is, build the ear file(I am currently using the jar utility to generate the ear file), with the WAR and EJB jar inside the ear file and the folder structure of the EJB is clear to me (very similar to what it should be for weblogic ), and when I deploy the EAR file, the admin console of the server will generate the stubs and ties for me.
Correct me if I am wrong.
However if I get hold of the AAT then I dont have to do that also, the AAT will generate the stubs and ties for me. To be honest, I dont have any tools with me right now, I am doing this by manually writing and compiling things. The only tool that I have is eclipse, I know it is tough but I have to live and work with this till I get hold of the tools.
Is there any other thing that I need to consider while deploying the EAR file.
Thanks,
Sumit
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 7

Expert Comment

by:damonf
ID: 13461606
the process you describe sounds right to me.  Good luck.
0
 
LVL 1

Expert Comment

by:aprasadh
ID: 13546509
If you have J2EE sdk 1.3 (WAS 5.1 supports J2EE 1.3), it includes a Application Assembly tool called "deploytool.bat" in bin folder. Its a gui tool, it helps you to create application bundle ranging from JAR, WAR and EAR. I believe it won't create any stub code. I think its the task of application server. Let you create the EAR file and leave the rest to the J2EE app server.
0
 
LVL 1

Expert Comment

by:stevenrobinson
ID: 21817142
I personally recomment using ANT to create a build script which build your EAR. this way you can have different build scripts which create versions of your JARS, WARs and EAR as required for different scenarios. If you require examples, I will have to create one. Let me know and provide. This is the correct Enterprise way of doing things as it can also be augmented into auto deployment processes common in Enterprise level deployments. Learn to do this properly now, will pay dividends later.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question