-
1. Re: From Servlet Standalone Tomcat to EJB on JBoss
wolfgangknauf Jul 16, 2009 5:55 AM (in response to gfemajor)Hi,
this is some kind of FAQ ;-): JndiLoginInitialContextFactory does not work in JBoss 5 (actually, it is some kind of dirty workaround), you will have to perform a JAAS login.
See this forum thread for more details: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4198157
Best regards
Wolfgang -
2. Re: From Servlet Standalone Tomcat to EJB on JBoss
wolfgangknauf Jul 16, 2009 6:35 AM (in response to gfemajor)I updated the FAQ, question 10 (hopefully, what I wrote is correct ;-) )
-
3. Re: From Servlet Standalone Tomcat to EJB on JBoss
gfemajor Jul 16, 2009 9:37 AM (in response to gfemajor)OK, i feel sorry that i did not mention my configuration.
I use (standalone) Tomcat 6.0.20 and JBoss 4.3.
I read the FAQ:"FAQ" wrote:
Q10: Why isn't my authentication info picked up from the JNDI InitialContext
A10: Because there is no reason for it. You have to use an InitialContextFactory implementation that supports this. See the Available InitialContext Factories section, and LoginInitialContextFactory or JndiLoginInitialContextFactory in particular.
Because i am using JBoss 4.3 the "org.jboss.security.jndi.JndiLoginInitialContextFactory" should work, but this is not my Problem. When i use the code from my Post #1, i can log me in and use my EJB.
The Problem is, that i'm trying to authenticate against the standalone tomcat (servlet) and later, i try to call an EJB from that servlet, but tomcat does not populate the logged in user to JBoss, so i have to login a secound time to JBoss, with the code from post#1.
I try to avoid the secound login to JBoss, so that tomcat automaticly logs in into JBoss with the principal logged in on tomcat, and the question was, if this is possible (and how :-))."Wolfgang Knauf" wrote:
See this forum thread for more details: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4198157
Sorry, but this thread does not help me, because alsways there must be the principal and password known, but i only get the principals name from the tomcat session.
(@Wolfgang Knauf: if you do not understand my problem (or i don't understand your solution ;-)), maybe you can send me an email to gfemajor2 [at] gmx.de and we could talk in german :-)) -
4. Re: From Servlet Standalone Tomcat to EJB on JBoss
wolfgangknauf Jul 17, 2009 11:39 AM (in response to gfemajor)Hi,
I'm sorry, I did not see that you use an external Tomcat to access JBoss. No chance to deploy your GWT app to JBoss?
You might try to take a look at SSO (Single Sign On). As far as I know, this works at least for different apps running in the same JBoss, but probably it is also possible to configure it between servers. I don't know it myself, so I cannot help you further.
Anyway, the "JndiLoginInitialContextFactory" workaround will not work in JBoss 5.0 ;-)
Best regards
Wolfgang -
5. Re: From Servlet Standalone Tomcat to EJB on JBoss
mgibson77 Jul 20, 2009 7:45 PM (in response to gfemajor)Hey GFEMajor,
I think you might have an answer to what I'm looking for.
I can't get JAAS form based authentication to work properly and I've seen you have it working..any pointers?
My post is here:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=158664