final long getContainerId() { return ejbDescriptor.getUniqueId(); }
private org.omg.CORBA.Object _createRef( ReferenceFactory rf, byte[] instanceKey, String repoid ) throws Exception { if ( logger.isLoggable(Level.FINE) ) { logger.log(Level.FINE, "\t\tIn POARemoteReferenceFactory._createRef, repositoryId = {0}", repoid); } // Create the ejbKey using EJB's unique id + instanceKey byte[] ejbKey = createEJBKey(ejbDescriptor.getUniqueId(), instanceKey); org.omg.CORBA.Object obj = rf.createReference( ejbKey ) ; return obj; }
public SerializableObjectFactory getSerializableObjectFactory() { return new SerializableLocalHome( container.getEjbDescriptor().getUniqueId()); }
result = (cid == ejbDescriptor.getUniqueId() ); .append(keyLen).append("+").append(INSTANCEKEY_OFFSET) .append("; myContainrID: ") .append(ejbDescriptor.getUniqueId()) .append("; obj.containerID: ") .append(cid);
/** * Called from EJBUtils.EJBObjectOutputStream.replaceObject */ public SerializableObjectFactory getSerializableObjectFactory() { // Note: for stateful SessionBeans, the EJBLocalObjectImpl contains // a pointer to the EJBContext. We should not serialize it here. return new SerializableLocalObject (container.getEjbDescriptor().getUniqueId(), isLocalHomeView, isOptionalLocalBusinessView, primaryKey, getSfsbClientVersion()); }
_logger.log( Level.FINE, "EjbDeployer BEAN ID? " + ejbDescriptor.getUniqueId()); _logger.log( Level.FINE, "EjbDeployer TimerService: " + timerService); _logger.log( Level.FINE, "EjbDeployer - calling timerService.createSchedules for " + ejbDescriptor.getUniqueId()); timerService.createSchedules(ejbDescriptor.getUniqueId(), ejbDescriptor.getApplication().getUniqueId(), schedules, owner); _logger.log( Level.FINE, "EjbDeployer Done With BEAN ID: " + ejbDescriptor.getUniqueId());
/** * Sets the unique id for this application. It traverses through all * the ejbs in the application and sets the unique id for each of them. * The traversal is done in ascending element order. * * NOTE : assumption is that the id has already been left shifted 16 * bits to allow space for the component ids. * * @param id unique id for this application */ public void setUniqueId(long id) { _logger.log(Level.FINE, "[Application] " + getName() + " , uid: " + id); this.uniqueId = id; EjbDescriptor[] descs = getSortedEjbDescriptors(); for (int i = 0; i < descs.length; i++) { // Maximum of 2^16 beans max per application descs[i].setUniqueId((id | i)); if (_logger.isLoggable(Level.FINE)) { String module = descs[i].getEjbBundleDescriptor().getModuleDescriptor().getArchiveUri(); _logger.log(Level.FINE, "Ejb " + module + ":" + descs[i].getName() + " id = " + descs[i].getUniqueId()); } } uniqueIdSet = true; }
public EJBTimerServiceWrapper(EJBTimerService timerService, EJBContextImpl ejbContext) { timerService_ = timerService; ejbContext_ = ejbContext; BaseContainer container = (BaseContainer) ejbContext.getContainer(); containerId_ = container.getEjbDescriptor().getUniqueId(); applicationId_ = container.getEjbDescriptor().getApplication().getUniqueId(); entity_ = false; timedObjectPrimaryKey_ = null; }
/** * Sets the unique id for this application. It traverses through all * the ejbs in the application and sets the unique id for each of them. * The traversal is done in ascending element order. * * NOTE : assumption is that the id has already been left shifted 16 * bits to allow space for the component ids. * * @param id unique id for this application */ public void setUniqueId(long id) { _logger.log(Level.FINE, "[Application] " + getName() + " , uid: " + id); this.uniqueId = id; EjbDescriptor[] descs = getSortedEjbDescriptors(); for (int i = 0; i < descs.length; i++) { // Maximum of 2^16 beans max per application descs[i].setUniqueId((id | i)); if (_logger.isLoggable(Level.FINE)) { String module = descs[i].getEjbBundleDescriptor().getModuleDescriptor().getArchiveUri(); _logger.log(Level.FINE, "Ejb " + module + ":" + descs[i].getName() + " id = " + descs[i].getUniqueId()); } } uniqueIdSet = true; }
String storeName = ejbDescriptor.getName() + "-" + ejbDescriptor.getUniqueId() + "-BackingStore"; subDirName += ejbDescriptor.getName() + "-" + ejbDescriptor.getUniqueId(); conf.setShortUniqueName(""+ejbDescriptor.getUniqueId()).setStoreName(storeName) .setStoreType(persistenceStoreType) .setBaseDirectory(new File(ejbContainerConfig.getSessionStore(), subDirName))
for(EjbDescriptor ejb : ejbBundle.getEjbs()) { BaseContainer container = EjbContainerUtilImpl.getInstance().getContainer(ejb.getUniqueId()); container.registerSystemInterceptor(systemInterceptor);
for(EjbDescriptor ejb : ejbBundle.getEjbs()) { BaseContainer container = EjbContainerUtilImpl.getInstance().getContainer(ejb.getUniqueId()); container.registerSystemInterceptor(systemInterceptor);
Long.toString(ejbDescriptor.getUniqueId()) + "_RHome"; String id = Long.toString(ejbDescriptor.getUniqueId()) + "_RBusiness" + "_" + genRemoteIntf.getName(); + "; containerId: " + ejbDescriptor.getUniqueId(); _logger.log(Level.FINE, "Instantiated container for: " + _debugDescription);
public static void testCreate(String timerId, EJBContext context, String ownerId, Date initialExpiration, long intervalDuration, Serializable info) throws CreateException { TimerLocal timerLocal = getEJBTimerService().getTimerLocal(); EjbDescriptor ejbDesc = ((EJBContextImpl) context).getContainer().getEjbDescriptor(); long containerId = ejbDesc.getUniqueId(); long applicationId = ejbDesc.getApplication().getUniqueId(); Object timedObjectPrimaryKey = (context instanceof EntityContext) ? ((EntityContext)context).getPrimaryKey() : null; TimerConfig timerConfig = new TimerConfig(); timerConfig.setInfo(info); timerLocal.createTimer(timerId, containerId, applicationId, ownerId, timedObjectPrimaryKey, initialExpiration, intervalDuration, null, timerConfig); return; }
+ ID_SEPARATOR + ejbEnv.getName() + ID_SEPARATOR + flattedJndiName + ejbEnv.getUniqueId();
+ ejbBundle.getModuleDescriptor().getArchiveUri() + ID_SEPARATOR + ejbEnv.getName() + ID_SEPARATOR + flattedJndiName + ejbEnv.getUniqueId();
public static Object resolveEjbRefObject(EjbReferenceDescriptor refDesc, Object jndiObj) throws NamingException { Object returnObject = jndiObj; 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 // something extra with the given jndiObj is if the lookup // is for a Remote 3.0 object and it was made through a // corba interoperable name. In that case, // the jndiObj refers to the internal Remote 3.0 Home so we // still need to create a remote 30 client wrapper object. if ( refDesc.isEJB30ClientView() && !(jndiObj instanceof RemoteBusinessWrapperBase) ) { returnObject = EJBUtils.lookupRemote30BusinessObject (jndiObj, refDesc.getEjbInterface()); } } return returnObject; }
public static Object resolveEjbRefObject(EjbReferenceDescriptor refDesc, Object jndiObj) throws NamingException { Object returnObject = jndiObj; 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 // something extra with the given jndiObj is if the lookup // is for a Remote 3.0 object and it was made through a // corba interoperable name. In that case, // the jndiObj refers to the internal Remote 3.0 Home so we // still need to create a remote 30 client wrapper object. if ( refDesc.isEJB30ClientView() && !(jndiObj instanceof RemoteBusinessWrapperBase) ) { returnObject = EJBUtils.lookupRemote30BusinessObject (jndiObj, refDesc.getEjbInterface()); } } return returnObject; }