Package org.apache.geronimo.gbean.annotation

Examples of org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory


* @version $Rev: 789622 $ $Date: 2009-06-30 16:51:31 +0800 (Tue, 30 Jun 2009) $
*/
public class GBeanInfoTest extends TestCase {

    public void testJettyPOJOWebServiceHolder() throws Exception {
        new AnnotationGBeanInfoFactory().getGBeanInfo(POJOWebServiceHolderWrapper.class);
//        new POJOWebServiceHolderWrapper();
    }
View Full Code Here


        new AnnotationGBeanInfoFactory().getGBeanInfo(POJOWebServiceHolderWrapper.class);
//        new POJOWebServiceHolderWrapper();
    }

    public void testJettyContainerImpl() throws Exception {
        new AnnotationGBeanInfoFactory().getGBeanInfo(JettyContainerImpl.class);
        ServerInfo serverInfo = new BasicServerInfo(".");
        new JettyContainerImpl(null, null, null, serverInfo);
    }
View Full Code Here

        containerData.setAttribute("catalinaHome", new File(BASEDIR, "target/var/catalina").toString());
        containerData.setReferencePattern("EngineGBean", engine.getAbstractName());
        containerData.setReferencePattern("ServerInfo", serverInfo.getAbstractName());
        AbstractName containerName = containerData.getAbstractName();

        GBeanData connector = bootstrap.addGBean("TomcatConnector", new AnnotationGBeanInfoFactory().getGBeanInfo(Http11ConnectorGBean.class));
        connector.setAttribute("name", "HTTP");
        connector.setAttribute("port", new Integer(8181));
        connector.setReferencePattern("TomcatContainer", containerName);
        connector.setReferencePattern("ServerInfo", serverInfo.getAbstractName());
View Full Code Here

    }

    private GBeanInfo getConnectorGBeanInfo(Connector conn) {

        String className = conn.getProtocolHandlerClassName();
        AnnotationGBeanInfoFactory annotationGbeanInfoFactory=new AnnotationGBeanInfoFactory();
       
       
            // BIO
            if (className.equalsIgnoreCase("org.apache.coyote.http11.Http11Protocol")) {
                if (conn.getScheme().equalsIgnoreCase("https"))

                    return annotationGbeanInfoFactory.getGBeanInfo(Https11ConnectorGBean.class);

                else
                    return annotationGbeanInfoFactory.getGBeanInfo(Http11ConnectorGBean.class);
            }

            // NIO
            if (className.equalsIgnoreCase("org.apache.coyote.http11.Http11NioProtocol")) {
                if (conn.getScheme().equalsIgnoreCase("https"))
                    return annotationGbeanInfoFactory.getGBeanInfo(Https11NIOConnectorGBean.class);
                else
                    return annotationGbeanInfoFactory.getGBeanInfo(Http11NIOConnectorGBean.class);
            }

            // AJP
            if (className.equalsIgnoreCase("org.apache.coyote.ajp.AjpAprProtocol")) {

                return annotationGbeanInfoFactory.getGBeanInfo(AJP13ConnectorGBean.class);
            }

            if (className.equalsIgnoreCase("org.apache.jk.server.JkCoyoteHandler")) {

                return annotationGbeanInfoFactory.getGBeanInfo(AJP13ConnectorGBean.class);
            }

            // Apr
            if (className.equalsIgnoreCase("org.apache.coyote.http11.Http11AprProtocol")) {
                if (conn.getScheme().equalsIgnoreCase("https"))
                    return annotationGbeanInfoFactory.getGBeanInfo(Https11APRConnectorGBean.class);
            else
                return annotationGbeanInfoFactory.getGBeanInfo(Http11APRConnectorGBean.class);
            }
   

        return null;
    }
View Full Code Here

            if (oldConnectorNames!=null) {
                return;
            }
           
            List<AbstractName> connectorNames = new ArrayList<AbstractName>();
            GBeanInfo gBeanInfo = new AnnotationGBeanInfoFactory().getGBeanInfo(ActiveMQTransportConnector.class);
            for (TransportConnector transportConnector : brokerService.getTransportConnectors()) {
                AbstractName connectorAbName = kernel.getNaming().createSiblingName(this.abstractName, transportConnector.getUri().toString().replace(':', '_'), GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
                GBeanData gbeanData = new GBeanData(connectorAbName, gBeanInfo);
                gbeanData.setAttribute("transportConnector", transportConnector);
                kernel.loadGBean(gbeanData, bundleContext);
View Full Code Here

* @version $Rev: 995315 $ $Date: 2010-09-09 13:33:39 +0800 (Thu, 09 Sep 2010) $
*/
public class GBeanInfoTest extends TestCase {

    public void testJettyContainerImpl() throws Exception {
        new AnnotationGBeanInfoFactory().getGBeanInfo(JettyContainerImpl.class);
        ServerInfo serverInfo = new BasicServerInfo(".");
        new JettyContainerImpl(null, null, null, null, serverInfo);
    }
View Full Code Here

        assertEquals("black/black", GBeanFormatBinding.format("{bar}/{bar}", map));
        assertEquals("java:white/test/black/test", GBeanFormatBinding.format("java:{foo}/test/{bar}/test", map));
    }

    public void testGBeanInfos() throws Exception {
        GBeanInfoFactory f = new AnnotationGBeanInfoFactory();
        GBeanInfo info = f.getGBeanInfo(ResourceBinding.class);
        info = f.getGBeanInfo(GBeanFormatBinding.class);
    }
View Full Code Here

* @version $Rev: 882333 $ $Date: 2009-11-19 17:21:48 -0500 (Thu, 19 Nov 2009) $
*/
public class GBeanInfoTest extends TestCase {

    public void testJettyPOJOWebServiceHolder() throws Exception {
        new AnnotationGBeanInfoFactory().getGBeanInfo(POJOWebServiceHolderWrapper.class);
//        new POJOWebServiceHolderWrapper();
    }
View Full Code Here

        new AnnotationGBeanInfoFactory().getGBeanInfo(POJOWebServiceHolderWrapper.class);
//        new POJOWebServiceHolderWrapper();
    }

    public void testJettyContainerImpl() throws Exception {
        new AnnotationGBeanInfoFactory().getGBeanInfo(JettyContainerImpl.class);
        ServerInfo serverInfo = new BasicServerInfo(".");
        new JettyContainerImpl(null, null, null, null, serverInfo);
    }
View Full Code Here

    protected void setUp() throws Exception {
        gbeanType = new GbeanType();
        gbeanType.setName("name");
       
        attributeName = "bean";
        gbeanInfo = new AnnotationGBeanInfoFactory().getGBeanInfo(TestGBean.class);
        beanInfo = gbeanInfo.getAttribute(attributeName);
        serviceInfo = gbeanInfo.getAttribute("service");
        intInfo = gbeanInfo.getAttribute("intValue");
        collectionInfo = gbeanInfo.getAttribute("collection");
        fooInfo = gbeanInfo.getAttribute("foo");
View Full Code Here

TOP

Related Classes of org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory

Copyright © 2018 www.massapicom. 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.