public void waitForNoMoreInvocations () { this.log.debug ("Waiting that the container " + container.getJmxName () + " finishes its running invocations. " + this.runningHomeInvocations + " current home invocations and " + this.runningInvocations + " current remote invocations."); purgeRunningInvocations (); if (isDebugEnabled) log.debug ("... Done: no more remote invocations currently running in this container."); }
/** * cleanup ENC on shutdown * */ public void cleanENC() { ENCFactory.getEncById().remove(getJmxName()); }
/** * push the ENC onto the stack so that java:comp works * */ public void pushENC() { ENCFactory.pushContextId(getJmxName()); }
protected void entryPromotion(LRUCacheEntry entry) { if (trace) log.trace("entryPromotion, entry="+entry); // The cache is full, temporarily increase it if (m_count == m_capacity && m_capacity >= m_maxCapacity) { ++m_capacity; log.warn("Cache has reached maximum capacity for container " + m_cache.getContainer().getJmxName() + " - probably because all instances are in use. " + "Temporarily increasing the size to " + m_capacity); } } protected void entryAdded(LRUCacheEntry entry)
public void destroy() { super.destroy (); this.log.debug ("Destroying container " + container.getJmxName ().toString () + ". " + this.runningHomeInvocations + " current home invocations and " + this.runningInvocations + " current remote invocations."); forbidInvocations() ; }
public void stop() { super.stop (); this.log.debug ("Stopping container " + container.getJmxName () + ". " + this.runningHomeInvocations + " current home invocations and " + this.runningInvocations + " current remote invocations."); forbidInvocations (); }
/** * Stops all the containers of this application. */ @Override protected void stopService() throws Exception { ListIterator iter = containerOrdering.listIterator(containerOrdering.size()); while (iter.hasPrevious()) { Container con = (Container) iter.previous(); try { ObjectName jmxName = con.getJmxName(); // The container may already be destroyed so validate metaData BeanMetaData metaData = con.getBeanMetaData(); String ejbName = metaData != null ? metaData.getEjbName() : "Unknown"; log.debug("stopService, stopping container: " + ejbName); serviceController.stop(jmxName); } catch (Exception e) { log.error("unexpected exception stopping Container: " + con.getJmxName(), e); } // end of try-catch } }
protected void destroyInstancePool() { // Destroy pool instancePool.destroy(); instancePool.setContainer(null); try { ObjectName containerName = super.getJmxName(); Hashtable props = containerName.getKeyPropertyList(); props.put("plugin", "pool"); ObjectName poolName = new ObjectName(containerName.getDomain(), props); server.unregisterMBean(poolName); } catch (Throwable ignore) { } }
/** creates a new instance pool */ protected void createInstancePool() throws Exception { // Try to register the instance pool as an MBean try { ObjectName containerName = super.getJmxName(); Hashtable props = containerName.getKeyPropertyList(); props.put("plugin", "pool"); ObjectName poolName = new ObjectName(containerName.getDomain(), props); server.registerMBean(instancePool, poolName); } catch (Throwable t) { log.debug("Failed to register pool as mbean", t); } // Initialize pool instancePool.setContainer(this); instancePool.create(); }
try timerService = this.timerService.createTimerService(getJmxName(), pKey, this);
/** * Removes Timer Service for this container * * @param pKey Bean id * @throws IllegalStateException If the type of EJB is not allowed to use the timer service * * @jmx.managed-operation **/ public void removeTimerService(Object pKey) throws IllegalStateException { try { if (pKey != null) { // entity bean->remove() timerService.removeTimerService(getJmxName(), pKey); } else { // container stop, we choose whether active timers // should be persisted (default), or not (legacy) timerService.removeTimerService(getJmxName(), getBeanMetaData().getTimerPersistence()); } } catch (Exception e) { log.error("Could not remove timer service", e); } }
log.error("jmx name: " + container.getJmxName().toString()); log.error("invokerBinding: " + invokerBinding); log.error("Stack trace", new Throwable());
if (inter == null) log.debug ("Found an EJB that doesnt have a clean-shutdown interceptor: " + otherContainer.getJmxName ());
ObjectName containerName = super.getJmxName(); Hashtable props = containerName.getKeyPropertyList(); props.put("plugin", "pool"); ObjectName containerName = super.getJmxName(); Hashtable props = containerName.getKeyPropertyList(); props.put("plugin", "invoker");
try ObjectName containerName = super.getJmxName(); Hashtable props = containerName.getKeyPropertyList(); props.put("plugin", "invoker"); try ObjectName containerName = super.getJmxName(); Hashtable props = containerName.getKeyPropertyList(); props.put("plugin", "pool");
ObjectName jmxName = con.getJmxName();
serviceController.start(con.getJmxName());
try ObjectName containerName = super.getJmxName(); Hashtable props = containerName.getKeyPropertyList(); props.put("plugin", "cache"); try ObjectName containerName = super.getJmxName(); Hashtable props = containerName.getKeyPropertyList(); props.put("plugin", "pool");
public void create() throws Exception jmxName = container.getJmxName(); jmxNameHash = jmxName.hashCode(); jmxNameHashInteger = new Integer(jmxNameHash);
ObjectName jmxName = con.getJmxName(); int conState = con.getState(); boolean destroyContainer = true;