RE: [JBoss-user] Help with MBean
Forget about this... I am all set. Mitch -Original Message- From: Kim, Yong [mailto:Yong.Kim;Staples.com] Sent: Monday, November 11, 2002 4:43 PM To: '[EMAIL PROTECTED]' Subject: [JBoss-user] Help with MBean Hi, I am currently developing a service that will run under JBoss 3.x.x that's will open a server socket and processes the incoming XML packets... and I have decided to make it a MBean component... By the way, my service creates multiple internal threads as well that processes each XML packets. However, when I deploy the sar file, JBoss stops the startup process. It just displays the message saying my service has been started and stops right there. I think it is stuck in a endless loop where server socket waits and accepts the incoming XML packets... I thought that when a MBean gets deployed, it gets deployed as individual thread... am I wrong? Should it run in its own thread? Basically, the service is doing similar stuff as Jetty or Tomcat... If anyone is willing to help me with this issue, I will provided more detailed information... Thanks, Mitchell --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Help with MBean
The service lifecycle methods need to return promptly. If you want ongoing activity, do it in your own threads. david jencks On 2002.11.11 16:43:07 -0500 Kim, Yong wrote: Hi, I am currently developing a service that will run under JBoss 3.x.x that's will open a server socket and processes the incoming XML packets... and I have decided to make it a MBean component... By the way, my service creates multiple internal threads as well that processes each XML packets. However, when I deploy the sar file, JBoss stops the startup process. It just displays the message saying my service has been started and stops right there. I think it is stuck in a endless loop where server socket waits and accepts the incoming XML packets... I thought that when a MBean gets deployed, it gets deployed as individual thread... am I wrong? Should it run in its own thread? Basically, the service is doing similar stuff as Jetty or Tomcat... If anyone is willing to help me with this issue, I will provided more detailed information... Thanks, Mitchell --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] help w/ mbean deployment
Is the .ear already deployed when you deploy this *-service.xml file? Is this the complete log at debug level? I think the mbean waits for its class dependency only works in jboss 4. david jencks On 2002.09.21 18:55:16 -0400 G.L. Grobe wrote: Ok, after a few more found errors and fixes, still not able to deploy this mbean. Can anyone look this over to see where I'm going wrong? I have it packaged as a normal class file in my apps ejb.jar which is in the *.ear and the service file is below. Any help much appreciated. 19:14:04,140 INFO [MainDeployer] Starting deployment of package: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler-service.xml 19:14:04,318 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@23d7cabd{ url=file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler-service.xml, deployedLastModified=0 } org.jboss.deployment.DeploymentException: DefaultDomain:service=Scheduler is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: DefaultDomain:service=Scheduler is not registered.) at org.jboss.deployment.SARDeployer.create(SARDeployer.java:227) at org.jboss.deployment.MainDeployer.create(MainDeployer.java:755) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:615) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580) at java.lang.reflect.Method.invoke(Native Method) --- and here's the code to the mbean public class Scheduler extends org.jboss.system.ServiceMBeanSupport implements SchedulerMBean { private String name; private org.quartz.Scheduler sched; private static com.neuroquest.cais.log.Logger log = new com.neuroquest.cais.log.Logger(); public void createService() throws Exception { log.info(Scheduler.class, Creating MBean ...); SchedulerFactory schedFact = (SchedulerFactory) new StdSchedulerFactory(); sched = (org.quartz.Scheduler) schedFact.getScheduler(); return; } public String getName() { return Scheduler name = + name; } public void startService() throws Exception { sched.start(); log.info(Scheduler.class, Starting Scheduler Service MBean ...); } public void stopService() { try { sched.shutdown(); } catch (Exception e) { log.error(Scheduler.class, e.getMessage()); } log.info(Scheduler.class, Stopping Scheduler Service MBean ...); } } --- my *-services.xml ?xml version=1.0 encoding=UTF-8? server mbean code=com.neuroquest.cais.jmx.mbeans.scheduler.Scheduler name=DefaultDomain:service=Scheduler /mbean /server !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=iso-8859-1 META content=MSHTML 6.00.2719.2200 name=GENERATOR STYLE/STYLE /HEAD BODY bgColor=#ff DIVFONT face=Arial size=2Ok, after a few more found errorsnbsp;and fixes, still not able to deploy this mbean. Can anyone look this over to see where I'm going wrong? I have it packaged as a normal class file in my apps ejb.jar which is in the *.ear and the service file is below./FONT/DIV DIVFONT face=Arial size=2/FONTnbsp;/DIV DIVFONT face=Arial size=2Any help much appreciated./DIV DIVBR/DIV/FONT DIVFONT face=Arial size=2nbsp;19:14:04,140 INFOnbsp; [MainDeployer] Starting deployment of package: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler-service.xmlBR19:14:04,318 ERROR [URLDeploymentScanner] Failed to deploy: A href=mailto:org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@23d7cabd;org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@23d7cabd/A{ url=file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler-service.xml, deployedLastModified=0 }BRorg.jboss.deployment.DeploymentException: DefaultDomain:service=Scheduler is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: DefaultDomain:service=Scheduler is not registered.)BRnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; at org.jboss.deployment.SARDeployer.create(SARDeployer.java:227)BRnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; at org.jboss.deployment.MainDeployer.create(MainDeployer.java:755)BRnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:615)BRnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)BRnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; at java.lang.reflect.Method.invoke(Native Method)BR/FONT/DIV DIVFONT face=Arial size=2--- and here's the code to the mbean/FONT/DIV DIVFONT face=Arial size=2/FONTnbsp;/DIV DIVFONT face=Arial size=2public class Scheduler extends
Re: [JBoss-user] help w/ mbean deployment
Is this a requirement? Or should it work as included in my *.ear? Why not try and package the xml file, the Scheduler.class and SchedulerMBean.class, into a *.sar file ? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] help w/ mbean deployment
You don't have to package your classes + mbean dd (*-service.xml file) in a sar, but it makes sure the classes are available before the mbean is created. Otherwise you have to use jboss 4 or arrange that the classes are available when the *-service.xml file is processed. What happens if you deploy the ear, then deploy the *-service.xml? david jencks On 2002.09.21 22:16:09 -0400 G.L. Grobe wrote: No, it's not. Is the .ear already deployed when you deploy this *-service.xml file? Is this the complete log at debug level? I think the mbean waits for its class dependency only works in jboss 4. And after everything is deployed at the very end, I get the following ... 19:35:07,908 INFO [MainDeployer] Deployed package: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis_mgr-0.30b.ear 19:35:07,929 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()' Cause: Incomplete Deployment listing: Packages waiting for a deployer: none Incompletely deployed packages: [org.jboss.deployment.DeploymentInfo@23d7cabd { url=file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler- service.xml } deployer: org.jboss.deployment.SARDeployer@f4fb3 status: Deployment FAILED reason: DefaultDomain:service=Scheduler is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: DefaultDomain:service=Scheduler is not registered.) state: FAILED watch: file:/u/public/jboss/jboss-3.0.2/server/default/deploy/acaiis-scheduler-serv ice.xml lastDeployed: 1032651247707 lastModified: 1032651247000 mbeans: DefaultDomain:service=Scheduler (state not available) ]MBeans waiting for classes: none MBeans waiting for other MBeans: [ObjectName: DefaultDomain:service=Scheduler state: NOTYETINSTALLED I Depend On: Depends On Me: ] 19:35:07,985 INFO [URLDeploymentScanner] Started 19:35:07,987 INFO [MainDeployer] Deployed package: file:/u/public/jboss/jboss-3.0.2/server/default/conf/jboss-service.xml 19:35:08,026 INFO [Server] JBoss (MX MicroKernel) [3.0.2 Date:200208271339] Started in 2m:34s:39ms --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user