users@glassfish.java.net

Re: AppClient/JWS/Derby/Security problems

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Thu, 07 Sep 2006 17:29:06 -0500

Hello, again, Martin.

A couple of added notes...

Marina mentioned that toplink-essentials.jar will need to be in the
classpath. That's true and in addition the appclient command and the
Java Web Start support in GlassFish takes care of that for you
automatically. I need to double-check that the Java Web Start piece
does so correctly in 9.0 b48 which is what you are using. The current
code base definitely includes it, and the app client command has
included that JAR for some time so you should be okay there.

You should not see any difference between specifying -mainclass on the
command line and omitting that option and specifying Main-Class in the
manifest of the app client jar. Either way should work.

One other detail, following up on Sahoo's comment: Annotations in app
clients work only on items declared in the main class and they must be
static, not instance, items. It is the Java EE spec that imposes this
restriction, so the app client container honors it.

- Tim

Sanjeeb Kumar Sahoo wrote:
> Hi Martin,
>
> I have a couple of questions regarding the issue you are facing while
> running your application using appclient container.
>
> 1. You mentioned that you emf is *null* even when you annotated it
> with @PersistenceUnit. Where is this emf defined? It has to be defined
> in the main class only.
>
> 2. Can you send us the revised appclient command that you run now?
>
> To start with, don't use -mainclass option to appclient. Specify
> Main-Class in manifest.mf of the client jar.
>
> Thanks,
> Sahoo
>