Package org.jboss.as.demos

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


        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


    public static void main(String[] args) throws Exception {
        DeploymentUtils utils = null;
        boolean ok = false;
        try {
            utils = new DeploymentUtils("jms-mbean.sar", Test.class.getPackage());
            utils.deploy();
            ObjectName objectName = new ObjectName("jboss:name=test,type=jms");

            MBeanServerConnection mbeanServer = utils.getConnection();

            System.out.println("Sending message: Test");
View Full Code Here

    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

    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

        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

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

            QueueConnectionFactory qcf = lookup(utils, "RemoteConnectionFactory", QueueConnectionFactory.class);
            Queue queue = lookup(utils, "queue/test", Queue.class);

            System.out.println("Got qcf " + qcf);
View Full Code Here

    public static void main(String[] args) throws Exception {
        DeploymentUtils utils = null;
        boolean ok = false;
        try {
            utils = new DeploymentUtils("jms-mbean.sar", Test.class.getPackage());
            utils.deploy();
            ObjectName objectName = new ObjectName("jboss:name=test,type=jms");

            MBeanServerConnection mbeanServer = utils.getConnection();

            System.out.println("Sending message: Test");
View Full Code Here

   public static void main(String[] args) throws Exception {
      DeploymentUtils utils = null;
      try {
         utils = new DeploymentUtils();
         utils.addWarDeployment("war-example.war", true, SimpleServlet.class.getPackage());
         utils.deploy();

         performCall("simple");
         performCall("legacy");
      } finally {
         utils.undeploy();
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

    public static void main(String[] args) throws Exception {
        DeploymentUtils utils = null;
        try {
            utils = new DeploymentUtils();
            utils.addDeployment("wsejb-example.jar", true, EndpointImpl.class.getPackage());
            utils.deploy();
            testWSDL();
            testSOAPCall();
        } finally {
            utils.undeploy();
            safeClose(utils);
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.