geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toby cabot <>
Subject reference to ServerInfo from inside a j2ee app?
Date Wed, 10 Aug 2005 21:44:59 GMT
Hi Folks,

I'm working on getting web authentication to work, and it's mostly
there thanks to whoever wrote the "demo" application.  Thanks for
that, I learned a lot from looking at it.

Now I'd like to start the various gbeans in geronimo-application.xml
instead of relying on the ones in the org/apache/geronimo/Secure plan.
It mostly works, but the problem is getting a reference to ServerInfo.
If I crib from the demo app, like so:

    <gbean name="hello-realm" class="">
        <attribute name="realmName">hello-realm</attribute>
        <reference name="LoginModuleConfiguration">
        <reference name="ServerInfo">

I get this in the log:

17:03:49,034 DEBUG main [org.apache.geronimo.gbean.runtime.GBeanSingleReference] Waiting to
start geronimo.server:J2EEApplication=hello,J2EEModule=null,J2EEServer=geronimo,j2eeType=SecurityRealm,name=hello-realm
because no targets are running for reference ServerInfo matching the patternspatterns geronimo.server:J2EEApplication=hello,J2EEModule=org/apache/geronimo/System,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo

... and the hello-realm gbean is stuck in the starting state.  Note
that it's looking for ServerInfo with "J2EEApplication=hello" (which
is the name of my application) whereas the real ServerInfo has
"J2EEApplication=null".  I also tried swapping the module and name
elements with:


... then it works, but this seems much more brittle to me than using
the module and the name.  It works in the module/name case if I deploy
the gbean descriptors in a standalone descriptor file rather than in
the ear.

I'm wondering if in the module/name case Geronimo should try the
current application first, and if that fails try J2EEApplication=null.
If that sounds like a good idea I'd be willing to take a stab at it if
someone could point me to roughly the code that's doing the
translation from module/name to gbean name.


View raw message