users@glassfish.java.net

RE: Correct packaging for EJBs in WAR or EAR.

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Thu, 22 Apr 2010 14:50:27 -0400

jar's installed for a deployed module will be located at: $GF_HOME\modules e.g.
01/07/2009 08:47 AM 54,544 javax.persistence.jar
01/07/2009 08:49 AM 57,381 org.eclipse.persistence.antlr.jar
01/07/2009 08:49 AM 210,534 org.eclipse.persistence.asm.jar
01/07/2009 08:49 AM 3,384,605 org.eclipse.persistence.core.jar
01/07/2009 08:49 AM 486,489 org.eclipse.persistence.jpa.jar
01/07/2009 08:49 AM 57,623 org.eclipse.persistence.oracle.jar

when you start your webapp use the libraries directive to point to the folder where the jpa jars are located e.g.
deploy --libraries $GF_HOME/lib/org.eclipse.persistence.jpa.jar YourWebApp.waranyone else?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Thu, 22 Apr 2010 10:05:52 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Correct packaging for EJBs in WAR or EAR.
>
> Hi,
>
> I'm having trouble figuring out the correct way to package my modules so they'll work with either a .ear or a .war. Assume two modules:
>
> entities.jar (JPA entities)
> services.jar (EJB facade for data access)
>
> When I package using a .ear (using Maven), I end up with:
>
> - my-app.ear
> --- services.jar
> --- /lib/entities.jar
>
> My persistence.xml is in the services.jar module and has:
>
> [code]<jar-file>lib/entities.jar</jar-file>[/code]
>
> When I package using a .war (using Maven), I end up with:
>
> - my-app.war
> --- WEB-INF/web.xml
> --- WEB-INF/lib/entities.jar
> --- WEB-INF/lib/services.jar
>
> My persistence.xml is in the services.jar module and I have to change the jar-file entry to:
>
> [code]<jar-file>entities.jar</jar-file>[/code]
>
> I don't need .ear packaging and intend to put everything in a .war. However, needing to update persistence.xml depending on the packaging I'm going to use has me worried that I may be doing something wrong.
>
> Is there a better way? I've spent a few hours searching for an answer, but everyone seems to have their own way of doing it. Any help would be appreciated.
>
> Ryan
> [Message sent by forum member 'jptech']
>
> http://forums.java.net/jive/thread.jspa?messageID=398538
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
                                               
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1