-
1. Re: Mbean
juhalindfors Apr 16, 2003 6:33 AM (in response to trigyn)Create a SAR archive, this is how all services are deployed to the server so just look at any .sar archive for details (or jboss-service.xml file).
-
2. Re: Mbean
trigyn Apr 21, 2003 2:09 AM (in response to trigyn)I have created a Mbean for startup (see attached files)
The name of .sar file is trigyn which I have placed in jboss/server/defualt/deploy. The sar contains the 2 classes and service xml
When i start the jboss server i am getting the foll error
11:29:36,832 ERROR [SARDeployer] create operation failed for package file:/D:/jboss-3.0.0/server/default/deploy/trigyn.sar
org.jboss.deployment.DeploymentException: Class does not expose a management interface: com.les.startup.StartupClass; - nested throwable: (javax.management.NotCompliantMBeanException: Class does not expose a management interface: com.les.startup.StartupClass)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:178)
at org.jboss.system.ServiceController.install(ServiceController.java:194)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org -
3. Re: Mbean
juhalindfors Apr 21, 2003 4:13 AM (in response to trigyn)Rename ServerStartupMBean to StartupClassMBean (spec requirement for Standard MBeans)
-
4. Re: Mbean
trigyn Apr 21, 2003 7:19 AM (in response to trigyn)Thanks juha,
Does my SAR need to contain the jar too?
coz my StartupClass (which implements StartupClassMBean ) calls another class ServerStartup which actaully loads the data ,ejb etc.
16:44:49,907 ERROR [MainDeployer] could not start deployment: file:/D:/jboss-3.0.0/server/default/deploy/trigyn.sar
java.lang.NoClassDefFoundError: com/les/util/ServerStartup
at com.les.startup.StartupClass.start(StartupClass.java:29)
at java.lang.reflect.Method.invoke(Native Method) -
5. Re: Mbean
juhalindfors Apr 21, 2003 7:39 AM (in response to trigyn)> Does my SAR need to contain the jar too?
> coz my StartupClass (which implements
> StartupClassMBean ) calls another class ServerStartup
> which actaully loads the data ,ejb etc.
Either include the jar inside the SAR or provide a tag as part of your xxx-service.xml:
Examples: