[jboss-cvs] JBossAS SVN: r70261 - in projects/microcontainer/trunk: container/src/main/org/jboss/javabean/plugins/jaxb and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Feb 29 06:03:31 EST 2008
Author: adrian at jboss.org
Date: 2008-02-29 06:03:31 -0500 (Fri, 29 Feb 2008)
New Revision: 70261
Added:
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean10.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean20.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder10.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder20.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory10.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory20.java
Removed:
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory.java
Modified:
projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/aop/junit/JBossXBDeployer.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/Constructor.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean.java
projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/Property.java
projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/ParameterInstantiate.xml
projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/SimpleInstantiate.xml
projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/StaticClassMethodInstantiate.xml
projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/StaticMethodInstantiate.xml
projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/AbstractJavaBeanTest.java
projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/ParameterInstantiateUnitTestCase.java
projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/SimpleInstantiateUnitTestCase.java
projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/StaticClassMethodInstantiateUnitTestCase.java
projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/StaticMethodInstantiateUnitTestCase.java
projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/deployment/xml/test/AbstractMCTest.java
Log:
[JBMICROCONT-219] - Fix the javabean jbossxb parsing to create schemas properly for 1.0 and 2.0
Modified: projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/aop/junit/JBossXBDeployer.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/aop/junit/JBossXBDeployer.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/aop-mc-int/src/tests/org/jboss/test/aop/junit/JBossXBDeployer.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -26,6 +26,8 @@
import org.jboss.aop.microcontainer.beans.beanmetadatafactory.AOPDeployment;
import org.jboss.dependency.spi.ControllerMode;
import org.jboss.javabean.plugins.jaxb.JavaBean;
+import org.jboss.javabean.plugins.jaxb.JavaBean10;
+import org.jboss.javabean.plugins.jaxb.JavaBean20;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
@@ -90,7 +92,8 @@
addSchemaBinding(resolver, AbstractKernelDeployment.class);
addSchemaBinding(resolver, AOPDeployment.class);
- addSchemaBinding(resolver, JavaBean.class);
+ addSchemaBinding(resolver, JavaBean10.class);
+ addSchemaBinding(resolver, JavaBean20.class);
return resolver;
}
Modified: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/Constructor.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/Constructor.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/Constructor.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -23,7 +23,7 @@
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
/**
* Constructor.
@@ -32,7 +32,7 @@
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
*/
- at XmlRootElement(name="constructor")
+ at XmlType(name="constructorType")
public class Constructor
{
private String factoryClass;
Modified: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -23,12 +23,10 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
+
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
import org.jboss.beans.info.spi.BeanInfo;
import org.jboss.beans.info.spi.PropertyInfo;
@@ -39,8 +37,6 @@
import org.jboss.reflect.spi.MethodInfo;
import org.jboss.reflect.spi.TypeInfo;
import org.jboss.util.propertyeditor.PropertyEditors;
-import org.jboss.xb.annotations.JBossXmlSchema;
-import org.jboss.xb.annotations.JBossXmlType;
import org.jboss.xb.spi.BeanAdapter;
import org.jboss.xb.spi.BeanAdapterFactory;
@@ -50,10 +46,6 @@
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
*/
- at JBossXmlSchema(namespace="urn:jboss:javabean:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
- at XmlRootElement(name="javabean")
- at XmlType(name="javabean")
- at JBossXmlType(beanAdapterBuilder=JavaBeanBuilder.class)
public class JavaBean extends BeanAdapter
{
private static Configuration configuration;
Added: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean10.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean10.java (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean10.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -0,0 +1,60 @@
+/*
+* 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.javabean.plugins.jaxb;
+
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.xb.annotations.JBossXmlSchema;
+import org.jboss.xb.annotations.JBossXmlType;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBean version 1.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlSchema(namespace="urn:jboss:javabean:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name="javabean")
+ at XmlType(name="javabeanType")
+ at JBossXmlType(beanAdapterBuilder=JavaBeanBuilder10.class)
+public class JavaBean10 extends JavaBean
+{
+ /**
+ * Create a new JavaBean10.
+ *
+ * @param beanAdapterFactory the bean adapter factory
+ */
+ public JavaBean10(BeanAdapterFactory beanAdapterFactory)
+ {
+ super(beanAdapterFactory);
+ }
+
+ @XmlTransient // Version 1 didn't have a constructor
+ public void setConstructor(Constructor constructor)
+ {
+ super.setConstructor(constructor);
+ }
+}
Added: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean20.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean20.java (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBean20.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -0,0 +1,53 @@
+/*
+* 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.javabean.plugins.jaxb;
+
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.xb.annotations.JBossXmlSchema;
+import org.jboss.xb.annotations.JBossXmlType;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBean version 2.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlSchema(namespace="urn:jboss:javabean:2.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name="javabean")
+ at XmlType(name="javabeanType")
+ at JBossXmlType(beanAdapterBuilder=JavaBeanBuilder20.class)
+public class JavaBean20 extends JavaBean
+{
+ /**
+ * Create a new JavaBean20.
+ *
+ * @param beanAdapterFactory the bean adapter factory
+ */
+ public JavaBean20(BeanAdapterFactory beanAdapterFactory)
+ {
+ super(beanAdapterFactory);
+ }
+}
Deleted: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -1,42 +0,0 @@
-/*
-* 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.javabean.plugins.jaxb;
-
-import org.jboss.beans.info.spi.BeanInfo;
-import org.jboss.reflect.spi.MethodInfo;
-import org.jboss.xb.spi.BeanAdapterBuilder;
-import org.jboss.xb.spi.BeanAdapterFactory;
-
-/**
- * JavaBeanBuilder.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class JavaBeanBuilder implements BeanAdapterBuilder
-{
- public BeanAdapterFactory newFactory(BeanInfo beanInfo, MethodInfo factory)
- {
- return new JavaBeanFactory();
- }
-}
Added: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder10.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder10.java (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder10.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -0,0 +1,42 @@
+/*
+* 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.javabean.plugins.jaxb;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+import org.jboss.xb.spi.BeanAdapterBuilder;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBeanBuilder version 1.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JavaBeanBuilder10 implements BeanAdapterBuilder
+{
+ public BeanAdapterFactory newFactory(BeanInfo beanInfo, MethodInfo factory)
+ {
+ return new JavaBeanFactory10();
+ }
+}
Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder20.java (from rev 70253, projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder20.java (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanBuilder20.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -0,0 +1,42 @@
+/*
+* 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.javabean.plugins.jaxb;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+import org.jboss.xb.spi.BeanAdapterBuilder;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBeanBuilder version 2.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JavaBeanBuilder20 implements BeanAdapterBuilder
+{
+ public BeanAdapterFactory newFactory(BeanInfo beanInfo, MethodInfo factory)
+ {
+ return new JavaBeanFactory20();
+ }
+}
Deleted: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -1,40 +0,0 @@
-/*
-* 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.javabean.plugins.jaxb;
-
-import org.jboss.xb.spi.BeanAdapter;
-import org.jboss.xb.spi.BeanAdapterFactory;
-
-/**
- * JavaBeanBuilder.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class JavaBeanFactory extends BeanAdapterFactory
-{
- public BeanAdapter newInstance()
- {
- return new JavaBean(this);
- }
-}
Added: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory10.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory10.java (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory10.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -0,0 +1,40 @@
+/*
+* 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.javabean.plugins.jaxb;
+
+import org.jboss.xb.spi.BeanAdapter;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBeanFactory version 1.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JavaBeanFactory10 extends BeanAdapterFactory
+{
+ public BeanAdapter newInstance()
+ {
+ return new JavaBean10(this);
+ }
+}
Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory20.java (from rev 70253, projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory20.java (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/JavaBeanFactory20.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -0,0 +1,40 @@
+/*
+* 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.javabean.plugins.jaxb;
+
+import org.jboss.xb.spi.BeanAdapter;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBeanFactory version 2.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JavaBeanFactory20 extends BeanAdapterFactory
+{
+ public BeanAdapter newInstance()
+ {
+ return new JavaBean20(this);
+ }
+}
Modified: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/Property.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/Property.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/jaxb/Property.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -22,6 +22,7 @@
package org.jboss.javabean.plugins.jaxb;
import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
/**
* Property.
@@ -30,6 +31,7 @@
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
*/
+ at XmlType(name="propertyType")
public class Property extends Parameter
{
private String name;
Modified: projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/ParameterInstantiate.xml
===================================================================
--- projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/ParameterInstantiate.xml 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/ParameterInstantiate.xml 2008-02-29 11:03:31 UTC (rev 70261)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<javabean xmlns="urn:jboss:javabean:1.0"
+<javabean xmlns="urn:jboss:javabean:2.0"
class="org.jboss.test.javabean.support.TestParameterInstantiate">
<constructor>
<parameter>Hello</parameter>
Modified: projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/SimpleInstantiate.xml
===================================================================
--- projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/SimpleInstantiate.xml 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/SimpleInstantiate.xml 2008-02-29 11:03:31 UTC (rev 70261)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<javabean xmlns="urn:jboss:javabean:1.0"
+<javabean xmlns="urn:jboss:javabean:2.0"
class="org.jboss.test.javabean.support.TestSimpleInstantiate">
</javabean>
\ No newline at end of file
Modified: projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/StaticClassMethodInstantiate.xml
===================================================================
--- projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/StaticClassMethodInstantiate.xml 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/StaticClassMethodInstantiate.xml 2008-02-29 11:03:31 UTC (rev 70261)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<javabean xmlns="urn:jboss:javabean:1.0">
+<javabean xmlns="urn:jboss:javabean:2.0">
<constructor factoryClass="org.jboss.test.javabean.support.TestStaticClassMethodInstantiator" factoryMethod="instantiate"/>
</javabean>
\ No newline at end of file
Modified: projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/StaticMethodInstantiate.xml
===================================================================
--- projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/StaticMethodInstantiate.xml 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/resources/tests/org/jboss/test/javabean/test/StaticMethodInstantiate.xml 2008-02-29 11:03:31 UTC (rev 70261)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<javabean xmlns="urn:jboss:javabean:1.0"
+<javabean xmlns="urn:jboss:javabean:2.0"
class="org.jboss.test.javabean.support.TestStaticMethodInstantiate">
<constructor factoryMethod="instantiate"/>
</javabean>
\ No newline at end of file
Modified: projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/AbstractJavaBeanTest.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/AbstractJavaBeanTest.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/AbstractJavaBeanTest.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -21,8 +21,9 @@
*/
package org.jboss.test.javabean.test;
+import org.jboss.javabean.plugins.jaxb.JavaBean10;
+import org.jboss.javabean.plugins.jaxb.JavaBean20;
import org.jboss.test.xb.builder.AbstractBuilderTest;
-import org.jboss.javabean.plugins.jaxb.JavaBean;
/**
* AbstractJavaBeanTest.
@@ -40,6 +41,16 @@
protected <T> T unmarshalJavaBean(Class<T> expected, Class<?>... others) throws Exception
{
- return unmarshalObject(expected, JavaBean.class, others);
+ return unmarshalJavaBean10(expected, others);
}
+
+ protected <T> T unmarshalJavaBean10(Class<T> expected, Class<?>... others) throws Exception
+ {
+ return unmarshalObject(expected, JavaBean10.class, others);
+ }
+
+ protected <T> T unmarshalJavaBean20(Class<T> expected, Class<?>... others) throws Exception
+ {
+ return unmarshalObject(expected, JavaBean20.class, others);
+ }
}
Modified: projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/ParameterInstantiateUnitTestCase.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/ParameterInstantiateUnitTestCase.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/ParameterInstantiateUnitTestCase.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -45,7 +45,7 @@
public void testParameterInstantiate() throws Exception
{
- TestParameterInstantiate result = unmarshalJavaBean(TestParameterInstantiate.class);
+ TestParameterInstantiate result = unmarshalJavaBean20(TestParameterInstantiate.class);
assertEquals("Hello5", result.constructorUsed);
}
}
Modified: projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/SimpleInstantiateUnitTestCase.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/SimpleInstantiateUnitTestCase.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/SimpleInstantiateUnitTestCase.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -45,6 +45,6 @@
public void testSimpleInstantiate() throws Exception
{
- unmarshalJavaBean(TestSimpleInstantiate.class);
+ unmarshalJavaBean20(TestSimpleInstantiate.class);
}
}
Modified: projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/StaticClassMethodInstantiateUnitTestCase.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/StaticClassMethodInstantiateUnitTestCase.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/StaticClassMethodInstantiateUnitTestCase.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -45,6 +45,6 @@
public void testStaticClassMethodInstantiate() throws Exception
{
- unmarshalJavaBean(TestStaticClassMethodInstantiate.class);
+ unmarshalJavaBean20(TestStaticClassMethodInstantiate.class);
}
}
Modified: projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/StaticMethodInstantiateUnitTestCase.java
===================================================================
--- projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/StaticMethodInstantiateUnitTestCase.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/container/src/tests/org/jboss/test/javabean/test/StaticMethodInstantiateUnitTestCase.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -45,6 +45,6 @@
public void testStaticMethodInstantiate() throws Exception
{
- unmarshalJavaBean(TestStaticMethodInstantiate.class);
+ unmarshalJavaBean20(TestStaticMethodInstantiate.class);
}
}
Modified: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/deployment/xml/test/AbstractMCTest.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/deployment/xml/test/AbstractMCTest.java 2008-02-29 10:53:23 UTC (rev 70260)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/deployment/xml/test/AbstractMCTest.java 2008-02-29 11:03:31 UTC (rev 70261)
@@ -48,7 +48,7 @@
import org.jboss.beans.metadata.spi.PropertyMetaData;
import org.jboss.beans.metadata.spi.SupplyMetaData;
import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.javabean.plugins.jaxb.JavaBean;
+import org.jboss.javabean.plugins.jaxb.JavaBean10;
import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
import org.jboss.test.xb.builder.AbstractBuilderTest;
import org.jboss.xb.binding.JBossXBException;
@@ -69,17 +69,17 @@
protected AbstractKernelDeployment unmarshalDeployment() throws Exception
{
- return unmarshalObject(AbstractKernelDeployment.class, AbstractKernelDeployment.class, JavaBean.class);
+ return unmarshalObject(AbstractKernelDeployment.class, AbstractKernelDeployment.class, JavaBean10.class);
}
protected AbstractBeanMetaData unmarshalBean() throws Exception
{
- return unmarshalObject(AbstractBeanMetaData.class, AbstractKernelDeployment.class, JavaBean.class);
+ return unmarshalObject(AbstractBeanMetaData.class, AbstractKernelDeployment.class, JavaBean10.class);
}
protected GenericBeanFactoryMetaData2 unmarshalBeanFactory() throws Exception
{
- return unmarshalObject(GenericBeanFactoryMetaData2.class, AbstractKernelDeployment.class, JavaBean.class);
+ return unmarshalObject(GenericBeanFactoryMetaData2.class, AbstractKernelDeployment.class, JavaBean10.class);
}
protected void assertAnnotations(Set<String> expected, Set<AnnotationMetaData> annotations)
More information about the jboss-cvs-commits
mailing list