users@glassfish.java.net

Re: EJB Session Bean Deployment

From: Qingqing Ouyang <Qingqing.Ouyang_at_Sun.COM>
Date: Wed, 25 Jan 2006 11:54:26 -0600

I am not familiar with the jndi browser. Does it show the jndi names
after deployment if you do have the ejb-jar.xml specified? I am
guessing you haven't run your application to see if the lookup can
happen or not?

Per your next question, <module><java> is for appclient module only. If
you meant to have the jars available for all Java EE modules in your ear
file, one thing you could do is to put them under a directory named
"lib". In Java EE 5, "lib" is the defacto directory for all shared
libraries.

Thanks,
Q^2

Jason Lee wrote:

>Actually, I don't have an ejb-jar.xml. I'm an EJB3 noob, but I'm under
>the impression that, with annotations, those files are no longer
>necessary. In fact, by simply renaming the jar file to .ejb3 and
>updating the entry in application.xml I can deploy the exact same .ear
>to JBoss 4 and getting a working session bean, which leads me to the
>next question regarding your second statement regarding <module><java>.
>If that's not the correct notation (and I pulled that from an
>example...somewhere), what should it be? A quick google just now seems
>to reinforce my understanding of that file, which I'll admit is not
>nascent, but immature AND rusty. :)
>
>
>--
>Jason Lee
>Programmer/Analyst
>
>-----Original Message-----
>From: Qingqing Ouyang [mailto:Qingqing.Ouyang_at_Sun.COM]
>Sent: Wednesday, January 25, 2006 11:11 AM
>To: dev_at_glassfish.dev.java.net
>Cc: users_at_glassfish.dev.java.net
>Subject: Re: EJB Session Bean Deployment
>
>Hi, Jason:
>
>Do you have an ejb-jar.xml in your bnpr.jar module? If so, would you
>please send it to me to take a look at?
>
>On a side note, <module><java> should be used to denote an appclient
>module. It looks like you are using it for the libraries? That will
>likely to cause confusion during deployment.
>
>Thanks,
>Q^2
>
>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
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>