[jboss-cvs] JBossAS SVN: r93646 - trunk/server/src/main/org/jboss/ejb.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 17 09:38:57 EDT 2009
Author: emuckenhuber
Date: 2009-09-17 09:38:57 -0400 (Thu, 17 Sep 2009)
New Revision: 93646
Modified:
trunk/server/src/main/org/jboss/ejb/ContainerMBean.java
trunk/server/src/main/org/jboss/ejb/EntityContainer.java
trunk/server/src/main/org/jboss/ejb/MessageDrivenContainer.java
trunk/server/src/main/org/jboss/ejb/StatefulSessionContainer.java
trunk/server/src/main/org/jboss/ejb/StatelessSessionContainer.java
Log:
merge rev 89854: Expose bean type in Container MBeans
Modified: trunk/server/src/main/org/jboss/ejb/ContainerMBean.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/ContainerMBean.java 2009-09-17 13:21:56 UTC (rev 93645)
+++ trunk/server/src/main/org/jboss/ejb/ContainerMBean.java 2009-09-17 13:38:57 UTC (rev 93646)
@@ -38,6 +38,13 @@
*/
EjbModule getEjbModule();
+ /**
+ * Gets the type of bean (Session, Entity, etc)
+ *
+ * @return type of bean
+ */
+ String getBeanTypeName();
+
/**
* @return Gets the number of create invocations that have been made
*/
Modified: trunk/server/src/main/org/jboss/ejb/EntityContainer.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/EntityContainer.java 2009-09-17 13:21:56 UTC (rev 93645)
+++ trunk/server/src/main/org/jboss/ejb/EntityContainer.java 2009-09-17 13:38:57 UTC (rev 93646)
@@ -115,7 +115,7 @@
* manage this instance.
*/
protected static GlobalTxEntityMap globalTxEntityMap = new GlobalTxEntityMap();
-
+
public static GlobalTxEntityMap getGlobalTxEntityMap()
{
return globalTxEntityMap;
@@ -349,7 +349,7 @@
EJBProxyFactory ci = (EJBProxyFactory)proxyFactories.get(invokerBinding);
ci.start();
}
-
+
// Start instance cache
instanceCache.start();
@@ -500,7 +500,7 @@
if (method != null && method.getName().equals("remove"))
{
// Map to EJBHome.remove(Object) to EJBObject.remove()
- InvocationType type = mi.getType();
+ InvocationType type = mi.getType();
if (type == InvocationType.HOME)
mi.setType(InvocationType.REMOTE);
else if (type == InvocationType.LOCALHOME)
@@ -548,7 +548,7 @@
EntityEnterpriseContext ctx = (EntityEnterpriseContext)mi.getEnterpriseContext();
getPersistenceManager().removeEntity(ctx);
- final Object pk = ctx.getId();
+ final Object pk = ctx.getId();
AccessController.doPrivileged(new PrivilegedAction<Object>()
{
public Object run()
@@ -557,7 +557,7 @@
return null;
}
});
-
+
// We signify "removed" with a null id
// There is no need to synchronize on the context since all the threads reaching here have
// gone through the InstanceInterceptor so the instance is locked and we only have one thread
@@ -880,6 +880,11 @@
{
}
+ public String getBeanTypeName()
+ {
+ return "Entity";
+ }
+
// Private -------------------------------------------------------
private void setupHomeMappingImpl(Method[] m,
Modified: trunk/server/src/main/org/jboss/ejb/MessageDrivenContainer.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/MessageDrivenContainer.java 2009-09-17 13:21:56 UTC (rev 93645)
+++ trunk/server/src/main/org/jboss/ejb/MessageDrivenContainer.java 2009-09-17 13:38:57 UTC (rev 93646)
@@ -95,6 +95,11 @@
return instancePool;
}
+ public String getBeanTypeName()
+ {
+ return "MDB";
+ }
+
public void addInterceptor(Interceptor in)
{
if (interceptor == null)
@@ -276,9 +281,9 @@
EJBProxyFactory ci = (EJBProxyFactory) proxyFactories.get(invokerBinding);
ci.start();
}
-
+
// Restore persisted ejb timers
- restoreTimers();
+ restoreTimers();
}
finally
{
Modified: trunk/server/src/main/org/jboss/ejb/StatefulSessionContainer.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/StatefulSessionContainer.java 2009-09-17 13:21:56 UTC (rev 93645)
+++ trunk/server/src/main/org/jboss/ejb/StatefulSessionContainer.java 2009-09-17 13:38:57 UTC (rev 93646)
@@ -411,6 +411,11 @@
throw new Error("Not Yet Implemented");
}
+ public String getBeanTypeName()
+ {
+ return "StatefulSession";
+ }
+
// Private -------------------------------------------------------
protected void setupHomeMapping() throws Exception
Modified: trunk/server/src/main/org/jboss/ejb/StatelessSessionContainer.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/StatelessSessionContainer.java 2009-09-17 13:21:56 UTC (rev 93645)
+++ trunk/server/src/main/org/jboss/ejb/StatelessSessionContainer.java 2009-09-17 13:38:57 UTC (rev 93646)
@@ -115,6 +115,11 @@
throw new UnreachableStatementException();
}
+ public String getBeanTypeName()
+ {
+ return "StatelessSession";
+ }
+
// Protected ----------------------------------------------------
protected void setupHomeMapping()
More information about the jboss-cvs-commits
mailing list