[jboss-user] [Management, JMX/JBoss] - Re: Managing JBoss programmatically?
BogusException
do-not-reply at jboss.com
Sat Aug 4 23:04:53 EDT 2007
PeterJ,
Thanks for writing, as always!
anonymous wrote : You are attempting to write a stand-alone Java application (one not deployed to JBoss AS) that you can use to deploy applications.
Not quite. I'm just looking for ideas as how to do this from within a deployed app on the same server.
I think it is becoming clear that having a local application running as the JBoss user and accessed via JCA would be overly complex and perhaps even impractical.
What might hold promise is JMX, as you suggest, but through a program like Maven. According to http://mojo.codehaus.org/jboss-maven-plugin/,
anonymous wrote : jboss:deploy Deploys a directory or file to JBoss via JMX, which would seem to fit the bill. Maven has 2 parts, though.. one for JBoss, and the stand-alone portion (command line exes).
Anyway, the objective is the same. I'd like to have pre-compiled (EJB3) classes jar'd, sar'd, etc. with any variables needed passed to them (via env, etc.) and copied to the ./deploy dir. Simply put, that has been the objective all along.
The rub seems to be getting a deployed app to interact with files outside the container. So to make a simple list of one possible action (we haven't discussed the logically inevitable undeploy) would be:
1. An EJB3 bean decides to, or is told to, deploy (for the purposes of this example) an EJB3 bean that will facilitate REGEX matching.
2. That bean communicates to an application outside the container (or...?) the name of the file(s) to be deployed, and the text of the match.
3. That app brings together the needed package, XML descriptors, env vars (like the regex match string), and creates the jar, sar, war, ear, etc.
4. That app then copies the archive to the ./deploy dir.
5. Done.
Yes, I know regex is a bad example, because you could pass the regex into the class with each request, but for this example we don't want to add that fat to every requesting class to pass via aever MDB... You get the point.
So with this strategy I can un-/deploy beans and services programmatically from within the deployed application(s).
TIA for any insights! :)
Bogus Exception
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070924#4070924
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070924
More information about the jboss-user
mailing list