geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Accessing EJB via JNDI from a web application
Date Thu, 25 Jan 2007 00:24:04 GMT

On Jan 24, 2007, at 2:35 PM, Aman Nanner/MxI Technologies wrote:

> Despite the following error in the log:
>
>>> ERROR [KernelContextGBean] Error adding binding for
>>> Mxi/Maintenix/1/ear?J2EEApplication=Mxi/Maintenix/1/
>>> ear,j2eeType=EjbBindings,name=EjbBindings
>
> it seems that the GBean does indeed get properly deployed.  However, I
> still cannot yet get it to find my JNDI bindings.
>
> On the website, I noticed that it says that 1.2beta has Global JNDI
> support....is that different from this Global JNDI plugin?

yes they are partly different.  1.2 has a read-write global jndi tree  
installed by default under java: if I understand the configuration  
correctly.  However it doesn't have facitilties for automatically  
binding anything into it.

The global jndi plugin has some gbeans  that scan for ejbs and  
datasources getting started and stopped and binds and unbinds them in  
response.  This is not included in geronimo and it's what I suggested  
you try out.  Unfortunately there seem to be problems.

I would try to start geronimo with debug enabled and trace through  
the binding to try to figure out what is going wrong.

unfortunately I don't have time to try it myself right now.

thanks
david jencks

> Thanks,
> Aman
>
>
> David Jencks <david_jencks@yahoo.com> wrote on 01-24-2007 03:43:10 PM:
>
>>
>> On Jan 24, 2007, at 9:31 AM, Aman Nanner/MxI Technologies wrote:
>>
>>> So it seems there's a problem with the code in the EjbBindings.java
>>> file.
>>> Specifically, the GBeanInfoBuilder object that is created in the
>>> static
>>> initializer does not define the "homeContext" and "localHomeContext"
>>> attributes that are used in the constructor.  I change the static
>>> initializer to the following, and rebuilt the global-jndi-plugin,
>>> and now I
>>> don't get that constructor initialization error:
>>>
>>>     static {
>>>         GBeanInfoBuilder builder =
>>> GBeanInfoBuilder.createStatic(EjbBindings.class, "EjbBindings");
>>>         builder.addAttribute("homeContext", String.class, true,  
>>> true);
>>>         builder.addAttribute("localHomeContext", String.class,
>>> true, true);
>>>         builder.setConstructor(new String[]{"kernel", "homeContext",
>>> "localHomeContext"});
>>>         GBEAN_INFO = builder.getBeanInfo();
>>>     }
>>>
>>>
>>> However, now I get another error when the GBean is attempted to be
>>> deployed:
>>>
>>> ERROR [KernelContextGBean] Error adding binding for
>>> Mxi/Maintenix/1/ear?J2EEApplication=Mxi/Maintenix/1/
>>> ear,j2eeType=EjbBindings,name=EjbBindings
>>>
>>> It's hard to decipher what this error means.  I noticed that
>>> there's been
>>> no work done to the Global JNDI plugin since September 29th, 2006.
>>> Is this
>>> piece not yet ready to be used?
>>
>> Well, it's not part of anything that's in line to be released, but
>> Dain had it working at one point and I don't know of any changes
>> likely to break it.  However apparently there has been something that
>> broke it.
>>
>> I suspect a different solution may be more appropriate for the
>> openejb3 integration but I have no idea what at this point.
>>
>> If you can figure out any more info on what is going wrong here we
>> might be able to fix this...
>>
>> thanks
>> david jencks
>
> ______________________________________________________________________ 
> ____________
> * This message is intended only for the use of the individual or  
> entity to which it is addressed, and may contain information that  
> is privileged, confidential and exempt from disclosure under  
> applicable law. Unless you are the addressee (or authorized to  
> receive for the addressee), you may not use, copy or disclose the  
> message or any information contained in the message. If you have  
> received this message in error, please advise the sender by reply e- 
> mail , and delete the message, or call (collect) 001 613 747 4698. *
>


Mime
View raw message