Hello folks,
I'm a fairly new to JBoss, and one of my first tasks in my new job is converting a small JBoss app from 2.x to 3.x. One of my stiicking points at the moment is deploying a service that was defined in the jboss.jcml file in 2.x:
Default=java:jdbc/Cornerstone <!-- ;Secondary=java:jdbc/Secondary -->
CornerstoneLocationFactory
The class CornerstoneStartup extends ServiceMBeanSupport. The jar this class exists in is in the the appropriate JBoss deploy/lib, so the server finding the class shouldn't be an issue.
Now to port to 3.x what I did was copy the mbean code shown above and placed it into a cstone-service.xml file and placed this in the deploy directory along with my other -service.xml files.
Default=java:jdbc/Cornerstone <!-- ;Secondary=java:jdbc/Secondary -->
CornerstoneLocationFactory
So here is the error I get on startup now:
13:40:44,078 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo@8dae3ad { url=file:/C:/dev/jboss-3.0.4/server/cstoneServerConfig/deploy/cstone-service.xml }
deployer: org.jboss.deployment.SARDeployer@25844f
status: Deployment FAILED reason: :service=CornerstoneStartup is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: :service=CornerstoneStartup is not registered.)
state: FAILED
watch: file:/C:/dev/jboss-3.0.4/server/cstoneServerConfig/deploy/cstone-service.xml
lastDeployed: 1042573222968
lastModified: 1042573222937
mbeans:
:service=CornerstoneStartup (state not available)
]MBeans waiting for classes:
MBeans waiting for other MBeans:
[ObjectName: :service=CornerstoneStartup
state: NOTYETINSTALLED
I Depend On:
Depends On Me: ]
The error doesn't make sense to me, because I thought that registering the service was precisely what this mbean was doing.
Now, am I correct that this should be moved into a -service.xml file in JBoss 3.x? I am sure I am missing something simple.
Thanks,
Dominic