Package org.jboss.as.demos

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


    public static void main(String[] args) throws Exception {
        DeploymentUtils deploymentUtils = null;
        try {
            deploymentUtils = new DeploymentUtils("sar-example.sar", ConfigService.class.getPackage());

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

            MBeanServerConnection mbeanServer = deploymentUtils.getConnection();

            //A little sleep to give the logging done by the bean time to kick in
View Full Code Here


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

            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

    public static void main(String[] args) throws Exception {
        DeploymentUtils utils = new DeploymentUtils("ejb3-example.jar", SimpleStatelessSessionBean.class.getPackage());
        try {
            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 utils = null;
        try {
            utils = new DeploymentUtils();
            utils.addWarDeployment("ws-example.war", true, EndpointImpl.class.getPackage());
            utils.deploy();
            testWSDL();
            testSOAPCall();
            testWebServiceRef();
        } finally {
            utils.undeploy();
View Full Code Here

        //TODO Don't do this FakeJndi stuff once we have remote JNDI working
        DeploymentUtils utils = null;
        boolean actionsApplied = false;
        try {
            utils = new DeploymentUtils("fakejndi.sar", FakeJndi.class.getPackage());
            utils.deploy();

            ModelNode op = new ModelNode();
            op.get("operation").set("add");
            op.get("address").add("subsystem", "jms");
            op.get("address").add("queue", QUEUE_NAME);
View Full Code Here

        DeploymentUtils utils = null;
        try {
            utils = new DeploymentUtils("rar-example.rar", true, HelloWorldConnection.class.getPackage());
            utils.addDeployment("rar-mbean.sar", true, Test.class.getPackage());

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


            //System.out.println(utils.showJndi());
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

        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

        QueueSession session = null;
        //TODO Don't do this FakeJndi stuff once we have remote JNDI working
        try {
            utils = new DeploymentUtils("fakejndi.sar", FakeJndi.class.getPackage());
            utils.addWarDeployment("webapp-example.war", SimpleServlet.class.getPackage());
            utils.deploy();

            QueueConnectionFactory qcf = lookup(utils, "RemoteConnectionFactory", QueueConnectionFactory.class);
            Queue queue = lookup(utils, "queue/test", Queue.class);
            conn = qcf.createQueueConnection();
            conn.start();
View Full Code Here

        DeploymentUtils utils = null;
        final ModelControllerClient client = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999);
        try {
            utils = new DeploymentUtils();
            utils.addWarDeployment("war-example.war", true, SimpleServlet.class.getPackage());
            utils.deploy();

            // Create the test connector
            createTestConnector(client);

            URLConnection conn = null;
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.