You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Mark Struberg <st...@yahoo.de> on 2013/02/25 19:30:20 UTC

binding non-EJBs to JNDI

Hi folks!

It seems that OpenEJB-4.5.1 is pretty eager to bind _any_ class to JNDI (and not only EJBs)


This happens in classic.Assembler, line 736. 

When using JBehave this leads to blowing up with an IllegalStateException on the class org.jbehave.core.steps.StepCreator$MethodInvoker when invoking
matcher.appencReplacement(buf, value);

Where buf = "" and value is the name of the class as stated above.


LieGrue,
strub

Re: binding non-EJBs to JNDI

Posted by Mark Struberg <st...@yahoo.de>.
It seems like the $ in the Classname leads  the OpenEJB StringTemplate to blow up. This code uses java.util.regex.Matcher which interprets a '$' sing as group marker. If you tell me an easy sample which I can copy then I can continue a test case.

Btw, the StringTemplate code contains a wild mixture of spaces and tabs...


LieGrue,
strub



----- Original Message -----
> From: Mark Struberg <st...@yahoo.de>
> To: "dev@tomee.apache.org" <de...@tomee.apache.org>
> Cc: 
> Sent: Monday, February 25, 2013 9:55 PM
> Subject: Re: binding non-EJBs to JNDI
> 
> well, according to my debugger it also tries to bind classes which are no EJBs.
> Not sure what's so special about that JBehave MethodInvoker. Will try to 
> find out tomorrow.
> 
> LieGrue,
> strub
> 
> 
> 
> 
> ----- Original Message -----
>>  From: Romain Manni-Bucau <rm...@gmail.com>
>>  To: Mark Struberg <st...@yahoo.de>; dev@tomee.apache.org
>>  Cc: 
>>  Sent: Monday, February 25, 2013 8:40 PM
>>  Subject: Re: binding non-EJBs to JNDI
>> 
>>  If eager means at startup, yes but it only bindq ejbs and resources
>>  Le 25 févr. 2013 19:40, "Mark Struberg" <st...@yahoo.de> 
> a 
>>  écrit :
>> 
>>> 
>>> 
>>>   still happens with 4.6.0-SNAPSHOT btw...
>>> 
>>>   LieGrue,
>>>   strub
>>> 
>>> 
>>> 
>>> 
>>> 
>>>   >________________________________
>>>   > From: Mark Struberg <st...@yahoo.de>
>>>   >To: openejb-dev <de...@openejb.apache.org>
>>>   >Sent: Monday, February 25, 2013 7:30 PM
>>>   >Subject: binding non-EJBs to JNDI
>>>   >
>>>   >Hi folks!
>>>   >
>>>   >It seems that OpenEJB-4.5.1 is pretty eager to bind _any_ class to 
> JNDI
>>>   (and not only EJBs)
>>>   >
>>>   >
>>>   >This happens in classic.Assembler, line 736.
>>>   >
>>>   >When using JBehave this leads to blowing up with an 
>>  IllegalStateException
>>>   on the class org.jbehave.core.steps.StepCreator$MethodInvoker when 
> invoking
>>>   >matcher.appencReplacement(buf, value);
>>>   >
>>>   >Where buf = "" and value is the name of the class as 
> stated 
>>  above.
>>>   >
>>>   >
>>>   >LieGrue,
>>>   >strub
>>>   >
>>>   >
>>>   >
>>> 
>> 
> 

Re: binding non-EJBs to JNDI

Posted by Mark Struberg <st...@yahoo.de>.
well, according to my debugger it also tries to bind classes which are no EJBs.
Not sure what's so special about that JBehave MethodInvoker. Will try to find out tomorrow.

LieGrue,
strub




----- Original Message -----
> From: Romain Manni-Bucau <rm...@gmail.com>
> To: Mark Struberg <st...@yahoo.de>; dev@tomee.apache.org
> Cc: 
> Sent: Monday, February 25, 2013 8:40 PM
> Subject: Re: binding non-EJBs to JNDI
> 
> If eager means at startup, yes but it only bindq ejbs and resources
> Le 25 févr. 2013 19:40, "Mark Struberg" <st...@yahoo.de> a 
> écrit :
> 
>> 
>> 
>>  still happens with 4.6.0-SNAPSHOT btw...
>> 
>>  LieGrue,
>>  strub
>> 
>> 
>> 
>> 
>> 
>>  >________________________________
>>  > From: Mark Struberg <st...@yahoo.de>
>>  >To: openejb-dev <de...@openejb.apache.org>
>>  >Sent: Monday, February 25, 2013 7:30 PM
>>  >Subject: binding non-EJBs to JNDI
>>  >
>>  >Hi folks!
>>  >
>>  >It seems that OpenEJB-4.5.1 is pretty eager to bind _any_ class to JNDI
>>  (and not only EJBs)
>>  >
>>  >
>>  >This happens in classic.Assembler, line 736.
>>  >
>>  >When using JBehave this leads to blowing up with an 
> IllegalStateException
>>  on the class org.jbehave.core.steps.StepCreator$MethodInvoker when invoking
>>  >matcher.appencReplacement(buf, value);
>>  >
>>  >Where buf = "" and value is the name of the class as stated 
> above.
>>  >
>>  >
>>  >LieGrue,
>>  >strub
>>  >
>>  >
>>  >
>> 
> 

Re: binding non-EJBs to JNDI

Posted by Romain Manni-Bucau <rm...@gmail.com>.
If eager means at startup, yes but it only bindq ejbs and resources
Le 25 févr. 2013 19:40, "Mark Struberg" <st...@yahoo.de> a écrit :

>
>
> still happens with 4.6.0-SNAPSHOT btw...
>
> LieGrue,
> strub
>
>
>
>
>
> >________________________________
> > From: Mark Struberg <st...@yahoo.de>
> >To: openejb-dev <de...@openejb.apache.org>
> >Sent: Monday, February 25, 2013 7:30 PM
> >Subject: binding non-EJBs to JNDI
> >
> >Hi folks!
> >
> >It seems that OpenEJB-4.5.1 is pretty eager to bind _any_ class to JNDI
> (and not only EJBs)
> >
> >
> >This happens in classic.Assembler, line 736.
> >
> >When using JBehave this leads to blowing up with an IllegalStateException
> on the class org.jbehave.core.steps.StepCreator$MethodInvoker when invoking
> >matcher.appencReplacement(buf, value);
> >
> >Where buf = "" and value is the name of the class as stated above.
> >
> >
> >LieGrue,
> >strub
> >
> >
> >
>

Re: binding non-EJBs to JNDI

Posted by Mark Struberg <st...@yahoo.de>.

still happens with 4.6.0-SNAPSHOT btw... 

LieGrue,
strub





>________________________________
> From: Mark Struberg <st...@yahoo.de>
>To: openejb-dev <de...@openejb.apache.org> 
>Sent: Monday, February 25, 2013 7:30 PM
>Subject: binding non-EJBs to JNDI
> 
>Hi folks!
>
>It seems that OpenEJB-4.5.1 is pretty eager to bind _any_ class to JNDI (and not only EJBs)
>
>
>This happens in classic.Assembler, line 736. 
>
>When using JBehave this leads to blowing up with an IllegalStateException on the class org.jbehave.core.steps.StepCreator$MethodInvoker when invoking
>matcher.appencReplacement(buf, value);
>
>Where buf = "" and value is the name of the class as stated above.
>
>
>LieGrue,
>strub
>
>
>