I've found solution:
| public void doDeploy() {
| try {
| getServer().invoke(
| new
ObjectName("jboss.deployment:flavor=URL,type=DeploymentScanner"),
| "addURL",
| new Object[] { "file:/E:/Work/ear/my_ear_name.ear" },
| new String[] { "java.lang.String" });
| } catch(Exception e) {}
| }
| //--------------
| private MBeanServerConnection getServer() {
| if (mBeanServer == null) {
| try {
| Properties props = new Properties();
| props.put("java.naming.factory.initial",
|
"org.jnp.interfaces.NamingContextFactory");
| props.put("ava.naming.factory.url.pkgs",
|
"org.jboss.naming:org.jnp.interfaces");
| props.put("java.naming.provider.url",
"localhost:1199"); //jnp://
|
| InitialContext ctx = new InitialContext(props);
| mBeanServer = (MBeanServerConnection) ctx
|
.lookup("jmx/invoker/RMIAdaptor");
| } catch (Exception e) {
| e.printStackTrace();
| mBeanServer = null;
| }
| }
| return mBeanServer;
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885437#3885437
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885437
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user