[Design of JBoss Deployment Framework] - Re: MBean Dependency not working as expected .
by adrian@jboss.org
"vickyk" wrote : I have the following contents in the MBean deployment descriptor
|
|
| | <?xml version="1.0" encoding="UTF-8"?>
| | <server>
| | <mbean code="org.jboss.test.jca.mbean.RaDependsOnMe"
| | name="jboss.test:test=RaDependsOnMeMBean">
| | <depends>jboss.test:name=test</depends>
| | </mbean>
| | </server>
|
| The jboss.test:name=test is not present so I would expect that the RaDependsOnMe not to get registered/available for usage
|
| But to my surprise I see the MBean jboss.test:test=RaDependsOnMeMBean available from the jmx-console and I am able to call the sayHello() operation from the jmx-console .
|
| I tried this on Jboss5 , Jboss4.2 and Jboss4.0.5 .
|
| This looks to me as the bug .
|
|
No. Depends is a contract on the create/start lifecycle not registration in the
MBeanServer. To get what you want in JMX, you'd have to introduce
something like the MC demand into the jmx xml.
| <mbean code="org.jboss.test.jca.mbean.RaDependsOnMe"
| name="jboss.test:test=RaDependsOnMeMBean">
| <demand whenRequired="Instantiated">jboss.test:name=test</demand>
| </mbean>
|
Which doesn't currently exist within the -service.xml
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169010#4169010
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169010
17 years, 8 months
[Design the new POJO MicroContainer] - Re: StructureContext and candidate annotations
by alesj
"alesj" wrote :
| Where MockEARStructureDepolyer then checks in
| Module's StructureContext if we have any matching annotation.
|
In order to do this, I need some way to get a child StructureContext from parent StructureContext:
e.g.
| private Integer determineType(StructureContext context, VirtualFile archive) throws Exception
| {
| boolean recognised = context.determineChildStructure(archive);
| if (recognised)
| {
| StructureContext subContext = context.getChildContext(archive);
| Set<Class<? extends Annotation>> foundAnnotations = subContext.getFoundAnnotations();
| if (foundAnnotations.contains(Stateless.class))
| return J2eeModuleMetaData.EJB;
| }
|
Where is the best way/place to store this info?
While creating new StructureContext?
| public StructureContext(VirtualFile root, VirtualFile parent, VirtualFile file, StructureMetaData metaData, VFSStructuralDeployers deployers, StructureContext parentContext)
| {
| ...
| this.parentContext = parentContext;
| if (parentContext != null)
| {
| // ADD CHILD INFO HERE
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168987#4168987
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168987
17 years, 8 months
[Design of POJO Server] - Re: Pushing correct aspect manager for a deployment
by kabir.khan@jboss.com
I still do not get what I expect in the MetaData repository, none of the MetaDataRetrievals have a initialised metadataByName property.
I noticed something else, before the call to
| scopeInfo.setScope(unit.getScope());
|
in BeanMetaDataDeployer scopeInfo.scopeKey is
| [JVM=THIS, CLASS=org.jboss.beans.metadata.plugins.factory.GenericBeanFactory, INSTANCE=ScopedAlias_13_Factory$ScopedInterceptor, WORK=5644960]
|
after the call it is
| [JVM=THIS, APPLICATION=vfszip:/Users/kabir/sourcecontrol/jboss-head/testsuite/output/lib/aop-scopeddependency-scoped.sar, DEPLOYMENT=vfszip:/Users/kabir/sourcecontrol/jboss-head/testsuite/output/lib/aop-scopeddependency-scoped.sar]
|
I will take a closer look at your KernelScopeUnitTestCase.
Another problem is that for scoped deployments I am changing the beans name to something unique and adding an alias annotation containing the bean name. This breaks with the new code in BeanMetaDataDeployer. I will post more on this once I have some more information about what exactly is going on...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168986#4168986
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168986
17 years, 8 months