users@glassfish.java.net

Re: EJB Module with Entity class in library

From: Alexis Moussine-Pouchkine <alexis.mp_at_sun.com>
Date: Mon, 07 Dec 2009 10:01:45 +0100

extracting (and eventually removing) VehicleEntity.jar from the EJB
JAR and deploying with :
        asadmin deploy --libraries ~/VehicleEntity.jar ~/VehicleEJB.jar
works for me.

The Java EE spec (EE.8.2.1 Bundled Libraries) says that you can bundle
libraries in "Java EE application packages" (which I understand
includes ejb-jar files) and reference them using a "Class-Path" header
in the EJB-JAR manifest.

NetBeans 6.7 is not adding this to the manifest (and 6.8 RC2 acts the
same). Even when adding it by hand, it doesn't seem to be picked up at
deployment.
I don't know if this is because the library is an @Entity. Hong would
know I'm sure.

Of course you can now package your EJB in a WAR or create the EAR and
declare library as explained in an earlier answer.

-Alexis

On Dec 7, 2009, at 9:15, glassfish_at_javadesktop.org wrote:

> As i said I would do, I I used Netbeans 6.7.1 and Glassfish v2ur2
> this weekend to create an EJB that uses an entity class in a library
> file.
>
> It worked perfectly on glassfish v2ur2, but when i tried to deploy
> the same jar (EJB jar) to Glassfish v3-b73 it failed with the same
> error message as before.
>
> I have attached the compiler EJB jar file to deploy on glassfish.
> All you need to deploy it is a JDBC resouce where the JNDI name is
> "jdbc/vehicle".
>
> It need to be deployed as an jar (EJB jar) not an EAR file. I rely
> completely on Netbeans to structure the file for me.
>
> After being deployed you can use the Glassfish web servise test
> client to add vehicles to the database.
> [Message sent by forum member 'gadnex' ]
>
> http://forums.java.net/jive/thread.jspa?messageID=375093
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>