users@glassfish.java.net

Eclipse RCP client for Glassfish v2.1 using EJB3 -- Security Problems/Quest

From: <glassfish_at_javadesktop.org>
Date: Tue, 19 May 2009 05:54:43 PDT

Hi,

we are trying to migrate our EJB3 application with Eclipse RCP client from JBoss5 to Glassfish 2.1 and we are facing problems connecting the Eclipse RCP client as a standalone java client.

we've done a lot of research and from bits and pieces found in forums/blogs I think I know what the situation is, even though we weren't able to get a running sample app. Some better documentation in this field would really be useful.


Our questions at this point:


1 - is it true that Glassfish doesn't support the passing of username/password via the InitialContext and you have to use ProgrammaticLogin, which does much of the same: it passes the username/password with each lookup call when requesting EJBs?

2 - in addition you need to configure JAAS on the client. Is there anything else required on top of the configuration of the realm?

3 - when everything is working properly, are you supposed to call callerPrincipal.getName() and you see the user name you passed with ProgrammaticLogin.login? We are always getting ANONYMOUS!! What are we doing wrong?


Please help as there is really not too much information out there on the web! Even a seemingly complete blog like http://blogbysud.blogspot.com/2007/10/programmatic-login-to-authenticate.html has a comment in the end having the same problem we have.

I have to say, GF makes a great impression, so we would like to start using it, but so far we've had much more difficulty than when we started using JBoss a few years ago. There must be a simpler way of using GF!

Your help is appreciated (as you can tell, we're getting a bit frustrated)... :- )

- Andreas
[Message sent by forum member 'ansis' (ansis)]

http://forums.java.net/jive/thread.jspa?messageID=346775