[Management, JMX/JBoss] - Re: Schedulable & jboss-service.xml
by rabbiaqaswar
Hello
Thanks for your reply. I tried the following:
| <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">org.schedular.MySchedular</attribute>
| <attribute name="SchedulableArguments">TheName,123456789</attribute>
| <attribute name="SchedulableArgumentTypes">java.lang.String,long</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">1000</attribute>
| <attribute name="InitialRepetitions">5</attribute>
| <attribute name="FixedRate">true</attribute>
| <depends>
| <mbean code="javax.management.timer.Timer" name="jboss:service=Timer"/>
| </depends>
| <depends>jboss.j2ee:module=SchedularProject-ejb.jar,service=EjbModule</depends>
| </mbean>
Now the scenario is:
1. Start JBoss after making the above changes in scheduler-service.xml and start JBoss, it will give the same error.
2. Deploy the jar file, the deployment will be successfull but the Scheduler is not invoked.
3. Stop JBoss and start it again, the error will not come and the Scheduler works.
How can I avoid the error in the first case i.e. when JBoss is started for the first time?
Many Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145388#4145388
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145388
18 years, 2 months
[Beginners Corner] - Re: ClassCastException accessing a DataSource
by jaikiran
"riflevolunteer" wrote : Hi
|
|
| The JNDI tree I cannot find I can find the JMXConsole but nowhere is there anything called jndiview as described in the wiki. Please advise.
|
|
Did you install JBoss, using the JEMS installer? Just this past week, we had a discussion about this where it turned out that JEMS installer does not configure the JNDIView ( http://www.jboss.com/index.html?module=bb&op=viewtopic&t=133889).
For JNDIView to be available, you will have to download the JBoss zip archive. Unzip it to some location (which does not contain a space in its folder name Ex: D:\JBoss), set JAVA_HOME and start the server.
My intention of asking you to post the contents of the jndi tree was to see what the datasource is being bound to. If re-installing JBoss, is not an option for you, can you try out the following piece of code from the client and post the output?
public static void main(String[] args) {
|
| try {
|
| InitialContext ic;
| Object ds = ic.lookup("MySqlDS");
| Class[] interfaces = ds.getClass().getInterfaces();
| System.out.println("Implemented interfaces: ");
| for (int i = 0; i < interfaces.length; i++) {
| System.out.println("*** " + interfaces);
| }
| }......
| //other stuff
| }
Let's see if this output gives us some clue.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145387#4145387
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145387
18 years, 2 months