Package com.sun.ejb.containers

Examples of com.sun.ejb.containers.BaseContainer


                    final Object bundleDescriptor = moduleInfo.getMetaData(EjbBundleDescriptorImpl.class.getName());
                    if (bundleDescriptor instanceof EjbBundleDescriptorImpl) {
                        final Collection<EjbDescriptor> ejbs = ((EjbBundleDescriptorImpl)bundleDescriptor).getEjbs();

                        for (final EjbDescriptor ejb : ejbs) {
                            final BaseContainer ejbContainer = EjbContainerUtilImpl.getInstance().getContainer(ejb.getUniqueId());
                            try {
                                AccessController.doPrivileged(new PrivilegedExceptionAction() {
                                    @Override
                                    public Object run() throws Exception {
                                        final Method registerInterceptorMethod =
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

            }

            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

    public Object createObject()
        throws IOException
    {
      Object result = null;
      BaseContainer container = EjbContainerUtilImpl.getInstance().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 = EjbContainerUtilImpl.getInstance().getContainer(containerId);
        if (container != null) {
            this.haEnabled = container.isHAEnabled();
        }
        remoteBusinessInterface = remoteBusinessInterfaceName;
        instanceKey = new byte[keySize];
        System.arraycopy(objKey, EJBObjectOutputStreamHandler.INSTANCEKEY_OFFSET,
                instanceKey, 0, keySize);
View Full Code Here

   
    public Object createObject()
        throws IOException
    {
        Object result = null;
        BaseContainer container = EjbContainerUtilImpl.getInstance().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

        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

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

    AbstractSerializableS1ASEJBReference(long containerId) {
  this.containerId = containerId;
  BaseContainer container = EjbContainerUtilImpl.getInstance().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

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

    AbstractSerializableS1ASEJBReference(long containerId) {
  this.containerId = containerId;
  BaseContainer container = EjbContainerUtilImpl.getInstance().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 = EjbContainerUtilImpl.getInstance().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

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.