|[glassfish] AppClient deployment [message #781647]
||Sat, 21 January 2012 22:45
| Olivier Chorier
Registered: July 2009
I'm trying to make an application through Glassfish, using JWS.
So, I made a EAR project, and then, added an application client project in it.
I'm on the case that I can launch the application from Eclipse successfully, but I can't launch it correctly from a javaws command line.
I tried to build the same application using Netbeans in order to try to understand where were the fail.
After searching for hours, here is the point :
Eclipse Project list :
- MyApp (EAR Project)
- MyAppClient (JWS Project with main class)
- MyAppCommons (shared classes between client and server)
- MyAppEJB (EJB Project, not containing Remote Interfaces)
- MyAppEJBRemote (EJB Project, only containing Remote Interfaces)
- MyAppJPA (Persistence Project, only containing Entity Beans).
- MyApp deploy paths : lib/substance.jar MyAppClient.jar lib/MyAppCommons.jar MYAppEJB.jar lib/MyAppEJBRemote.jar lib/MyAppJPA.jar
- MyAppClient manifest entries : empty. If I choose "Add", I can only select MyAppEJB ; but I don't want it (I only need MyAppEJBRemote for my client).
- MyAppClient deploy path : / (source : /appClientModule)
The fact is, using Eclipse and Netbeans, I have different generated jar files in folder ....glassfish\domains\domain1\generated\xml\MyApp\MyAppClient_jar. This folder contains MyAppClient.jar and MyAppClientClient.jar.
When looking the content of MyAppClientClient.jar's manifest file, I can see :
- Netbeans version :
GlassFish-Client-PersistenceUnit-Scan-Targets: lib/substance-5.0.jar lib/MyAppCommons.jar lib/MyAppEJBRemote.jar lib/MyAppJPA.jar
Class-Path: MyAppClient.jar ../MyAppClient.jar lib/substance-5.0.jar lib/MyAppCommons.jar lib/MyAppEJBRemote.jar lib/MyAppJPA.jar
- Eclipse Version :
Class-Path: MyAppClient.jar ../MyAppClient.jar lib/substance-5.0.jar
When looking the content of MyAppClient.jar's manifest file, I can see :
- Netbeans version :
Class-Path: substance-5.0.jar lib/substance-5.0.jar MyAppCommons.
jar lib/MyAppCommons.jar MyAppEJBRemote.jar lib/MyAppE
JBRemote.jar MyAppJPA.jar lib/MyAppJPA.jar
- Eclipse version :
As a result, when I start my application deployed using netbeans using javaws h t t p : / / localhost : 8080 / MyApp / MyAppClient, with netbeans my application starts. EJBs, Entity beans, susbtance librrary are recognized.
But when I start my application using Eclipse with the same way, the application starts too, but can't see Entity beans, and probably other ressources.
I tried many options in order to feed the manifest.mf located in MyAppClient, such as checking projects in Build Path in order/export options, project references, but manifest weren't changed. I also tried to add MyAppCommons in Deployment Assembly / Manifest Entries, but I couldn't. I could only import MyAppEJB.
Is it a lack of Eclipse, or is there a way to get a JWS application working outside of Eclipse environnement ?
I googled on about how to update the content of the variable "GlassFish-Client-PersistenceUnit-Scan-Targets" but I found nothing about it.
I probably could have a working sample if I merged some projects, like MyAppJPA and MyAppEJB and MyAppEJBRemote together, but I would like to understand how I can make links correctly.
Thanks a lot for any piece of help.
Sorry if I'm not easy to understand, I'm a beginner in GF and in english :-)
Powered by FUDForum
. Page generated in 0.02045 seconds