Package com.sun.ejb.containers

Examples of com.sun.ejb.containers.BaseContainer


        if( refDesc.isLocal() ) {

            EjbDescriptor target = refDesc.getEjbDescriptor();
            ContainerFactory cf = Switch.getSwitch().getContainerFactory();
            BaseContainer container = (BaseContainer)
                cf.getContainer(target.getUniqueId());

            if( refDesc.isEJB30ClientView() ) {
                GenericEJBLocalHome genericLocalHome =
                    container.getEJBLocalBusinessHome();
                returnObject = genericLocalHome.create(refDesc.getEjbInterface());
            } else {
                returnObject = container.getEJBLocalHome();
            }

        } else {

            // For the Remote case, the only time we have to do
View Full Code Here


    protected static Logger _ejbLogger =
       LogDomains.getLogger(LogDomains.EJB_LOGGER);

    AbstractSerializableS1ASEJBReference(long containerId) {
  this.containerId = containerId;
  BaseContainer container = (BaseContainer) Switch.getSwitch().
      getContainerFactory().getContainer(containerId);
   
  //container can be null if the app has been undeployed
  //  after this was serialized
  if (container == null) {
      _ejbLogger.log(Level.WARNING, "ejb.base.io.EJBOutputStream.null_container: "
    + containerId);
      debugStr = "" + containerId;
  } else {
      debugStr = container.toString();
  }
    }
View Full Code Here

    public Object createObject()
        throws IOException
    {
  Object result = null;
  BaseContainer container = (BaseContainer) Switch.getSwitch().
      getContainerFactory().getContainer(containerId);
  //container can be null if the app has been undeployed
  //  after this was serialized
  if (container == null) {
      _ejbLogger.log(Level.WARNING, "ejb.base.io.EJBOutputStream.null_container "
    + debugStr);
      result = null;
  } else {
            // Note that we can assume it's a RemoteHome stub because an
            // application never sees a reference to the internal
            // Home for the Remote Business view.
      result = AbstractSerializableS1ASEJBReference.
                doRemoteRefClassLoaderConversion(container.getEJBHomeStub());
  }

  return result;
    }
View Full Code Here

    private String remoteBusinessInterface;

    SerializableS1ASEJBObjectReference(long containerId, byte[] objKey,
            int keySize, String remoteBusinessInterfaceName) {
        super(containerId);
        BaseContainer container = (BaseContainer) Switch.getSwitch()
                .getContainerFactory().getContainer(containerId);
        if (container != null) {
            this.haEnabled = container.isHAEnabled();
        }
        remoteBusinessInterface = remoteBusinessInterfaceName;
        instanceKey = new byte[keySize];
        System.arraycopy(objKey, EJBObjectOutputStream.INSTANCEKEY_OFFSET,
                instanceKey, 0, keySize);
View Full Code Here

   
    public Object createObject()
        throws IOException
    {
  Object result = null;
  BaseContainer container = (BaseContainer) Switch.getSwitch().
      getContainerFactory().getContainer(containerId);
  //container can be null if the app has been undeployed
  //  after this was serialized
  if (container == null) {
      _ejbLogger.log(Level.WARNING,
                           "ejb.base.io.EJBOutputStream.null_container: "
                           + debugStr);
      result = null;
  } else {
            try {
                if( remoteBusinessInterface == null ) {
                    java.rmi.Remote reference = container.
                        createRemoteReferenceWithId(instanceKey, null);
                    result = AbstractSerializableS1ASEJBReference.
                        doRemoteRefClassLoaderConversion(reference);
                       
                } else {

                    String generatedRemoteIntfName = EJBUtils.
                        getGeneratedRemoteIntfName(remoteBusinessInterface);

                    java.rmi.Remote remoteRef = container.
                        createRemoteReferenceWithId(instanceKey,
                                                    generatedRemoteIntfName);

                    java.rmi.Remote newRemoteRef =
                        AbstractSerializableS1ASEJBReference.
View Full Code Here

         //START CR 6653050
        //initialize webservice enpoints
        Iterator ec = myContainers.iterator();
        while(ec.hasNext()) {
            try {
                BaseContainer c = (BaseContainer)ec.next();
                c.initializeWebService();
            } catch (Exception exce) {
                 _logger.log(Level.SEVERE,
                        "loader.unexpected_error_while_creating_ejb_container",                        exce);

            // remove all loaded ejbs
            unloadEjbs(jsr77);

            return false;
           }
        }
        //END CR 6653050
        // notify ejb containers that application deployment succeeded.
        Iterator iter = myContainers.iterator();
        while ( iter.hasNext() ) {
            Container c = (Container) iter.next();
            c.doAfterApplicationDeploy();
            //IASRI 4717059 BEGIN
            /*
            if (robFlag) {
                if ( c instanceof EntityContainer) {
                    ( (EntityContainer) c).setROBNotifier(robNotifier);
View Full Code Here

        if (invMgr != null) {
            inv = invMgr.getCurrentInvocation();
        }
        if ((inv != null) && (inv.container != null)) {
            if (inv.container instanceof BaseContainer) {
          BaseContainer container = (BaseContainer) inv.container;
          container.checkUserTransactionLookup(inv);
      }
        }
        // UserTransactionImpl is mutable so return new instance
        return new UserTransactionImpl();
    }
View Full Code Here

            }

            long containerId = timer.getContainerId();

            // Timer might refer to an obsolete container.
            BaseContainer container = getContainer(containerId);
            if( container != null ) {
               
                // Update applicationId if it is null (from previous version)
                long appid = timer.getApplicationId();
                if (appid == 0) {
                    timer.setApplicationId(container.getApplicationId());
                }
                //  End update

                Date initialExpiration = timer.getInitialExpiration();
              
                // Create an instance of RuntimeTimerState.

                // Only access timedObjectPrimaryKey if timed object is
                // an entity bean.  That allows us to lazily load the underlying
                // blob for stateless session and message-driven bean timers.
                Object timedObjectPrimaryKey = null;
                if( container.getContainerType() == BaseContainer.ContainerType.ENTITY) {
                    timedObjectPrimaryKey = timer.getTimedObjectPrimaryKey();
                }

                RuntimeTimerState timerState = new RuntimeTimerState
                    (timerId, initialExpiration,
View Full Code Here

            }

            long containerId = timer.getContainerId();

            // Timer might refer to an obsolete container.
            BaseContainer container = getContainer(containerId);
            if( container != null ) {
               
                // Update applicationId if it is null (from previous version)
                long appid = timer.getApplicationId();
                if (appid == 0) {
                    timer.setApplicationId(container.getApplicationId());
                }
                //  End update

                Date initialExpiration = timer.getInitialExpiration();
              
                // Create an instance of RuntimeTimerState.

                // Only access timedObjectPrimaryKey if timed object is
                // an entity bean.  That allows us to lazily load the underlying
                // blob for stateless session and message-driven bean timers.
                Object timedObjectPrimaryKey = null;
                if( container.getContainerType() == BaseContainer.ContainerType.ENTITY) {
                    timedObjectPrimaryKey = timer.getTimedObjectPrimaryKey();
                }

                RuntimeTimerState timerState = new RuntimeTimerState
                    (timerId, initialExpiration,
View Full Code Here

        if( refDesc.isLocal() ) {

            EjbDescriptor target = refDesc.getEjbDescriptor();          

            BaseContainer container = EjbContainerUtilImpl.getInstance().getContainer(target.getUniqueId());

            if( refDesc.isEJB30ClientView() ) {
                GenericEJBLocalHome genericLocalHome =
                    container.getEJBLocalBusinessHome(refDesc.getEjbInterface());
                returnObject = genericLocalHome.create(refDesc.getEjbInterface());
            } else {
                returnObject = container.getEJBLocalHome();
            }

        } else {

            // For the Remote case, the only time we have to do
View Full Code Here

TOP

Related Classes of com.sun.ejb.containers.BaseContainer

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.