Package org.jboss.as.demos

Examples of org.jboss.as.demos.DeploymentUtils.deploy()


    public static void main(String[] args) throws Exception {
        showInfo();
        DeploymentUtils utils = new DeploymentUtils("jpa-example.jar", SimpleStatelessSessionBean.class.getPackage());
        try {
            utils.addDeployment("jpa-mbean.sar", Test.class.getPackage());
            utils.deploy();

            /*
            InitialContext ctx = new InitialContext();
            SimpleStatelessSessionLocal bean = (SimpleStatelessSessionLocal) ctx.lookup("java:global/jpa-example/SimpleStatelessSessionBean!" + SimpleStatelessSessionLocal.class.getName());
            String msg = bean.echo("Hello world");
View Full Code Here


        try {
            utils.addDeployment("ejb3-rar.rar", SimpleQueueResourceAdapter.class.getPackage());
            utils.addDeployment("ejb3-mdb.jar", PostmanPatMDB.class.getPackage());
            utils.addDeployment("ejb3-example.jar", SimpleStatelessSessionBean.class.getPackage());
            utils.addDeployment("ejb3-mbean.sar", Test.class.getPackage());
            utils.deploy();

            MBeanServerConnection mbeanServer = utils.getConnection();

            SimpleStatelessSessionLocal bean = createProxy(mbeanServer, "java:global/ejb3-example/SimpleStatelessSessionBean!" + SimpleStatelessSessionLocal.class.getName(), SimpleStatelessSessionLocal.class);
            String msg = bean.echo("Hello world");
View Full Code Here

    public static void main(String[] args) throws Exception {
        DeploymentUtils deploymentUtils = null;

        try {
            deploymentUtils = new DeploymentUtils("ear-example.ear", ConfigService.class.getPackage());
            deploymentUtils.deploy();

        }finally{
            deploymentUtils.undeploy();
            safeClose(deploymentUtils);
View Full Code Here

        ModelControllerClient client = null;
        boolean actionsApplied = false;
        try {
            utils = new DeploymentUtils("fakejndi.sar", FakeJndi.class.getPackage());
            client = utils.getClient();
            utils.deploy();

            ModelNode op = new ModelNode();
            op.get("operation").set("add");
            op.get("address").add("subsystem", "messaging");
            op.get("address").add("hornetq-server", "default");
View Full Code Here

   public static void main(String[] args) throws Exception {
      DeploymentUtils utils = null;
      try {
         utils = new DeploymentUtils();
         utils.addWarDeployment("jaxrs-example.war", true, HelloWorldResource.class.getPackage());
         utils.deploy();
         performCall();
      } finally{
         utils.undeploy();
         safeClose(utils);
      }
View Full Code Here

    public static void main(String[] args) throws Exception {
        DeploymentUtils utils = null;
        try {
            utils = new DeploymentUtils("ds-mbean.sar", true, Test.class.getPackage());

            utils.deploy();
            ObjectName objectName = new ObjectName("jboss:name=test,type=ds");

            MBeanServerConnection mbeanServer = utils.getConnection();
            System.out.println("Calling TestMBean.test() on server");
            String s = (String) mbeanServer.invoke(objectName, "test", new Object[0], new String[0]);
View Full Code Here

    public static void main(String[] args) throws Exception {
        DeploymentUtils utils = null;
        try {
            utils = new DeploymentUtils();
            utils.addWarDeployment("ws-example.war", true, EndpointImpl.class.getPackage());
            utils.deploy();
            testWebServiceRef();
            testAccess();
        } finally {
            utils.undeploy();
            safeClose(utils);
View Full Code Here

            jar.addPackage(SimpleManagedBean.class.getPackage());
            ear.add(jar, "/", ZipExporter.class);

            utils = new DeploymentUtils(ear);

            utils.deploy();
            ObjectName objectName = new ObjectName("jboss:name=test,type=managedbean");
            MBeanServerConnection mbeanServer = utils.getConnection();
            System.out.println("Calling echo(\"Hello\")");
            Object o = mbeanServer.invoke(objectName, "echo", new Object[] { "Hello" }, new String[] { "java.lang.String" });
            System.out.println("echo returned " + o);
View Full Code Here

        DeploymentUtils utils = null;
        try {
            utils = new DeploymentUtils("serviceloader-example.jar", TestService.class.getPackage());
            utils.addDeployment("serviceloader-mbean.sar", Test.class.getPackage());

            utils.deploy();
            ObjectName objectName = new ObjectName("jboss:name=test,type=serviceloader");

            MBeanServerConnection mbeanServer = utils.getConnection();

            System.out.println("Calling TestMBean.decorateWithServiceLoader(\"Hello\") on server");
View Full Code Here

        DeploymentUtils utils = null;
        try {
            utils = new DeploymentUtils("messaging-mbean.sar", Test.class.getPackage());
            //utils.addDeployment("jms-mbean.sar", Test.class.getPackage());

            utils.deploy();
            ObjectName objectName = new ObjectName("jboss:name=test,type=messaging");

            MBeanServerConnection mbeanServer = utils.getConnection();

            Thread.sleep(1000);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.