Just to update a bit on where I am now tracing the injections:
In JndiEncBuilder.java, the following executes and DOES add all the
fields to be injected, where reference name equals the name reported
in the error for jdniName.
public Map<String, Object> buildMap() throws OpenEJBException
{
...
for (EjbReferenceInfo referenceInfo : jndiEnc.ejbLocalReferences) {
....
bindings.put(normalize(referenceInfo.referenceName), reference);
}
...
}
Then, back in build()
the jdnifactory is executes, and the WritableContext is created,
passing in a valid bindings object (with all the bindings listed in
it, as proven by the debugger's variables view). A sample bindings
entry (key=>value):
String "java:comp/env/net.kunye.platform.init.KMSPlatformEjbStartupBean/em"
=> JndiUrlReference
org.apache.openejb.core.ivm.naming.jndiurlrefere...@1d9c8a5
The resulting WriteableContext contains entries like:
java:comp/env/net.kunye.platform.init.KMSPlatformEjbStartupBean/site=org.apache.openejb.core.ivm.naming.intravmjndirefere...@1d8efd1
This is returned back to the EnterpriseBeanBuilder, and passed into
DeploymentContext.
What I have need to find out now is where does it go from here, and
how is it still involved in the injection lookups?
Quintin Beukes
On Tue, Oct 20, 2009 at 4:47 PM, Quintin Beukes <[email protected]> wrote:
> Hey,
>
> I am trying to get @Singleton working in Geronimo. I've been sitting
> the whole day tracking/changing and was hoping someone could please
> save me some time tomorrow.
>
> So far I can get it deployed, loaded, able to call locally and
> remotely, I've gotten the @Startup and @PostConstruct to execute,
> fixed 2 deadlocks (rather, never satisfied .wait() calls in the
> Geronimo-OpenEJB integration code). Only thing that looks like it's
> not working is the injections. When the bean loads it curses the
> following: 2009-10-20 15:10:55,257 WARN [OpenEJB] Injection data not
> found in enc: jndiName='net.kunye.platform.init.KMSPlatformEjbStartupBean/em',
> target=class net.kunye.platform.init.KMSPlatformEjbStartupBean/em
>
> It does this for all types of injections. I checked the JndiEnc
> object, and those injections are one hundred percent definitely being
> added to it. It also looks like it's being bound to the context,
> though I can't say for sure if it's done correctly.
>
> Could someone please give me a general idea as to how this work so I
> don't have to trace it tomorrow. I'm sort of tired of having to
> restart geronimo and wait 2 minutes just to redeploy the app and
> restart the stepping process (there are MANY deadlocks related to
> failed EJBs - I stopped caring about those that happen after a failed
> deploy, since they will probably not be there if the app runs fine -
> so it's a care for another day).
>
> Quintin Beukes
>