aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EAR module structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EAR module structure" Watch "EAR module structure" New topic
Author

EAR module structure

Denis Zjukow
Ranch Hand

Joined: Mar 15, 2006
Posts: 39
Hello,

I use EJB 3 with JSF 1.2 in my application and run it under GlassFish (Sun Java System Application Server Platform Edition 9.0_01 (build b14)).

I pack the code into an EAR file with the following structure:

app-ear.ear:
META-INF /
application.xml
MANIFEST.MF

app-ejb.jar /
my.ejb.classes /
CommandBean.class
Command.class
Util.class
META-INF /
MANIFEST.MF
persistence.xml

app-war.war /
WEB-INF /
classes /
my.war.classes /
MyServlet.class
web.xml
faces-config.xml

My questions are:

- is it correct to use Util.class, which resides in the EJB module, from MyServlet, which is part of WAR module?

- is EJB module a right place for Util.class (it is not an EJB component!) taking into account that it should be used in both modules EJB as well as WAR.

The problems is that I have an exception during deployment. But what is the most interesting it is the fact that I didn't have this problem until I started using JSF. I've just added faces-config.xml and registered FacesServlet in web.xml. That's it. After doing that I have this deployment problem.

I also want to notice that the code worked before I put 'JSF nature' in it. That makes me think this is not a configuration problem.

Can anyone comment this, please. Thank you.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9318
    
109

I usually place the Util.class in a common-util.jar and make it available to both the EJB module and the war module by mentioning it as a java module in the application.xml. More details can be found here


[My Blog] [JavaRanch Journal]
Denis Zjukow
Ranch Hand

Joined: Mar 15, 2006
Posts: 39
Thanks Jaikiran!

I've read your blog. That was exactly what I wanted to know! Thank you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EAR module structure
 
Similar Threads
Deploy Descriptors?
deploying session bean on jboss
JBOSS 6 Deploy Failed
Global JNDI access with EJB 3.1 and JBoss 6
Hot Deploy with Weblogic 8.1