Package org.apache.openejb

Examples of org.apache.openejb.Container


            // stop
            for (final BeanContext deployment : deployments) {
                final String deploymentID = String.valueOf(deployment.getDeploymentID());
                try {
                    final Container container = deployment.getContainer();
                    container.stop(deployment);
                } catch (final Throwable t) {
                    undeployException.getCauses().add(new Exception("bean: " + deploymentID + ": " + t.getMessage(), t));
                }
            }

            // undeploy
            for (final BeanContext bean : deployments) {
                final String deploymentID = String.valueOf(bean.getDeploymentID());
                try {
                    final Container container = bean.getContainer();
                    container.undeploy(bean);
                    bean.setContainer(null);
                } catch (final Throwable t) {
                    undeployException.getCauses().add(new Exception("bean: " + deploymentID + ": " + t.getMessage(), t));
                } finally {
                    bean.setDestroyed(true);
View Full Code Here


import org.apache.openejb.client.ServerMetaData;

public class BasicClusterableRequestHandler implements ClusterableRequestHandler {

    public void updateServer(BeanContext beanContext, ClusterableRequest req, ClusterableResponse res) {
        Container container = beanContext.getContainer();
        if (container instanceof ClusteredRPCContainer) {
            ClusteredRPCContainer clusteredContainer = (ClusteredRPCContainer) container;
            URI[] locations = clusteredContainer.getLocations(beanContext);
            if (null != locations) {
                ServerMetaData server = new ServerMetaData(locations);
View Full Code Here

        assertSame(springDataSource, exportedDS);

        //
        // Container
        //
        Container singletonContainer = containerSystem.getContainer("SpringDefinedSingletonContainer");
        assertTrue("singletonContainer should be an instance of SingletonContainer", singletonContainer instanceof org.apache.openejb.core.singleton.SingletonContainer);
        Container statelessContainer = containerSystem.getContainer("SpringDefinedStatelessContainer");
        assertTrue("statelessContainer should be an instance of StatelessContainer", statelessContainer instanceof org.apache.openejb.core.stateless.StatelessContainer);
        Container statefulContainer = containerSystem.getContainer("SpringDefinedStatefulContainer");
        assertTrue("statefulContainer should be an instance of StatefulContainer", statefulContainer instanceof org.apache.openejb.core.stateful.StatefulContainer);
        Container mdbContainer = containerSystem.getContainer("SpringDefinedMdbContainer");
        assertTrue("mdbContainer should be an instance of MdbContainer", mdbContainer instanceof org.apache.openejb.core.mdb.MdbContainer);
        Container bmpContainer = containerSystem.getContainer("SpringDefinedBmpContainer");
        assertTrue("bmpContainer should be an instance of BmpContainer", bmpContainer instanceof EntityContainer);
        Container cmpContainer = containerSystem.getContainer("SpringDefinedCmpContainer");
        assertTrue("cmpContainer should be an instance of CmpContainer", cmpContainer instanceof org.apache.openejb.core.cmp.CmpContainer);

        //
        // JNDI Context
        //
View Full Code Here

     *
     * @exception FinderException
     */
    public static void execute_void(Object obj, String methodSignature, Object... args) throws FinderException {
        BeanContext beanContext = (BeanContext) obj;
        Container container = beanContext.getContainer();
        if (!(container instanceof CmpContainer)) {
            throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
        }
        CmpContainer cmpContainer = (CmpContainer) container;
       
View Full Code Here

     *         one of the collection types.
     * @exception FinderException
     */
    public static Object execute_Object(Object obj, String methodSignature, String returnType, Object... args) throws FinderException {
        BeanContext beanContext = (BeanContext) obj;
        Container container = beanContext.getContainer();
        if (!(container instanceof CmpContainer)) {
            throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
        }
        CmpContainer cmpContainer = (CmpContainer) container;
       
View Full Code Here

    }
   
   
    public static char execute_char(Object obj, String methodSignature, Object... args) throws FinderException {
        BeanContext beanContext = (BeanContext) obj;
        Container container = beanContext.getContainer();
        if (!(container instanceof CmpContainer)) {
            throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
        }
        CmpContainer cmpContainer = (CmpContainer) container;
       
View Full Code Here

    }
   
   
    public static byte execute_byte(Object  obj, String methodSignature, Object... args) throws FinderException {
        BeanContext beanContext = (BeanContext) obj;
        Container container = beanContext.getContainer();
        if (!(container instanceof CmpContainer)) {
            throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
        }
        CmpContainer cmpContainer = (CmpContainer) container;
       
View Full Code Here

    }
   
   
    public static boolean execute_boolean(Object obj, String methodSignature, Object... args) throws FinderException {
        BeanContext beanContext = (BeanContext) obj;
        Container container = beanContext.getContainer();
        if (!(container instanceof CmpContainer)) {
            throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
        }
        CmpContainer cmpContainer = (CmpContainer) container;
       
View Full Code Here

    }
   
   
    public static short execute_short(Object obj, String methodSignature, Object... args) throws FinderException {
        BeanContext beanContext = (BeanContext) obj;
        Container container = beanContext.getContainer();
        if (!(container instanceof CmpContainer)) {
            throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
        }
        CmpContainer cmpContainer = (CmpContainer) container;
       
View Full Code Here

    }
   
   
    public static int execute_int(Object obj, String methodSignature, Object... args) throws FinderException {
        BeanContext beanContext = (BeanContext) obj;
        Container container = beanContext.getContainer();
        if (!(container instanceof CmpContainer)) {
            throw new FinderException("Deployment is not connected to a CmpContainer " + beanContext.getDeploymentID());
        }
        CmpContainer cmpContainer = (CmpContainer) container;
       
View Full Code Here

TOP

Related Classes of org.apache.openejb.Container

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.