users@glassfish.java.net

RE: Re: EJB Session Bean Deployment

From: Jason Lee <lee_at_iecokc.com>
Date: Wed, 25 Jan 2006 16:14:41 -0600

That's what I've been trying. Since I started this thread, I found this
guy's blog:

http://weblogs.java.net/blog/ss141213/archive/2005/12/using_java_pers.ht
ml

which says exactly what you said. When I deploy my ear, though, I still
don't see the session bean in the JNDI browser. If I run my client, it
fails to find the bean by any name I am expecting (based on my JBoss
testing) to find: com.iecokc.products.BrandNameProduct and
com.iecokc.products.IBrandNameProduct. If it'll help, I've attached the
server log.

Here's the layout of my ear:

/bnpr.jar
/lib/commons-collections-3.1.jar
/lib/commons-dbcp-1.2.1.jar
/lib/commons-pool-1.2.jar
/lib/concurrent-1.3.4.jar
/lib/dom4j-1.6.1.jar
/lib/jdom-1.0.jar
/lib/postgresql-8.0-311.jdbc3.jar
/lib/spring.jar
/lib/whirlycache-0.7.1.jar

bnpr.jar has the package hierarchy, and some properties files for the
bean in the root of the jar. I don't know what I'm doing wrong, as
everything looks right based on what I've been able to find. I have the
JEE 5 spec downloaded and am digging through that. We'll see if
anything turns up from that.

Thanks for your help.

--
Jason Lee
Programmer/Analyst
-----Original Message-----
From: Bill Shannon [mailto:bill.shannon_at_sun.com] 
Sent: Wednesday, January 25, 2006 3:48 PM
To: dev_at_glassfish.dev.java.net
Subject: Re: EJB Session Bean Deployment
In Java EE 5, your life will be much simpler if you don't bother with
the application.xml file.  Just create an ear file that contains
bnpr.jar, along with all the other jar files in a "lib"
subdirectory.  Nothing else, no application.xml, no special MANIFEST.MF
(just the one the jar tool creates for you by default).
Jason Lee wrote:
> I'm having some issues getting my EJB3 session bean to deploy on 
> Glassfish (nightly from 1/24).  I have created the .ear with the 
> session bean jar and the supporting jars.  in META-INF/, I have 
> MANIFEST.MF and application.xml, which looks like:
>  
> <?xml version="1.0" encoding="UTF-8"?> <application 
> xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://java.sun.com <http://java.sun.com/> 
> /xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
>     <display-name>BrandNameProductSessionBean</display-name>
>     <description>Brand Name Product Sesssion Bean</description>
>  
>     <module><ejb>bnpr.jar</ejb></module>
>     <module><java>commons-collections-3.1.jar</java></module>
>     <module><java>commons-dbcp-1.2.1.jar</java></module>
>     <module><java>commons-pool-1.2.jar</java></module>
>     <module><java>concurrent-1.3.4.jar</java></module>
>     <module><java>dom4j-1.6.1.jar</java></module>
>     <module><java>jdom-1.0.jar</java></module>
>     <module><java>postgresql-8.0-311.jdbc3.jar</java></module>
>     <module><java>spring.jar</java></module>
>     <module><java>whirlycache-0.7.1.jar</java></module>
> </application>
> Looking at the log files, it appears the GF successfully deploys the 
> ear (I can send the log file if that would help), but I'm not seeing 
> the bean show up in the JNDI browser.  Don't shoot me, but when I 
> deploy the same application under JBoss 4 (with the EJB jar renamed to
> .ejb3, as per JBoss requirements :| ), JBoss automagically adds 
> com.iecokc.products.IBrandNameProduct to JNDI, by which my (out of
> container) client can look up the bean.  No such luck under glassfish.
> It's my understanding that, with EJB3, I don't need the extra 
> deployment descriptors for session beans, etc., so what am I doing
wrong?
>  
> On a side note, Ed Burns wanted me to mention ##jsf on 
> irc.freenode.net.  Ed (and I think one or two other JSF developers) 
> spends time there as part of his JSF work, and I'm there as a JSF
user.
> He wanted me to encourage GF devs to come there.  It would help me 
> (and others, I'm sure, a LOT! :).
>  
> At any rate, I appreciate any help you can give me!
>  
> --
> Jason Lee
> Programmer/Analyst
>  
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: dev-help_at_glassfish.dev.java.net