You're breaking the MBean rules.
You shouldn't expect some dependency to be started in your create lifecycle.
I'm surprised this worked when you were an MBean? Maybe just luck :-)
The obvious solution would be to inject the ORBService as a parameter
into your create() method. It then must be started/installed to be passed
as such a parameter.
| <bean ...>
| <create>
| <parameter><inject
bean="ORBService"/></parametrer>
| </create>
|
But if you don't want to change your code then you can use the "demand"
instead of "depends' to achieve what you want:
Example from the schema:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontaine...
| The demand is used to specify a dependency on a supply
|
| and when the demand should be supplied
|
|
|
| e.g.:
|
| ISupply must be installed before IDemand is constructed
|
|
|
| <bean name="IDemand">
|
| <demand state="Instantiated">theSupply</demand>
|
| </bean>
|
| <bean name="ISupply" ...>
|
| <supply>theSupply</supply>
|
| </bean>
|
In your case you would
| <demand state="Create">ORBService</demand>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152367#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...