You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Thomas Lindback <th...@yahoo.com> on 2006/07/19 02:44:29 UTC

Use of additional jar files from ejb's

Hello.
I am using geronimo 1.1 and I have a few jar files (5
or 6) I'd like to use from ejb's in a ejb-jar file.
What is the best way to package them, preferable
together, so I can access them from the beans. I did
some initial tries to pack the jars into the ejb-jar
file and set the Class-Path in the Manifes but the
classes in the extra jars was not found. Anyone have
any idea how to do or any pointer to some
documentation.

Thanks in advance
Thomas

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Use of additional jar files from ejb's

Posted by Thomas Lindback <th...@yahoo.com>.
Hello Mario.

Thanks for your suggestion. Works great. Did not think
about package everything in a ear file. I have mostly
been working with ejb-jar files and standalone
clients.

Thomas

--- Mario Ruebsam <ma...@googlemail.com>
wrote:

> Hi Thomas,
> 
> you could package your ejb-jar file along with the
> other
> jars into one ear archive and the set the Class-Path
> entry in the ejb-jars manifest.
> 
> myapp.ear/
>            ejb-jar.jar
>            one.jar
>            two.jar
> 
> you have to add an application.xml to the META-INF
> dir
> of the ear referencing you ejb-jar as an module.
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <application xmlns="http://java.sun.com/xml/ns/j2ee"
>              
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>              
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>                
> http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
>               version="1.4">
> 
>    <display-name>MyApp</display-name>
> 
>    <module>
>      <ejb>ejb-jar.jar</ejb>
>    </module>
> </application>
> 
> 
> Thanks,
> Mario
> 
> Thomas Lindback wrote:
> > Hello.
> > I am using geronimo 1.1 and I have a few jar files
> (5
> > or 6) I'd like to use from ejb's in a ejb-jar
> file.
> > What is the best way to package them, preferable
> > together, so I can access them from the beans. I
> did
> > some initial tries to pack the jars into the
> ejb-jar
> > file and set the Class-Path in the Manifes but the
> > classes in the extra jars was not found. Anyone
> have
> > any idea how to do or any pointer to some
> > documentation.
> > 
> > Thanks in advance
> > Thomas
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Use of additional jar files from ejb's

Posted by Mario Ruebsam <ma...@googlemail.com>.
Hi Thomas,

you could package your ejb-jar file along with the other
jars into one ear archive and the set the Class-Path
entry in the ejb-jars manifest.

myapp.ear/
           ejb-jar.jar
           one.jar
           two.jar

you have to add an application.xml to the META-INF dir
of the ear referencing you ejb-jar as an module.

<?xml version="1.0" encoding="ISO-8859-1"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
              version="1.4">

   <display-name>MyApp</display-name>

   <module>
     <ejb>ejb-jar.jar</ejb>
   </module>
</application>


Thanks,
Mario

Thomas Lindback wrote:
> Hello.
> I am using geronimo 1.1 and I have a few jar files (5
> or 6) I'd like to use from ejb's in a ejb-jar file.
> What is the best way to package them, preferable
> together, so I can access them from the beans. I did
> some initial tries to pack the jars into the ejb-jar
> file and set the Class-Path in the Manifes but the
> classes in the extra jars was not found. Anyone have
> any idea how to do or any pointer to some
> documentation.
> 
> Thanks in advance
> Thomas
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>