Author: julien(a)jboss.com
Date: 2007-03-15 22:27:26 -0400 (Thu, 15 Mar 2007)
New Revision: 6707
Added:
trunk/jems/src/main/org/jboss/portal/test/jems/ClassicService.java
Removed:
trunk/jems/src/main/org/jboss/portal/jems/as/system/POJOServiceModelMBean.java
Modified:
trunk/jems/src/main/org/jboss/portal/jems/as/system/JBossServiceModelMBean.java
trunk/jems/src/main/org/jboss/portal/test/jems/POJOService.java
trunk/jems/src/resources/pojo-service-sar/META-INF/jboss-service.xml
Log:
actually merge the pojo service adapter with the jboss service adapter and make the
decision at metadata build time wether to have the resource manage the state or manage it
externally
Modified: trunk/jems/src/main/org/jboss/portal/jems/as/system/JBossServiceModelMBean.java
===================================================================
---
trunk/jems/src/main/org/jboss/portal/jems/as/system/JBossServiceModelMBean.java 2007-03-16
01:53:48 UTC (rev 6706)
+++
trunk/jems/src/main/org/jboss/portal/jems/as/system/JBossServiceModelMBean.java 2007-03-16
02:27:26 UTC (rev 6707)
@@ -24,7 +24,11 @@
import org.apache.log4j.Logger;
import org.jboss.mx.modelmbean.ModelMBeanInvoker;
+import org.jboss.mx.server.InvocationContext;
+import org.jboss.mx.server.Invocation;
+import org.jboss.mx.interceptor.AbstractInterceptor;
import org.jboss.portal.common.mx.JavaBeanModelMBeanBuilder;
+import org.jboss.portal.common.util.Tools;
import org.jboss.system.ServiceMBeanSupport;
import org.w3c.dom.Element;
@@ -33,6 +37,15 @@
import javax.management.MBeanInfo;
import javax.management.modelmbean.InvalidTargetObjectTypeException;
import javax.management.modelmbean.ModelMBeanInfo;
+import javax.management.modelmbean.ModelMBeanOperationInfo;
+import javax.management.modelmbean.ModelMBeanInfoSupport;
+import javax.management.modelmbean.ModelMBeanAttributeInfo;
+import javax.management.modelmbean.ModelMBeanConstructorInfo;
+import javax.management.modelmbean.ModelMBeanNotificationInfo;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+import java.util.Iterator;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -41,40 +54,171 @@
public class JBossServiceModelMBean extends ModelMBeanInvoker
{
-// Attributes ----------------------------------------------------
+ // Attributes ----------------------------------------------------
private static final Logger log = Logger.getLogger(JBossServiceModelMBean.class);
// Constructors --------------------------------------------------
- public JBossServiceModelMBean(Object resource, ModelMBeanInfo info) throws
MBeanException
+ private final boolean pojo;
+
+ private final ServiceMBeanSupport support = new ServiceMBeanSupport()
{
- try
+ protected void createService() throws Exception
{
- setManagedResource(resource, "ObjectReference");
- setModelMBeanInfo(info);
+ execute("create");
}
- catch (InstanceNotFoundException e)
+ protected void startService() throws Exception
{
- throw new MBeanException(e);
+ execute("start");
}
- catch (InvalidTargetObjectTypeException e)
+ protected void stopService() throws Exception
{
- throw new MBeanException(e, "Unsupported resource type: " +
resourceType);
+ execute("stop");
}
- }
+ protected void destroyService() throws Exception
+ {
+ execute("destroy");
+ }
+ private void execute(String lifecycle) throws Exception
+ {
+ Method m = null;
+ try
+ {
+ m = getResource().getClass().getMethod(lifecycle, new Class[0]);
+ }
+ catch (NoSuchMethodException ignore)
+ {
+ }
- public JBossServiceModelMBean(Object resource) throws MBeanException
- {
- this(resource, null, null);
- }
+ //
+ if (m != null)
+ {
+ try
+ {
+ m.invoke(getResource(), new Object[0]);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new Error(e);
+ }
+ catch (InvocationTargetException e)
+ {
+ Throwable t = e.getTargetException();
+ if (t instanceof Exception)
+ {
+ throw (Exception)t;
+ }
+ else if (t instanceof Error)
+ {
+ throw (Error)t;
+ }
+ else
+ {
+ throw new Error(t);
+ }
+ }
+ }
+ }
+ };
public JBossServiceModelMBean(Object resource, Element config, String version) throws
MBeanException
{
try
{
setManagedResource(resource, "ObjectReference");
- ModelMBeanInfo info = JavaBeanModelMBeanBuilder.build(resource.getClass(),
ServiceMBeanSupport.class);
+
+ //
+ pojo = !(resource instanceof ServiceMBeanSupport);
+
+ // Build
+ ModelMBeanInfo info = JavaBeanModelMBeanBuilder.build(resource.getClass(), pojo
? Object.class : ServiceMBeanSupport.class);
+
+ //
+ if (pojo)
+ {
+ //
+ List mmois = Tools.toList(info.getOperations());
+ List mmais = Tools.toList(info.getAttributes());
+
+ //
+ boolean createExists = false;
+ boolean startExists = false;
+ boolean stopExists = false;
+ boolean destroyExists = false;
+ boolean getStateExists = false;
+ boolean getStateStringExists = false;
+ for (int i = 0;i < mmois.size();i++)
+ {
+ ModelMBeanOperationInfo mmoi = (ModelMBeanOperationInfo)mmois.get(i);
+ if (mmoi.getSignature().length == 0)
+ {
+ if (mmoi.getName().equals("create"))
+ {
+ createExists = true;
+ }
+ else if (mmoi.getName().equals("start"))
+ {
+ startExists = true;
+ }
+ else if (mmoi.getName().equals("stop"))
+ {
+ stopExists = true;
+ }
+ else if (mmoi.getName().equals("destroy"))
+ {
+ destroyExists = true;
+ }
+ else if (mmoi.getName().equals("getState"))
+ {
+ getStateExists = true;
+ }
+ else if (mmoi.getName().equals("getStateString"))
+ {
+ getStateStringExists = true;
+ }
+ }
+ }
+
+ //
+ if (!createExists)
+ {
+ mmois.add(templateInfo.getOperation("create"));
+ }
+ if (!startExists)
+ {
+ mmois.add(templateInfo.getOperation("start"));
+ }
+ if (!stopExists)
+ {
+ mmois.add(templateInfo.getOperation("stop"));
+ }
+ if (!destroyExists)
+ {
+ mmois.add(templateInfo.getOperation("destroy"));
+ }
+ if (!getStateExists)
+ {
+ mmois.add(templateInfo.getOperation("getState"));
+ mmais.add(templateInfo.getAttribute("State"));
+ }
+ if (!getStateStringExists)
+ {
+ mmois.add(templateInfo.getOperation("getStateString"));
+ mmais.add(templateInfo.getAttribute("StateString"));
+ }
+
+ //
+ info = new ModelMBeanInfoSupport(
+ info.getClassName(),
+ info.getDescription(),
+ (ModelMBeanAttributeInfo[])mmais.toArray(new
ModelMBeanAttributeInfo[mmais.size()]),
+ (ModelMBeanConstructorInfo[])info.getConstructors(),
+ (ModelMBeanOperationInfo[])mmois.toArray(new
ModelMBeanOperationInfo[mmois.size()]),
+ (ModelMBeanNotificationInfo[])info.getNotifications());
+ }
+
+ //
setModelMBeanInfo(info);
}
catch (InstanceNotFoundException e)
@@ -102,4 +246,155 @@
{
return info;
}
+
+ //
+
+
+ protected void initDispatchers()
+ {
+ super.initDispatchers();
+
+ //
+ if (pojo)
+ {
+ //
+ for (Iterator i = attributeContextMap.values().iterator();i.hasNext();)
+ {
+ InvocationContext ctx = (InvocationContext)i.next();
+ if ("State".equals(ctx.getName()))
+ {
+ ctx.setDispatcher(new AbstractInterceptor()
+ {
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ return new Integer(support.getState());
+ }
+ });
+ }
+ else if ("StateString".equals(ctx.getName()))
+ {
+ ctx.setDispatcher(new AbstractInterceptor()
+ {
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ return support.getStateString();
+ }
+ });
+ }
+ }
+
+ //
+ for (Iterator i = operationContextMap.values().iterator();i.hasNext();)
+ {
+ InvocationContext ctx = (InvocationContext)i.next();
+ if ("create".equals(ctx.getName()))
+ {
+ ctx.setDispatcher(new AbstractInterceptor()
+ {
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ support.create();
+ return null;
+ }
+ });
+ }
+ else if ("start".equals(ctx.getName()))
+ {
+ ctx.setDispatcher(new AbstractInterceptor()
+ {
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ support.start();
+ return null;
+ }
+ });
+ }
+ else if ("stop".equals(ctx.getName()))
+ {
+ ctx.setDispatcher(new AbstractInterceptor()
+ {
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ support.stop();
+ return null;
+ }
+ });
+ }
+ else if ("destroy".equals(ctx.getName()))
+ {
+ ctx.setDispatcher(new AbstractInterceptor()
+ {
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ support.destroy();
+ return null;
+ }
+ });
+ }
+ else if ("getState".equals(ctx.getName()))
+ {
+ ctx.setDispatcher(new AbstractInterceptor()
+ {
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ return new Integer(support.getState());
+ }
+ });
+ }
+ else if ("getStateString".equals(ctx.getName()))
+ {
+ ctx.setDispatcher(new AbstractInterceptor()
+ {
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ return support.getStateString();
+ }
+ });
+ }
+ }
+ }
+ }
+
+ static
+ {
+ try
+ {
+ templateInfo = JavaBeanModelMBeanBuilder.build(Template.class, Object.class);
+ }
+ catch (Exception e)
+ {
+ throw new Error(e);
+ }
+ }
+
+ /** . */
+ private static final ModelMBeanInfo templateInfo;
+
+ private static class Template
+ {
+ public int getState()
+ {
+ throw new UnsupportedOperationException();
+ }
+ public String getStateString()
+ {
+ throw new UnsupportedOperationException();
+ }
+ public void create()
+ {
+ throw new UnsupportedOperationException();
+ }
+ public void start()
+ {
+ throw new UnsupportedOperationException();
+ }
+ public void stop()
+ {
+ throw new UnsupportedOperationException();
+ }
+ public void destroy()
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
}
Deleted: trunk/jems/src/main/org/jboss/portal/jems/as/system/POJOServiceModelMBean.java
===================================================================
---
trunk/jems/src/main/org/jboss/portal/jems/as/system/POJOServiceModelMBean.java 2007-03-16
01:53:48 UTC (rev 6706)
+++
trunk/jems/src/main/org/jboss/portal/jems/as/system/POJOServiceModelMBean.java 2007-03-16
02:27:26 UTC (rev 6707)
@@ -1,395 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.jems.as.system;
-
-import org.jboss.mx.modelmbean.ModelMBeanInvoker;
-import org.jboss.mx.server.InvocationContext;
-import org.jboss.mx.server.Invocation;
-import org.jboss.mx.interceptor.AbstractInterceptor;
-import org.jboss.portal.common.mx.JavaBeanModelMBeanBuilder;
-import org.jboss.portal.common.util.Tools;
-import org.jboss.system.ServiceMBeanSupport;
-import org.apache.log4j.Logger;
-import org.w3c.dom.Element;
-
-import javax.management.modelmbean.ModelMBeanInfo;
-import javax.management.modelmbean.InvalidTargetObjectTypeException;
-import javax.management.modelmbean.ModelMBeanInfoSupport;
-import javax.management.modelmbean.ModelMBeanOperationInfo;
-import javax.management.modelmbean.ModelMBeanAttributeInfo;
-import javax.management.modelmbean.ModelMBeanConstructorInfo;
-import javax.management.modelmbean.ModelMBeanNotificationInfo;
-import javax.management.MBeanException;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanInfo;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanOperationInfo;
-import javax.management.MBeanParameterInfo;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Iterator;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 5448 $
- */
-public class POJOServiceModelMBean extends ModelMBeanInvoker
-{
-
-// Attributes ----------------------------------------------------
-
- private static final Logger log = Logger.getLogger(POJOServiceModelMBean.class);
-
- // Constructors --------------------------------------------------
-
- private boolean createExists;
- private boolean startExists;
- private boolean stopExists;
- private boolean destroyExists;
- private boolean getStateExists;
- private boolean getStateStringExists;
-
- private final ServiceMBeanSupport support = new ServiceMBeanSupport()
- {
- protected void createService() throws Exception
- {
- execute("create");
- }
- protected void startService() throws Exception
- {
- execute("start");
- }
- protected void stopService() throws Exception
- {
- execute("stop");
- }
- protected void destroyService() throws Exception
- {
- execute("destroy");
- }
- private void execute(String lifecycle) throws Exception
- {
- Method m = null;
- try
- {
- m = getResource().getClass().getMethod(lifecycle, new Class[0]);
- }
- catch (NoSuchMethodException ignore)
- {
- }
-
- //
- if (m != null)
- {
- try
- {
- m.invoke(getResource(), new Object[0]);
- }
- catch (IllegalAccessException e)
- {
- throw new Error(e);
- }
- catch (InvocationTargetException e)
- {
- Throwable t = e.getTargetException();
- if (t instanceof Exception)
- {
- throw (Exception)t;
- }
- else if (t instanceof Error)
- {
- throw (Error)t;
- }
- else
- {
- throw new Error(t);
- }
- }
- }
- }
- };
-
- public POJOServiceModelMBean(Object resource, Element config, String version) throws
MBeanException
- {
- try
- {
- setManagedResource(resource, "ObjectReference");
-
- // Build
- ModelMBeanInfo info = JavaBeanModelMBeanBuilder.build(resource.getClass(),
Object.class);
-
- //
- List mmois = Tools.toList(info.getOperations());
- List mmais = Tools.toList(info.getAttributes());
-
- //
- for (int i = 0;i < mmois.size();i++)
- {
- ModelMBeanOperationInfo mmoi = (ModelMBeanOperationInfo)mmois.get(i);
- if (mmoi.getSignature().length == 0)
- {
- if (mmoi.getName().equals("create"))
- {
- createExists = true;
- }
- else if (mmoi.getName().equals("start"))
- {
- startExists = true;
- }
- else if (mmoi.getName().equals("stop"))
- {
- stopExists = true;
- }
- else if (mmoi.getName().equals("destroy"))
- {
- destroyExists = true;
- }
- else if (mmoi.getName().equals("getState"))
- {
- getStateExists = true;
- }
- else if (mmoi.getName().equals("getStateString"))
- {
- getStateStringExists = true;
- }
- }
- }
-
- //
- if (!createExists)
- {
- mmois.add(templateInfo.getOperation("create"));
- }
- if (!startExists)
- {
- mmois.add(templateInfo.getOperation("start"));
- }
- if (!stopExists)
- {
- mmois.add(templateInfo.getOperation("stop"));
- }
- if (!destroyExists)
- {
- mmois.add(templateInfo.getOperation("destroy"));
- }
- if (!getStateExists)
- {
- mmois.add(templateInfo.getOperation("getState"));
- mmais.add(templateInfo.getAttribute("State"));
- }
- if (!getStateStringExists)
- {
- mmois.add(templateInfo.getOperation("getStateString"));
- mmais.add(templateInfo.getAttribute("StateString"));
- }
-
- //
- info = new ModelMBeanInfoSupport(
- info.getClassName(),
- info.getDescription(),
- (ModelMBeanAttributeInfo[])mmais.toArray(new
ModelMBeanAttributeInfo[mmais.size()]),
- (ModelMBeanConstructorInfo[])info.getConstructors(),
- (ModelMBeanOperationInfo[])mmois.toArray(new
ModelMBeanOperationInfo[mmois.size()]),
- (ModelMBeanNotificationInfo[])info.getNotifications());
-
- //
- setModelMBeanInfo(info);
- }
- catch (InstanceNotFoundException e)
- {
- throw new MBeanException(e);
- }
- catch (InvalidTargetObjectTypeException e)
- {
- throw new MBeanException(e, "Unsupported resource type: " +
resourceType);
- }
- catch (Exception e)
- {
- throw new MBeanException(e);
- }
- }
-
- // ModelMBean implementation -------------------------------------
-
- public boolean isSupportedResourceType(Object resource, String resourceType)
- {
- return "ObjectReference".equals(resourceType);
- }
-
- public MBeanInfo getMBeanInfo()
- {
- return info;
- }
-
- //
-
-
- protected void initDispatchers()
- {
- super.initDispatchers();
-
- //
- for (Iterator i = attributeContextMap.values().iterator();i.hasNext();)
- {
- InvocationContext ctx = (InvocationContext)i.next();
- if ("State".equals(ctx.getName()))
- {
- ctx.setDispatcher(new AbstractInterceptor()
- {
- public Object invoke(Invocation invocation) throws Throwable
- {
- return new Integer(support.getState());
- }
- });
- }
- else if ("StateString".equals(ctx.getName()))
- {
- ctx.setDispatcher(new AbstractInterceptor()
- {
- public Object invoke(Invocation invocation) throws Throwable
- {
- return support.getStateString();
- }
- });
- }
- }
-
- //
- for (Iterator i = operationContextMap.values().iterator();i.hasNext();)
- {
- InvocationContext ctx = (InvocationContext)i.next();
- if ("create".equals(ctx.getName()))
- {
- ctx.setDispatcher(new AbstractInterceptor()
- {
- public Object invoke(Invocation invocation) throws Throwable
- {
- support.create();
- return null;
- }
- });
- }
- else if ("start".equals(ctx.getName()))
- {
- ctx.setDispatcher(new AbstractInterceptor()
- {
- public Object invoke(Invocation invocation) throws Throwable
- {
- support.start();
- return null;
- }
- });
- }
- else if ("stop".equals(ctx.getName()))
- {
- ctx.setDispatcher(new AbstractInterceptor()
- {
- public Object invoke(Invocation invocation) throws Throwable
- {
- support.stop();
- return null;
- }
- });
- }
- else if ("destroy".equals(ctx.getName()))
- {
- ctx.setDispatcher(new AbstractInterceptor()
- {
- public Object invoke(Invocation invocation) throws Throwable
- {
- support.destroy();
- return null;
- }
- });
- }
- else if ("getState".equals(ctx.getName()))
- {
- ctx.setDispatcher(new AbstractInterceptor()
- {
- public Object invoke(Invocation invocation) throws Throwable
- {
- return new Integer(support.getState());
- }
- });
- }
- else if ("getStateString".equals(ctx.getName()))
- {
- ctx.setDispatcher(new AbstractInterceptor()
- {
- public Object invoke(Invocation invocation) throws Throwable
- {
- return support.getStateString();
- }
- });
- }
- }
- }
-
- static
- {
- try
- {
- templateInfo = JavaBeanModelMBeanBuilder.build(Template.class, Object.class);
- }
- catch (Exception e)
- {
- throw new Error(e);
- }
- }
-
- /** . */
- private static ModelMBeanInfo templateInfo;
-
- private static class Template
- {
- public int getState()
- {
- throw new UnsupportedOperationException();
- }
- public String getStateString()
- {
- throw new UnsupportedOperationException();
- }
- public void create()
- {
- throw new UnsupportedOperationException();
- }
- public void start()
- {
- throw new UnsupportedOperationException();
- }
- public void stop()
- {
- throw new UnsupportedOperationException();
- }
- public void destroy()
- {
- throw new UnsupportedOperationException();
- }
- }
-
-}
Added: trunk/jems/src/main/org/jboss/portal/test/jems/ClassicService.java
===================================================================
--- trunk/jems/src/main/org/jboss/portal/test/jems/ClassicService.java
(rev 0)
+++ trunk/jems/src/main/org/jboss/portal/test/jems/ClassicService.java 2007-03-16 02:27:26
UTC (rev 6707)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.jems;
+
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ClassicService extends AbstractJBossService
+{
+
+ /** . */
+ private String string;
+
+ protected void createService()
+ {
+ System.out.println("create callback");
+ }
+
+ protected void startService()
+ {
+ System.out.println("start callback");
+ }
+
+ protected void stopService()
+ {
+ System.out.println("stop callback");
+ }
+
+ protected void destroyService()
+ {
+ System.out.println("destroy callback");
+ }
+
+ public void operation()
+ {
+ System.out.println("operation called");
+ }
+
+ public String getString()
+ {
+ return string;
+ }
+
+ public void setString(String string)
+ {
+ this.string = string;
+ }
+}
Modified: trunk/jems/src/main/org/jboss/portal/test/jems/POJOService.java
===================================================================
--- trunk/jems/src/main/org/jboss/portal/test/jems/POJOService.java 2007-03-16 01:53:48
UTC (rev 6706)
+++ trunk/jems/src/main/org/jboss/portal/test/jems/POJOService.java 2007-03-16 02:27:26
UTC (rev 6707)
@@ -28,6 +28,10 @@
*/
public class POJOService
{
+
+ /** . */
+ private String string;
+
public void create()
{
System.out.println("create callback");
@@ -47,4 +51,19 @@
{
System.out.println("destroy callback");
}
+
+ public void operation()
+ {
+ System.out.println("operation called");
+ }
+
+ public String getString()
+ {
+ return string;
+ }
+
+ public void setString(String string)
+ {
+ this.string = string;
+ }
}
Modified: trunk/jems/src/resources/pojo-service-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/jems/src/resources/pojo-service-sar/META-INF/jboss-service.xml 2007-03-16
01:53:48 UTC (rev 6706)
+++ trunk/jems/src/resources/pojo-service-sar/META-INF/jboss-service.xml 2007-03-16
02:27:26 UTC (rev 6707)
@@ -29,7 +29,16 @@
code="org.jboss.portal.test.jems.POJOService"
name="portal.test:service=POJO"
xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.POJOServiceModelMBean">
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
</mbean>
+
+ <!-- -->
+ <mbean
+ code="org.jboss.portal.test.jems.ClassicService"
+ name="portal.test:service=Classic"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
</server>