...
In the above class diagram, the Kernel class has a method named loadGBean(). This method takes an instance of GBeanData (which is essentially just a wrapper around GBean information) and a classloader as input. Recall from GBeans that GBeans aren't required to implement any interface. So the GBeanData object wraps information on how the GBean should be accessed (it's name) and methods/attributes of that GBean. BasicKernel takes the GBeanData and passes it to GBeanInstance to create the object that will be used for all references to that GBean. GBeanInstance has all of the methods that are able to be called, links to the references and dependencies on the other GBeans etc. Dependencies are injected here as well. One of the most important pieces of information that is contained in the GBeanInstance is how it's referenced. Looking through the javadocs for the kernel (link here) will reveal that many of the methods in the interface are overridden four times. Each of the overridden methods have similar method signatures. This is because there are four possible ways to reference a GBean. There is the abstract name, the short name, the object name (looking up GBeans by object name has now been deprecated) and the class type. Below is a table of the four types with definitions of each of the names:
Name | Object Type | Description | ||
---|---|---|---|---|
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9516b3da0e40b891-0318c3c8-4a2343c6-9474a350-346dede2ebc7910866fcdf69"><ac:plain-text-body><![CDATA[ | Abstract Name | AbstractName | Geronimo specific name of the object. It's a URI that uniquely identifies a given GBean. From the javadocs, it is defined by: [vendorId]/artifactId/[version]/[type]?key=value[,key=value][,...] | ]]></ac:plain-text-body></ac:structured-macro> |
Object Name | ObjectName | JMX name for a GBean. This is required by the JMX spec and would be used by JMX based tools to reference GBean objects | ||
Short Name | String | Will reference a GBean by name (a key/value pair of the Abstract Name) | ||
Type | Class | References based on type from the URI in the Abstract Name |
...