On Feb 2, 2005, at 11:50 AM, Mark wrote:


<gbean name="interop:type=Server,name=RMIIIOP" class="org.apache.geronimo.interop.rmi.iiop.server.RmiIiopServerGBean ">
<reference name="ContainerIndex">openejb:type=ContainerIndex</reference>
<reference name="Containers">openejb.server:EJBModule=ejbhw,*</reference>


Do you really mean to be looking for ejbs from exactly one ejb module? If so, you should include the name of the module in this gbean's name.


I was thinking that there would be a standard name + wildcard that would include all EJB containers both present and future. Will all EJB containers have a standard naming convention or will deployers be able to set their own name? If user can set their own name then a standard name with wildcard may not be added to my collection.

The naming conventions for ejbs must be followed or nothing else will work either:-)


I think you want the same patterns as ContainerIndex uses:

<references name="EJBContainers">
<pattern>geronimo.server:j2eeType=StatelessSessionBean,*</pattern>
<pattern>geronimo.server:j2eeType=StatefulSessionBean,*</pattern>
<pattern>geronimo.server:j2eeType=EntityBean,*</pattern>
</references>



You might be able to use *: or : but I wouldn't experiment too heavily :-)


Using openejb.server for the domain name would certainly prevent any ejb containers from being added to your collection :-)

<reference name="AdapterManager">interop: type=AdapterManager,name=AdapterManager</reference>
</gbean>



I recommend that you move to the more-automatic gbean naming system where you specify the j2eeType in the GBeanInfoFactory constructor and only the namePart in the xml config. If you'd like me to modify your gbeans for this I'd be happy to.

What would suggest the name be?
This all depends on how many gbean classes you have, how many instances of each class will get deployed, and what kind of relationship between them might occur.

If there is exactly one of a gbean, and it's part of the system configuration, you can leave the type as "GBean" (the default) or make it something more informative such as "CORBAResource". I don't recall any jsr-77 standard type for corba-related components, but this is similar to the mandated JTAResource I'm using for the transaction manager.

If there are potentially lots of instances of a gbean (like EJBContainers) you should the particular gbean its own type such as "CORBAWidgetRegistry" (you can tell how much I know about corba).

After you decide on type names, you should add it as a constant to NameFactory and use it when constructing GBeanInfo like this:

GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(TransactionContextManager.class, NameFactory.JTA_RESOURCE);


Then, in the xml plan, you just say

<gbean namePart="defaultRegistry" class="...

and you get
geronimo.server: J2EEServer=geronimo,J2EEApplication=null,J2EEModule=org/apache/ geronimo/Server,j2eeType=CORBAResource,name=defaultRegistry




Also, the names here imply that you are running in openejb rather than full geronimo. Is this correct?


I don't think so. I have a temp plan in the directory geronimo\modules\assembly, I started working from the geronimo\modules\assembly\j2ee-server-plan.xml.

As noted above, the domain name may be causing nothing to be found.

Hope this helps
david jencks

Mark




Reply via email to