With jboss2.4.4 you can add your MBean to jboss.conf
which uses MLets.
If this is the wrong order, just add a ClassPathExtension
to jboss.conf and leave your MBean in jboss.jcml
With jboss3, jboss.conf and jboss.jcml are combined
into jboss-service.xml. You can also create
my-service.xml snippets or a my-service.sar to
hot deploy MBeans.
Adrian, thanks for taking the time to point me in the right direction!
This is what I have done:
I have the following lines added to jboss.jcml:
<!-- at the very end of the file -->
And the following added to jboss.conf:
Unfortunately, now I'm back to the problem where my MBean is being instantiated too early (like almost immediately):
jboss.home = C:\java\JBoss-2.4.3
Using JAAS LoginConfig: file:/C:/java/JBoss2.4.3/conf/default/auth.conf
Using configuration "default"
[root] Started Log4jService, config=file:/C:/java/JBoss2.4.3/conf/default/log4j.properties
[Info] Java version: 1.4.0,Sun Microsystems Inc.
[Info] Java VM: Java HotSpot(TM) Client VM 1.4.0-b92,Sun Microsystems Inc.
[Info] System: Windows 2000 5.0,x86
[Shutdown] Shutdown hook added
[Default] JmsQueueParent intializeContext - Success
[Default] EXCEPTION: JmsQueueParent jndiLookup() - jndi failed for ConnectionFactory
[Default] javax.naming.ServiceUnavailableException: Connection refused: connect.Root exception is
[Default] java.net.ConnectException: Connection refused: connect
You've got further. :-)
First, I wouldn't add ../../deploy to the classpath
you will lose the ability to hot-deploy
I think your problem now is due to the two
phase startup of jboss's services
Phase I creates all services
Phase II starts all services (including linking to other
You are looking for the Queue after the QueueMananger
is created (phase I), but before the Queue is bound
into jndi (phase II).
I think this would work with JBoss3, because most
services are now one phase.
Even if that failed, you can specify an MBean dependency
to force a specific order.
There are a number of ways to get this to work.
The easiest is to implement JBoss's service interface
which will let you take part in the two phase processing.
You put your code in startService();