[jboss-cvs] JBossAS SVN: r76064 - in projects/demos/trunk: jmx/src/resources/META-INF and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jul 21 13:08:26 EDT 2008


Author: alesj
Date: 2008-07-21 13:08:26 -0400 (Mon, 21 Jul 2008)
New Revision: 76064

Added:
   projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/AllPojos.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/CyclePojo.java
   projects/demos/trunk/models/src/resources/META-INF/alias-beans.xml
Modified:
   projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/JMXKernel.java
   projects/demos/trunk/jmx/src/resources/META-INF/varia-deployers-beans.xml
   projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/ExposePojo.java
   projects/demos/trunk/models/src/resources/META-INF/mbeans-service.xml
   projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml
Log:
Adding alias, since it's component as well.
Cycle beans - should be moved to IOC module.

Modified: projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/JMXKernel.java
===================================================================
--- projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/JMXKernel.java	2008-07-21 17:04:34 UTC (rev 76063)
+++ projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/JMXKernel.java	2008-07-21 17:08:26 UTC (rev 76064)
@@ -53,7 +53,7 @@
    {
       try
       {
-         CLASSLOADER_SYSTEM_OBJECT_NAME = new ObjectName("demos:type=ClassLoaderSystem");
+         CLASSLOADER_SYSTEM_OBJECT_NAME = new ObjectName("jboss.classloader:service=ClassLoaderSystem");
       }
       catch (MalformedObjectNameException e)
       {

Modified: projects/demos/trunk/jmx/src/resources/META-INF/varia-deployers-beans.xml
===================================================================
--- projects/demos/trunk/jmx/src/resources/META-INF/varia-deployers-beans.xml	2008-07-21 17:04:34 UTC (rev 76063)
+++ projects/demos/trunk/jmx/src/resources/META-INF/varia-deployers-beans.xml	2008-07-21 17:08:26 UTC (rev 76064)
@@ -4,6 +4,12 @@
 
   <bean name="BeanScanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanScanningDeployer"/>
 
+  <bean name="AliasDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.AliasDeploymentDeployer"/>
+
+  <bean name="NamedAliasDeployer" class="org.jboss.deployers.vfs.deployer.kernel.DeploymentAliasMetaDataDeployer">
+    <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+  </bean>
+
   <bean name="AnnotationHandlerFactory">
      <constructor factoryClass="org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory" factoryMethod="getInstance" />
   </bean>

Modified: projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/ExposePojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/ExposePojo.java	2008-07-21 17:04:34 UTC (rev 76063)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/ExposePojo.java	2008-07-21 17:08:26 UTC (rev 76064)
@@ -35,7 +35,7 @@
       this.pojo = pojo;
    }
 
-   @JMX(exposedInterface = void.class, registerDirectly = true)
+   @JMX(exposedInterface = void.class, registerDirectly = true, name = "jboss.demos:service=ExposedPojo")
    public PojoMBean getExposedPojo()
    {
       return pojo;

Copied: projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/AllPojos.java (from rev 75793, projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/Pojo.java)
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/AllPojos.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/AllPojos.java	2008-07-21 17:08:26 UTC (rev 76064)
@@ -0,0 +1,79 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., 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.demos.models.plain;
+
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.beans.metadata.api.model.AutowireType;
+import org.jboss.demos.models.IPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AllPojos
+{
+   private IPojo directMBean;
+   private IPojo exposedMBean;
+   private IPojo springPojo;
+   private IPojo annotatedPojo;
+
+   public IPojo getDirectMBean()
+   {
+      return directMBean;
+   }
+
+   public void setDirectMBean(IPojo directMBean)
+   {
+      this.directMBean = directMBean;
+   }
+
+   public IPojo getExposedMBean()
+   {
+      return exposedMBean;
+   }
+
+   public void setExposedMBean(IPojo exposedMBean)
+   {
+      this.exposedMBean = exposedMBean;
+   }
+
+   public IPojo getSpringPojo()
+   {
+      return springPojo;
+   }
+
+   @Inject(type = AutowireType.BY_NAME)
+   public void setSpringPojo(IPojo springPojo)
+   {
+      this.springPojo = springPojo;
+   }
+
+   public IPojo getAnnotatedPojo()
+   {
+      return annotatedPojo;
+   }
+
+   @Inject(bean = "annotated-pojo")
+   public void setAnnotatedPojo(IPojo annotatedPojo)
+   {
+      this.annotatedPojo = annotatedPojo;
+   }
+}
\ No newline at end of file

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/CyclePojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/CyclePojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/CyclePojo.java	2008-07-21 17:08:26 UTC (rev 76064)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., 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.demos.models.plain;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class CyclePojo
+{
+   private CyclePojo dependency;
+
+   public CyclePojo()
+   {
+   }
+
+   public CyclePojo(CyclePojo dependency)
+   {
+      this.dependency = dependency;
+   }
+
+   public CyclePojo getDependency()
+   {
+      return dependency;
+   }
+
+   public void setDependency(CyclePojo dependency)
+   {
+      this.dependency = dependency;
+   }
+}
\ No newline at end of file

Copied: projects/demos/trunk/models/src/resources/META-INF/alias-beans.xml (from rev 75793, projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml)
===================================================================
--- projects/demos/trunk/models/src/resources/META-INF/alias-beans.xml	                        (rev 0)
+++ projects/demos/trunk/models/src/resources/META-INF/alias-beans.xml	2008-07-21 17:08:26 UTC (rev 76064)
@@ -0,0 +1,5 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <alias name="SpringPojo">springPojo</alias>
+
+</deployment>

Modified: projects/demos/trunk/models/src/resources/META-INF/mbeans-service.xml
===================================================================
--- projects/demos/trunk/models/src/resources/META-INF/mbeans-service.xml	2008-07-21 17:04:34 UTC (rev 76063)
+++ projects/demos/trunk/models/src/resources/META-INF/mbeans-service.xml	2008-07-21 17:08:26 UTC (rev 76064)
@@ -2,6 +2,8 @@
 
 <server>
 
-   <mbean code="org.jboss.demos.models.mbeans.Pojo" name="jboss.demos:service=pojo"/>
+   <mbean code="org.jboss.demos.models.mbeans.Pojo" name="jboss.demos:service=pojo">
+     <attribute name="OtherPojo"><inject bean="PlainPojo"/></attribute>
+   </mbean>
 
 </server>

Modified: projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml
===================================================================
--- projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml	2008-07-21 17:04:34 UTC (rev 76063)
+++ projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml	2008-07-21 17:08:26 UTC (rev 76064)
@@ -11,4 +11,26 @@
     <property name="guicePojo"><inject/></property>
   </bean>
 
+  <bean name="AllPojos" class="org.jboss.demos.models.plain.AllPojos">
+    <property name="directMBean"><inject bean="jboss.demos:service=pojo"/></property>
+    <property name="exposedMBean"><inject bean="jboss.demos:service=ExposedPojo"/></property>
+    <property name="exposedMBean"><inject bean="jboss.demos:service=ExposedPojo"/></property>
+  </bean>
+
+  <bean name="cycleA" class="org.jboss.demos.models.plain.CyclePojo">
+    <property name="dependency"><inject bean="cycleB"/></property>
+  </bean>
+
+  <bean name="cycleB" class="org.jboss.demos.models.plain.CyclePojo">
+    <constructor><parameter><inject bean="cycleA" state="Instantiated"/></parameter></constructor>
+  </bean>
+
+  <bean name="cycleC" class="org.jboss.demos.models.plain.CyclePojo">
+    <property name="dependency"><inject bean="cycleD"/></property>
+  </bean>
+
+  <bean name="cycleD" class="org.jboss.demos.models.plain.CyclePojo">
+    <property name="dependency"><inject bean="cycleC" state="Instantiated"/></property>
+  </bean>
+
 </deployment>




More information about the jboss-cvs-commits mailing list