Re: [JBoss-user] Deploying scheduler after EAR deployment
On Thu, 20 Mar 2003 19:54, Marek Lange wrote: > That worked. Thanks. One question: is it possible to change the > scheduler attributes at runtime with this construction ? Did I just ignore this question or did I answer it? Think I ignored it :-) Which scheduler attributes? You can change the MBean attributes (programatically) at runtime and restart the scheduler (period and repetitions seem the only useful ones to change). You do have to call restartSchedule() for it to recognise the changes made. brian... --- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Deploying scheduler after EAR deployment
Hi all, what is the best way to configure JBoss to deploy the scheduler service after the deployment of the application during startup? The problem is that the scheduler uses classes which are included in the EAR. That is why JBoss throws a deployment error when starting: [ServiceConfigurator] Problem configuring service jboss:service=ModuleScheduler org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=SchedulableClass value=mypackage.MySchedulableImpl on mbean jboss:service=ModuleScheduler; - nested throwable: (java.security.InvalidParameterException: Given class mypackage.MySchedulableImpl is not valid or not found) Thanks for the hints, -marek --- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Deploying scheduler after EAR deployment
Brian Wallis schrieb: On Thu, 20 Mar 2003 01:12, Krishnakumar N wrote: You can do this by using the deployment sorters specified in /conf/jboss-service.xml. For example, you can use the PrefixDeploymentSorter and call your scheduler service xml 1blahblah.xml. Yep, that will work, but I think in a large project with multiple dependencies it gets hard to manage. There are other ways... If it is just classes that you need I would put the service.xml in a sar and add a Class-Path: entry to the manifest (and put the sar in the ear as well). ie: you have a sar file with META-INF/MANIFEST.MF META-INF/jboss-service.xml <-- your scheduler service.xml file MANIFEST.MF has a line like so: Class-Path: yourjar.jar This means the yourjar.jar should now be on your classpath when the scheduler is started. That worked. Thanks. One question: is it possible to change the scheduler attributes at runtime with this construction ? -marek --- This SF.net email is sponsored by: Tablet PC. Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Deploying scheduler after EAR deployment
I had to cludge my way around the deployment of a SAR and EJB from the same EAR to ensure that the Mbean did not use the EJB until the EAR deployment was complete. Even though the EJB was deployed first, the MBean in my SAR failed when looking up the JNDI name of the EJB. It seems like the JNDI names are not actually visible until after the whole contents of the EAR were deployed. Is the EAR deployment (and the JNDI names it registers) transactional in nature? -Original Message- From: Brian Wallis [mailto:[EMAIL PROTECTED] Sent: Thursday, 20 March 2003 10:58 a.m. To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Deploying scheduler after EAR deployment On Thu, 20 Mar 2003 01:12, Krishnakumar N wrote: > You can do this by using the deployment sorters specified in > /conf/jboss-service.xml. For example, you can use the > PrefixDeploymentSorter and call your scheduler service xml 1blahblah.xml. Yep, that will work, but I think in a large project with multiple dependencies it gets hard to manage. There are other ways... If it is just classes that you need I would put the service.xml in a sar and add a Class-Path: entry to the manifest (and put the sar in the ear as well). ie: you have a sar file with META-INF/MANIFEST.MF META-INF/jboss-service.xml <-- your scheduler service.xml file MANIFEST.MF has a line like so: Class-Path: yourjar.jar This means the yourjar.jar should now be on your classpath when the scheduler is started. If your scheduler requires another mbean to be available, make the scheduler mbean dependent on the other mbean like so: ot.notificationservice:name=DBCleaner cleanup( NOTIFICATION,DATE,SCHEDULER_NAME) NOW 3 -1 ot.notificationservice:name=DBCleaner Similar for ejbs where you can use the ejb mbean name in the dependency, usually a name something like jboss.j2ee:jndiName=ejb/notification/EFD,service=EJB brian wallis... --- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Deploying scheduler after EAR deployment
On Thu, 20 Mar 2003 01:12, Krishnakumar N wrote: > You can do this by using the deployment sorters specified in > /conf/jboss-service.xml. For example, you can use the > PrefixDeploymentSorter and call your scheduler service xml 1blahblah.xml. Yep, that will work, but I think in a large project with multiple dependencies it gets hard to manage. There are other ways... If it is just classes that you need I would put the service.xml in a sar and add a Class-Path: entry to the manifest (and put the sar in the ear as well). ie: you have a sar file with META-INF/MANIFEST.MF META-INF/jboss-service.xml <-- your scheduler service.xml file MANIFEST.MF has a line like so: Class-Path: yourjar.jar This means the yourjar.jar should now be on your classpath when the scheduler is started. If your scheduler requires another mbean to be available, make the scheduler mbean dependent on the other mbean like so: ot.notificationservice:name=DBCleaner cleanup( NOTIFICATION,DATE,SCHEDULER_NAME) NOW 3 -1 ot.notificationservice:name=DBCleaner Similar for ejbs where you can use the ejb mbean name in the dependency, usually a name something like jboss.j2ee:jndiName=ejb/notification/EFD,service=EJB brian wallis... --- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Deploying scheduler after EAR deployment
Hi, You can do this by using the deployment sorters specified in /conf/jboss-service.xml. For example, you can use the PrefixDeploymentSorter and call your scheduler service xml 1blahblah.xml. Cheers, Krishna -Original Message- From: Marek Lange [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 19, 2003 3:24 PM To: JBoss User Subject: [JBoss-user] Deploying scheduler after EAR deployment Hi all, what is the best way to configure JBoss to deploy the scheduler service after the deployment of the application during startup? The problem is that the scheduler uses classes which are included in the EAR. That is why JBoss throws a deployment error when starting: [ServiceConfigurator] Problem configuring service jboss:service=ModuleScheduler org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=SchedulableClass value=mypackage.MySchedulableImpl on mbean jboss:service=ModuleScheduler; - nested throwable: (java.security.InvalidParameterException: Given class mypackage.MySchedulableImpl is not valid or not found) Thanks for the hints, -marek --- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user