Re: Custom JAAS LoginModule: Principal with empty name provided

2008-09-05 Thread Martin Vysny
On Thu, 2008-09-04 at 10:37 -0700, David Blevins wrote:
> That's pretty much right.  The exact code looks like this:
> 
>  try {
>  // Perform a login attempt (which should fail)
>  // simply to excercise the initialize code of any
>  // LoginModules that are configured.
>  // They should have a chance to perform any special
>  // boot-time code that they may need.
>  login("","");
>  } catch (Throwable e) {
>  }
> 
> We can probably create a flag you could set to disable that behavior  
> if you'd rather not get the call.
> 
> -David
> 

Thanks for your response. I don't think there is need for this special
property: the valid LoginModule implementation will simply throw
LoginException on empty user so it's okay. I'll just turn off logging
for this special case ;)
Thanks!
Martin

> 
> On Sep 4, 2008, at 9:44 AM, Dain Sundstrom wrote:
> 
> > IIRC, OpenEJB performs a single "fake" login after installing the  
> > security service in an effort to cause the login module to  
> > initialize early.  The security service performs this in a try catch  
> > that ignores any exceptions.
> >
> > -dain
> >
> > On Sep 3, 2008, at 6:46 AM, Martin Vysny wrote:
> >
> >> Hello guys,
> >> we tried to supply our custom JAAS LoginModule to OpenEJB. It works
> >> beautifully, I have just one question.
> >> When the OpenEJB is created (using the new InitialContext(properties)
> >> construct), it invokes this LoginModule and the handler supplies an
> >> empty string as an username in NameCallback. This isn't surprising
> >> though: I do not provide any username nor credentials to the
> >> InitialContext. What should I do?
> >> - should I expect empty string in LoginModule and throw  
> >> LoginException?
> >> - or should I provide some username/password? This is probably rather
> >> weird as no ejb method is being called...
> >>
> >> Thanks!
> >> Martin
> >>
> >> ps: please see attached stack trace for quick reference.
> >> 
> >
> >
> 
> 
-- 
Mgr. Martin Vysny | [EMAIL PROTECTED]
Software Engineer
Whitestein Technologies s.r.o | www.whitestein.com
Panenska 28 | 811 03 Bratislava | Slovak Republic
Main +421 2 5443-5502 | Direct +421 2 5930-0717



signature.asc
Description: This is a digitally signed message part


@LocalBinding with openejb

2008-09-05 Thread Andreas Karalus

hello,

is there any possibililty to get openejb jndi binding to evaluate the
org.jboss.annotantions.ejb.LocalBinding annotations? 

thx in advice,

andreas
-- 
View this message in context: 
http://www.nabble.com/%40LocalBinding-with-openejb-tp19328370p19328370.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Unit Tests hangs on getting connection

2008-09-05 Thread Newgro

Hi *,

I have the following scenario. I'm testing my beans within eclipse. I use
openejb-core-3. MSSql Server 2000. Beans are EJB3. Everything works fine in
production so long.

Because we access a legacy system (db) and our additional tables - i use 2
datasources.

If i have a Unittest runing by usage of one datasource - everything is ok.
But if both are included the test hangs while getting a connection. I
couln't trace it exactly because the dbcp sources are not in repository. Is
this known behavior? Maybe this is related to this 
http://www.nabble.com/DataSource-configuration-for-production-td17695975.html
nabble-entry 

If it's related, when will 3.0.1 release be on air?

Thanks 4 your help
Per
-- 
View this message in context: 
http://www.nabble.com/Unit-Tests-hangs-on-getting-connection-tp19328527p19328527.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Re: Unit Tests hangs on getting connection

2008-09-05 Thread Newgro

Hi again,

i solved it myself. I created multiple tables on @BeforeClass. But i didn't
closed the connection after
table create statement was executed. It seems that i've got 10 pooled
connections and then the manager was waiting for next free connection.

I now close the connection after every create table and it works now.

Sorry for annoying the list :-)
Cheers
Per
-- 
View this message in context: 
http://www.nabble.com/Unit-Tests-hangs-on-getting-connection-tp19328527p19332863.html
Sent from the OpenEJB User mailing list archive at Nabble.com.