Hi there,
I'm busy porting a J2EE application to Glassfish ([Sun Java System Application Server 9.1_01 (build b09c-fcs)]).
The application has a pure Java Client client which needs to perform JAAS authentication in order to access the remote Session Beans.
[b]LoginContextDriver.doClientLogin or ProgrammaticLogin ?[/b]
It took me a while to configure the JAAS authentication a the client side, not been able to make a decision regarding either using the LoginContextDriver.doClientLogin method or using the ProgrammaticLogin class.
Finally I made the decision to use the LoginContextDriver.doClientLogin because it make my client application more generic (the J2EE application also runs on JBoss and Weblogic) and sticks to the security standard. I do need a Subject from the login phase !
I've read some discussion about the need to just use ProgrammaticLogin because the LoginContextDriver is meant to be used at server side but this doesn't convince me much.
(
http://forums.java.net/jive/message.jspa?messageID=245128)
So if somebody could provide me with a clear explanation on how to perform a JAAS login from a pure Java client side... it would be great.
For the moment my client code works great using the LoginContextDriver.doClientLogin.
[b]Client side Glassfish set of required libraries[/b]
Beside the question regarding what to use to perform JAAS authentication at client side, I've calculated the total size of Glassfish jar files that needs to be used client side.
For both cases, the total size is around 19 MB !!!
Required JAR files are:
appserv-admin.jar (1.7 MB)
appserv-deployment-client.jar (216 KB)
appserv-ext.jar (592 KB)
appserv-rt.jar ([b]15 MB[/b]) !!!
javaee.jar (1.1 MB)
Most of the size being taken by one single jar: appserv-rt.jar (15 MB)
In comparison to what is required for other application server this is really too much !!
JBoss: one unique app server client jar file is required: jbossall-client.jar (3.7 MB)
Weblogic: one unique app server client jar file is required: wlclient.jar (392 KB)
I don't really understand why in the case of Glassfish I need to use, for a pure Java client side, what seems to be app server side only related libraries (such as appserv-rt.jar) ?
Additionally to that, when using ProgrammaticLogin and determine what Glassfish jar files to use, I've got a ClassNotFoundException for a class belonging to the NetBeans project apparently (don't remember the class name).
Am I missing something ?
Thanks
Daniel
[Message sent by forum member 'danieldl' (danieldl)]
http://forums.java.net/jive/thread.jspa?messageID=259653