Ok. We got it to work but we had to call

new org.jboss.invocation.http.interfaces.Util();

after we logged in and before new did new InitialContext().

I think the test case works becuase it tests the failure first, which
would call the static part of Util to initalize the context, so when the
actual valid call is done the static method has been called.


Now do I have to hard code the http invokers into the jboss.xml
deployment file for each bean? Why does the naming lookup not update the
invocation context with the http invoker on the home methods and then
the home methods update the EJB clases  with the home's invoker type?

I need both http invocation and rmi based on how the bean was looked up
in JNDI.




On Mon, 2003-02-03 at 23:29, Scott M Stark wrote:
> Its handled by a custom java.net.Authenticator that integrates with the current
> security context. There are testcases showing how to access a secured JNDI
> invoker over http.
> 
> xxxxxxxxxxxxxxxxxxxxxxxx
> Scott Stark
> Chief Technology Officer
> JBoss Group, LLC
> xxxxxxxxxxxxxxxxxxxxxxxx
> 
> ----- Original Message ----- 
> From: "Dave Smith" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 03, 2003 8:33 AM
> Subject: [JBoss-dev] Securing JNDI http invoker.
> 
> 
> > 
> > I am using JBOSS 3.0.6 and am trying to secure the JNDI invoker via
> > https. Looking at the code there seems to such way to do this. How do
> > you get the current username and password from the current login
> > context?  It would be fairly trival to check the return value, if it is
> > 401 then retry with the current login. So ..
> > 
> > if(connn.getResponseCode() ==
> > java.net.HttpURLConnection.HTTP_UNAUTHORIZED)
> > {
> > 
> > get login,pass from login context
> > 
> > userPassword=userName+":"+passwd
> > 
> > String encoding = new
> > sun.misc.BASE64Encoder().encode(userPassword.getBytes());
> > URLConnection uc = url.openConnection();
> > uc.setRequestProperty  ("Authorization", "Basic " + encoding);
> > getInputStream blah,blah,blah ....
> > 
> > }
> > 
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to