-
1. Re: How can I run a batch job when start Jboss in eclipse?
wolfgangknauf Jun 15, 2011 7:26 AM (in response to eric.v.frey)Hi,
do you use Eclipse Web Tools Platform, or do you use JBoss Tools plugin?
If you use the WTP plugin: take a look at the file "%ECLIPSE_HOME%\plugins\org.eclipse.jst.server.generic.jboss_1.6.1.v200904151730\servers\jboss5.serverdef": here you find the configuration for the JBoss startup job:
{code:xml}
<start> <mainClass>org.jboss.Main</mainClass> <workingDirectory>${serverRootDirectory}/bin</workingDirectory> <programArguments>-c ${serverConfig}</programArguments> <vmParameters>-Dprogram.name=run.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m</vmParameters> <classpathReference>jboss</classpathReference> </start> {code}
Maybe this is a starting point to do further research. You might call e.g. a custom java program which performs your tasks and then chains the server startup call.
I know that this is not the solution for your question, but hopefully it provides some startup help.
Wolfgang
-
2. Re: How can I run a batch job when start Jboss in eclipse?
eric.v.frey Jun 15, 2011 10:32 PM (in response to wolfgangknauf)I know that this is not the solution for your question, but hopefully it provides some startup help.
Actually, this is really the solution of my problem. And I use jboss byteman to intercept this main method. start a proecess and call my bat file.
Other things I can do might be writting my own eclipse plugin and handle the behavior the wtp jboss plugin, which is too far from what I want.
do you use Eclipse Web Tools Platform?
Yes I use WTP, in the server settting tab, there's a section called Ant Publisher Properties, it seems you can specify an Ant build file before launching the server, is it right? How to use that function, whenever I specify a build file, it says property not found.
-
3. Re: How can I run a batch job when start Jboss in eclipse?
wolfgangknauf Jun 17, 2011 8:51 AM (in response to eric.v.frey)Sorry, never used the "Ant publisher properties" options ;-).
Wolfgang