Package org.apache.catalina.deploy

Examples of org.apache.catalina.deploy.NamingResources.addResource()


       
        // cannot use side-efects.  It's removed and added back each time
        // there is a modification in a resource.
        NamingResources nr = cr.getNamingResources();
        nr.removeResource(cr.getName());
        nr.addResource(cr);
    }
   
}
View Full Code Here


                ("Invalid resource name - already exists'" + resourceName + "'");
        }
        resource = new ContextResource();
        resource.setName(resourceName);
        resource.setType(type);
        nresources.addResource(resource);
       
        // Return the corresponding MBean name
        ManagedBean managed = registry.findManagedBean("ContextResource");
        ObjectName oname =
            MBeanUtils.createObjectName(managed.getDomain(), resource);
View Full Code Here

        NamingResources resources = new NamingResources();
        ContextResource res = new ContextResource();
        res.setName("jdbc/Emp");
        res.setType("javax.sql.DataSource");
        res.setAuth("Container");
        resources.addResource(res);
        String aspectedResult = "<GlobalNamingResources>" + LF.LINE_SEPARATOR
                + "  <Resource" + LF.LINE_SEPARATOR + "    auth=\"Container\""
                + LF.LINE_SEPARATOR + "    name=\"jdbc/Emp\""
                + LF.LINE_SEPARATOR + "    type=\"javax.sql.DataSource\"/>"
                + LF.LINE_SEPARATOR + "</GlobalNamingResources>"
View Full Code Here

        ContextResource res = new ContextResource();
        res.setName("mail/MailSession");
        res.setType("javax.mail.Session");
        res.setAuth("Container");
        res.setProperty("mail.host", "localhost");
        resources.addResource(res);
        String aspectedResult = "<GlobalNamingResources>" + LF.LINE_SEPARATOR
                + "  <Resource" + LF.LINE_SEPARATOR + "    auth=\"Container\""
                + LF.LINE_SEPARATOR + "    name=\"mail/MailSession\""
                + LF.LINE_SEPARATOR + "    type=\"javax.mail.Session\""
                + LF.LINE_SEPARATOR + "    mail.host=\"localhost\"/>"
View Full Code Here

        NamingResources resources = new NamingResources();
        ContextResource res = new ContextResource();
        res.setName("jdbc/Emp");
        res.setType("javax.sql.DataSource");
        res.setAuth("Container");
        resources.addResource(res);
        String aspectedResult = "<GlobalNamingResources>" + LF.LINE_SEPARATOR
                + "  <Resource" + LF.LINE_SEPARATOR + "    auth=\"Container\""
                + LF.LINE_SEPARATOR + "    name=\"jdbc/Emp\""
                + LF.LINE_SEPARATOR + "    type=\"javax.sql.DataSource\"/>"
                + LF.LINE_SEPARATOR + "</GlobalNamingResources>"
View Full Code Here

        ContextResource res = new ContextResource();
        res.setName("mail/MailSession");
        res.setType("javax.mail.Session");
        res.setAuth("Container");
        res.setProperty("mail.host", "localhost");
        resources.addResource(res);
        String aspectedResult = "<GlobalNamingResources>" + LF.LINE_SEPARATOR
                + "  <Resource" + LF.LINE_SEPARATOR + "    auth=\"Container\""
                + LF.LINE_SEPARATOR + "    name=\"mail/MailSession\""
                + LF.LINE_SEPARATOR + "    type=\"javax.mail.Session\""
                + LF.LINE_SEPARATOR + "    mail.host=\"localhost\"/>"
View Full Code Here

                ("Invalid resource name - already exists'" + resourceName + "'");
        }
        resource = new ContextResource();
        resource.setName(resourceName);
        resource.setType(type);
        nresources.addResource(resource);
       
        // Return the corresponding MBean name
        ManagedBean managed = registry.findManagedBean("ContextResource");
        ObjectName oname =
            MBeanUtils.createObjectName(managed.getDomain(), resource);
View Full Code Here

                ("Invalid resource name - already exists'" + resourceName + "'");
        }
        resource = new ContextResource();
        resource.setName(resourceName);
        resource.setType(type);
        nresources.addResource(resource);
       
        // Return the corresponding MBean name
        ManagedBean managed = registry.findManagedBean("ContextResource");
        ObjectName oname =
            MBeanUtils.createObjectName(managed.getDomain(), resource);
View Full Code Here

       
        // cannot use side-efects.  It's removed and added back each time
        // there is a modification in a resource.
        NamingResources nr = cr.getNamingResources();
        nr.removeResource(cr.getName());
        nr.addResource(cr);
    }
   
}
View Full Code Here

                ("Invalid resource name - already exists'" + resourceName + "'");
        }
        resource = new ContextResource();
        resource.setName(resourceName);
        resource.setType(type);
        nresources.addResource(resource);
       
        // Return the corresponding MBean name
        ManagedBean managed = registry.findManagedBean("ContextResource");
        ObjectName oname =
            MBeanUtils.createObjectName(managed.getDomain(), resource);
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.