geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenji Nakamura <>
Subject GBean references
Date Sat, 10 Dec 2005 00:03:55 GMT

I'm transforming our desktop app to run on server, and I'd like to
make custom GBeans out of the modules.

I'm stuck with the configuration of GBean reference.
I took a look at the plans in doc directory, and noticed there are
three ways to define reference.

I created a GBean named "Dispatcher" in configId
"com/example/Dispatcher". Then I created another plan
"com/example/Workspace" whose parentId is "com/example/Dispatcher". In
the plan, I'd like to inject Dispatcher into a GBean "Workspace".

I tried both format 1) and 2).

 <reference name="Dispatcher">

<reference name="Dispatcher">

In either case, console output seems to be normal...

15:34:43,907 INFO  [LocalConfigStore:config-store] Loaded
Configuration geronimo.config:name="com/example/Workspace"
15:34:43,990 INFO  [Configuration] Started configuration com/example/Workspace

However, doStart() method of Workspace GBean WAS NOT called, and I
noticed the following debug message.

15:34:44,456 DEBUG [GBeanSingleReference] Waiting to start
because no targets are running for reference Dispatcher matching the
patterns geronimo.server:J2EEModule=com/example/Dispatcher,j2eeType=GBean,name=Dispatcher

Here is the output of deploy list-modules.
+ org/apache/geronimo/SystemDatabase
  + org/apache/geronimo/applications/Welcome/Jetty @
  + com/example/Dispatcher
  + com/example/Workspace
  + org/apache/geronimo/SystemJMS

The output of list-targets is as following;
Available Targets:

doStart() is invoked if I comment out the reference to Dispatcher.

Workspace GBean also has the reference to ServerInfo, which is defined
in format 2) and successfully retrieved and doStart() is kicked off. I
don't understand where the behavior difference comes from. Do I need
to something special to expose GBean to others?

I also want to know the criteria to choose reference element format 1)
and 2) described above. Are they just syntax variations to support
JSR-77 style and Geronimo native configId?

Thanks in advance,

Kenji Nakamura

View raw message