This content has been marked as final.
Show 4 replies
-
1. Re: auto-testing my JBoss application
mikefinn Nov 7, 2004 9:58 PM (in response to danl_thompson)
If you're using Ant 1.6.x, you should be able to start JBoss using the exec task. Something like:<exec dir="/path/to/jboss-3.2.2/bin" executable="bash" spawn="true"> <arg line="run.sh"/> <arg line="-c default"/> </exec>
Stopping it would just be something like so:<arg line="shutdown.sh"/> <arg line="--server jnp://localhost:1099"/>
You could wait for it to be started by using waitfor task:<waitfor maxwait="5" maxwaitunit="minute" checkevery="500"> <http url="http://localhost:8080/jmx-console"/> </waitfor>
I would write a custom JSP page that checked to make sure everything you need was up (and return a 500 if not), unless someone knows of a call you could fabricate (like with the get task) to html adaptor to see if the server is 'done' starting.
To look for errors on startup or in log, you're best bet is to find/write a task that greps your logfile for errors.
HTH,
Mike -
2. Re: auto-testing my JBoss application
mikefinn Nov 7, 2004 10:01 PM (in response to danl_thompson)Sorry - if it wasn't clear, that custom JSP page I referred to would be called by the waitfor/http task instead of jmx-console. Fingers are typing faster than brain....
-
3. Re: auto-testing my JBoss application
danl_thompson Nov 8, 2004 9:01 PM (in response to danl_thompson)Thanks, nice and simple, just the way I like it.
Good job! -
4. Re: auto-testing my JBoss application
starksm64 Nov 8, 2004 9:28 PM (in response to danl_thompson)The testsuite/build.xml in the latest releases (4.0.1RC1, 3.2.7RC1) illustrates how we start/stop several jboss configurations to test clustering, customization of the tomcat container to use ssl, running jboss with a security manager, etc.