[jboss-cvs] JBossAS SVN: r90625 - in projects/metadata/ejb/trunk/src: main/java/org/jboss/ejb3 and 16 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 26 05:28:54 EDT 2009


Author: alex.loubyansky at jboss.com
Date: 2009-06-26 05:28:53 -0400 (Fri, 26 Jun 2009)
New Revision: 90625

Added:
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ActivationConfig.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationClientDD.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationClientDDObjectFactory.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationException.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/AssemblyDescriptor.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CacheConfig.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ClusterConfig.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CmpField.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CmrField.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Consumer.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ContainerTransaction.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CurrentMessage.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Ejb3PortComponent.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbJarDD.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbRelation.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbRelationshipRole.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EnterpriseBean.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EnterpriseBeans.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeList.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/GenericBean.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InitList.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InitMethod.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Inject.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Injectable.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Interceptor.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InterceptorBinding.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InterceptorOrder.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Interceptors.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/LifecycleCallback.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDestination.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDrivenBean.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDrivenDestination.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageProperties.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Method.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MethodAttributes.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MethodPermission.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/PoolConfig.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Producer.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Query.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/QueryMethod.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RelationshipRoleSource.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Relationships.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoteBinding.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoveList.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoveMethod.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ResourceManager.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/SecurityIdentity.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Service.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/WebserviceDescription.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Webservices.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/XmlAnnotation.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/BaseEjbRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/DDObjectFactory.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EjbLocalRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EjbRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EnvEntry.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/InjectionTarget.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/JndiRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/Listener.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/MessageDestination.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/MessageDestinationRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/NameValuePair.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/PersistenceContextRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/PersistenceUnitRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/Ref.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ResourceEnvRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ResourceRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/RunAs.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/SecurityRole.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/SecurityRoleRef.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ServiceRefDelegate.java
   projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ServiceRefObjectFactory.java
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/legacy0_1_7/
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/legacy0_1_7/EjbDeploymentSummaryTestCase.java
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/simple/
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/simple/SimpleUnitTestCase.java
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/whitespace/
   projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/whitespace/WhitespaceUnitTestCase.java
   projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/
   projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/
   projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/
   projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/simple/
   projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/simple/ejb-jar.xml
   projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/whitespace/
   projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/whitespace/ejb-jar.xml
Log:
these are actually used

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ActivationConfig.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ActivationConfig.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ActivationConfig.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.NameValuePair;
+
+/**
+ * Represents a activation-config element of the ejb-jar.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class ActivationConfig
+{
+   private static final Logger log = Logger.getLogger(ActivationConfig.class);
+
+   // ejb-jar.xml
+   private List properties = new ArrayList();
+
+   public List getActivationConfigProperties()
+   {
+      return properties;
+   }
+
+   public void addActivationConfigProperty(NameValuePair property)
+   {
+      properties.add(property);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append('[');
+      sb.append("activationConfigProperties=").append(properties);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationClientDD.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationClientDD.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationClientDD.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
+
+/**
+ * This represents a application client deployment descriptor.
+ * 
+ * FIXME: should not extend EnviromentRefGroup, but InjectionHandler wants this
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class ApplicationClientDD extends EnvironmentRefGroup
+{
+   @SuppressWarnings("unused")
+   private static final Logger log = Logger.getLogger(ApplicationClientDD.class);
+   
+   private String displayName;
+   
+//   protected HashMap<String, EnvEntry> envEntries = new HashMap<String, EnvEntry>();
+//   protected HashMap<String, EjbRef> ejbRefs = new HashMap<String, EjbRef>();
+//   // TODO: javaee:service-refGroup
+//   protected HashMap<String, ResourceRef> resourceRefs = new HashMap<String, ResourceRef>();
+//   protected HashMap<String, ResourceEnvRef> resourceEnvRefs = new HashMap<String, ResourceEnvRef>();
+//   protected HashMap<String, MessageDestinationRef> messageDestinationRefs = new HashMap<String, MessageDestinationRef>();
+//   protected List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
+   
+   private Collection<MessageDestination> messageDestinations = new HashSet<MessageDestination>();
+   
+   private List<LifecycleCallback> postConstructs = new ArrayList<LifecycleCallback>();
+   private List<LifecycleCallback> preDestroys = new ArrayList<LifecycleCallback>();
+   private String callbackHandlerClass = null;
+   
+   private String version = null;
+   private boolean metadataComplete = false;
+   
+   // from jboss-client.xml 
+   
+   private String jndiName;
+   
+   private Collection<String> dependencies = new HashSet<String>();
+   
+   public void addDependency(String depends)
+   {
+      dependencies.add(depends);
+   }
+   
+   public Collection<String> getDependencies()
+   {
+      return dependencies;
+   }
+   
+   public String getDisplayName()
+   {
+      return displayName;
+   }
+   
+   public void setDisplayName(String displayName)
+   {
+      this.displayName = displayName;
+   }
+   
+   public String getJndiName()
+   {
+      // this doesn't work in CTS
+//      if(jndiName == null)
+//         return getDisplayName();
+      return jndiName;
+   }
+   
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+   
+   public void addMessageDestination(MessageDestination dest)
+   {
+      assert dest.getMessageDestinationName() != null : "message destination name is null";
+      
+      messageDestinations.add(dest);
+   }
+   
+//   public MessageDestination findMessageDestination(String name)
+//   {
+//      return messageDestinations.get(name);
+//   }
+   
+   public Collection<MessageDestination> getMessageDestinations()
+   {
+      return messageDestinations;
+   }
+   
+   public boolean isMetaDataComplete()
+   {
+      return metadataComplete;
+   }
+   
+   public void setMetadataComplete(boolean metadataComplete)
+   {
+      this.metadataComplete = metadataComplete;
+   }
+   
+   public List<LifecycleCallback> getPostConstructs()
+   {
+      return postConstructs;
+   }
+   
+   public List<LifecycleCallback> getPreDestroys()
+   {
+      return preDestroys;
+   }
+   
+   public String getVersion()
+   {
+      return version;
+   }
+   
+   public void setVersion(String version)
+   {
+      this.version = version;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationClientDDObjectFactory.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationClientDDObjectFactory.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationClientDDObjectFactory.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.DDObjectFactory;
+import org.jboss.metamodel.descriptor.EjbRef;
+import org.jboss.metamodel.descriptor.EnvEntry;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A JBossXB object factory for parsing application client descriptor files.
+ * 
+ * http://java.sun.com/xml/ns/javaee/application-client_5.xsd
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class ApplicationClientDDObjectFactory extends DDObjectFactory
+{
+   private static final Logger log = Logger.getLogger(ApplicationClientDDObjectFactory.class);
+
+   // made public for the parsing deployer
+   public ApplicationClientDDObjectFactory()
+   {
+
+   }
+
+   public static ApplicationClientDD parse(URL ddResource) throws JBossXBException, IOException
+   {
+      if (ddResource == null)
+         return null;
+
+      log.debug("found application-client.xml " + ddResource);
+
+      ApplicationClientDDObjectFactory factory = new ApplicationClientDDObjectFactory();
+      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
+      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
+      unmarshaller.setEntityResolver(new JBossEntityResolver());
+      unmarshaller.setNamespaceAware(true);
+      unmarshaller.setSchemaValidation(true);
+      unmarshaller.setValidation(true);
+
+      ApplicationClientDD dd = (ApplicationClientDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null);
+
+      return dd;
+   }
+
+   public void addChild(ApplicationClientDD parent, EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(ApplicationClientDD parent, EnvEntry entry, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEnvEntry(entry);
+   }
+
+   public void addChild(ApplicationClientDD parent, LifecycleCallback lifecycleCallback, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      if (localName.equals("post-construct"))
+         parent.getPostConstructs().add(lifecycleCallback);
+      else if (localName.equals("pre-destroy"))
+         parent.getPreDestroys().add(lifecycleCallback);
+      else throw new IllegalArgumentException(localName);
+   }
+
+   public void addChild(ApplicationClientDD parent, MessageDestination dest, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMessageDestination(dest);
+   }
+   
+   public void addChild(ApplicationClientDD parent, MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMessageDestinationRef(ref);
+   }
+
+   public void addChild(ApplicationClientDD parent, ServiceRefMetaData serviceref,
+                        UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addServiceRef(serviceref);
+   }
+
+   public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
+   {
+      throw new RuntimeException("NYI");
+   }
+
+   public Object newChild(ApplicationClientDD parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = super.newEnvRefGroupChild(localName);
+      if (child != null)
+         return child;
+
+      if (localName.equals("post-construct") || localName.equals("pre-destroy"))
+      {
+         child = new LifecycleCallback();
+      }
+      else if (localName.equals("message-destination"))
+      {
+         child = new MessageDestination();
+      }
+
+      // ignore things like display-name & description
+
+      return child;
+   }
+
+   public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      final ApplicationClientDD dd;
+      if (root == null)
+         root = dd = new ApplicationClientDD();
+      else dd = (ApplicationClientDD)root;
+
+      if (attrs.getLength() > 0)
+      {
+         for (int i = 0; i < attrs.getLength(); ++i)
+         {
+            if (attrs.getLocalName(i).equals("version"))
+            {
+               dd.setVersion(attrs.getValue(i));
+            }
+            else if (attrs.getLocalName(i).equals("metadata-complete"))
+            {
+               dd.setMetadataComplete(Boolean.parseBoolean(attrs.getValue(i)));
+            }
+            else if (attrs.getLocalName(i).equals("schemaLocation"))
+            {
+               // ignore
+            }
+            else if (attrs.getLocalName(i).equals("id"))
+            {
+               // ignore
+            }
+            else throw new IllegalArgumentException(attrs.getLocalName(i));
+         }
+      }
+
+      return root;
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(ApplicationClientDD dd, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("display-name"))
+      {
+         dd.setDisplayName(getValue(localName, value));
+      }
+      //      else if(localName.equals("description"))
+      //      {
+      //         // ignore
+      //      }
+      //      else
+      //         throw new IllegalArgumentException(localName);
+   }
+
+   public void setValue(LifecycleCallback lifecycleCallback, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("lifecycle-callback-class"))
+         lifecycleCallback.setLifecycleCallbackClass(value);
+      else if (localName.equals("lifecycle-callback-method"))
+         lifecycleCallback.setLifecycleCallbackMethod(value);
+      else throw new IllegalArgumentException(localName);
+   }
+   
+   public void setValue(MessageDestination destination, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("message-destination-name"))
+      {
+         destination.setMessageDestinationName(getValue(localName, value));
+      }
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationException.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationException.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ApplicationException.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents an "application-exception" element of the ejb-jar.xml deployment descriptor
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 68032 $</tt>
+ */
+public class ApplicationException
+{
+   private static final Logger log = Logger.getLogger(ApplicationException.class);
+
+   private String clazz;
+   private boolean rollback;
+
+   public String getExceptionClass()
+   {
+      return clazz;
+   }
+   
+   public void setExceptionClass(String clazz)
+   {
+      this.clazz = clazz;
+   }
+   
+   public boolean getRollback()
+   {
+      return rollback;
+   }
+
+   public void setRollback(boolean rollback)
+   {
+      this.rollback = rollback;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("class=").append(clazz);
+      sb.append(", rollback=").append(rollback);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/AssemblyDescriptor.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/AssemblyDescriptor.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/AssemblyDescriptor.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,242 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+ 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.SecurityRoleMetaData;
+import org.jboss.metamodel.descriptor.SecurityRole;
+
+/**
+ * Represents "assembly-descriptor" elements of the ejb-jar.xml deployment descriptor for the 1.4
+ * schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @author Anil.Saldhana at jboss.org
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class AssemblyDescriptor
+{
+   private static final Logger log = Logger.getLogger(AssemblyDescriptor.class);
+
+   private List securityRoles = new ArrayList();
+   
+   private Map<String, SecurityRoleMetaData> securityRoleMetaData = new HashMap();
+
+   private List methodPermissions = new ArrayList();
+
+   private List containerTransactions = new ArrayList();
+   
+   private HashMap<String, MessageDestination> messageDestinations = new HashMap();
+
+   private ExcludeList excludeList;
+
+   private List applicationExceptions = new ArrayList();
+
+   private InitList initList;
+
+   private List injects = new ArrayList();
+   
+   public Collection<MessageDestination> getMessageDestinations()
+   {
+      return messageDestinations.values();
+   }
+
+   public void addMessageDestination(MessageDestination messageDestination)
+   {
+      messageDestinations.put(messageDestination.getMessageDestinationName(), messageDestination);
+   }
+   
+   public MessageDestination findMessageDestination(String name)
+   {
+      return messageDestinations.get(name);
+   }
+
+   private List interceptorBindings = new ArrayList();
+
+   public InitList getInitList()
+   {
+      return initList;
+   }
+
+   public void setInitList(InitList initList)
+   {
+      this.initList = initList;
+   }
+
+   public ExcludeList getExcludeList()
+   {
+      return excludeList;
+   }
+
+   public void setExcludeList(ExcludeList excludeList)
+   {
+      this.excludeList = excludeList;
+   }
+   
+   public List getApplicationExceptions()
+   {
+      return applicationExceptions;
+   }
+
+   public void addApplicationException(ApplicationException applicationException)
+   {
+      applicationExceptions.add(applicationException);
+   }
+
+   public List getSecurityRoles()
+   {
+      return securityRoles;
+   }
+
+   public void setSecurityRoles(List securityRoles)
+   {
+      this.securityRoles = securityRoles;
+   }
+
+   public void addSecurityRole(SecurityRole securityRole)
+   {
+      securityRoles.add(securityRole);
+   }
+
+   public List<InterceptorBinding> getInterceptorBindings()
+   {
+      return interceptorBindings;
+   }
+
+   public void addInterceptorBinding(InterceptorBinding binding)
+   {
+      interceptorBindings.add(binding);
+   }
+
+   public List getInjects()
+   {
+      return injects;
+   }
+
+   public void addInject(Inject inject)
+   {
+      injects.add(inject);
+   }
+
+   public List getMethodPermissions()
+   {
+      return methodPermissions;
+   }
+
+   public void setMethodPermissions(List methodPermissions)
+   {
+      this.methodPermissions = methodPermissions;
+   }
+
+   public void addMethodPermission(MethodPermission methodPermission)
+   {
+      methodPermissions.add(methodPermission);
+   }
+
+   public List getContainerTransactions()
+   {
+      return containerTransactions;
+   }
+
+   public void setContainerTransactions(List containerTransactions)
+   {
+      this.containerTransactions = containerTransactions;
+   }
+
+   public void addContainerTransaction(ContainerTransaction containerTransaction)
+   {
+      containerTransactions.add(containerTransaction);
+   }
+   
+   public void addSecurityRoleMetaData(SecurityRoleMetaData srm)
+   {
+      this.securityRoleMetaData.put(srm.getRoleName(), srm);
+   }
+   
+   public Set getSecurityRolesGivenPrincipal(String userName)
+   {
+      HashSet roleNames = new HashSet();
+      Iterator it = securityRoleMetaData.values().iterator();
+      while (it.hasNext())
+      {
+         SecurityRoleMetaData srMetaData = (SecurityRoleMetaData) it.next();
+         if (srMetaData.getPrincipals().contains(userName))
+            roleNames.add(srMetaData.getRoleName());
+      }
+      return roleNames;
+   }
+   
+   /**
+    * Get a map of principals versus set of roles
+    * that may be configured by the user at the deployment level
+    * @return
+    */
+   public Map getPrincipalVersusRolesMap()
+   {
+      Map principalRolesMap = null;
+      
+      Iterator iter = securityRoleMetaData.keySet().iterator();
+      while(iter.hasNext())
+      {
+         if(principalRolesMap == null)
+            principalRolesMap = new HashMap(); 
+         String rolename = (String)iter.next();
+         SecurityRoleMetaData srm = (SecurityRoleMetaData) securityRoleMetaData.get(rolename);
+         Iterator principalIter = srm.getPrincipals().iterator();
+         while(principalIter.hasNext())
+         {
+            String pr = (String)principalIter.next(); 
+            Set roleset = (Set)principalRolesMap.get(pr);
+            if(roleset == null)
+               roleset = new HashSet();
+            if(!roleset.contains(rolename))
+               roleset.add(rolename);
+            principalRolesMap.put(pr, roleset);
+         } 
+      } 
+      return principalRolesMap;
+   }
+   
+   public Map<String,SecurityRoleMetaData> getSecurityRoleMetaData()
+   {
+      return this.securityRoleMetaData;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("securityRoles=").append(securityRoles);
+      sb.append(", applicationExceptions=").append(applicationExceptions);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CacheConfig.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CacheConfig.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CacheConfig.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+
+/**
+ * Represents an <cache-config> element of the jboss.xml deployment descriptor
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61333 $</tt>
+ */
+public class CacheConfig
+{
+   private String cacheClass = null;
+   private String maxSize = null;
+   private String idleTimeoutSeconds = null;
+   private String removeTimeoutSeconds = null;
+   private String name = null;
+   private String persistenceManager = null;
+   private String replicationIsPassivation = null;
+
+   public String getPersistenceManager()
+   {
+      return persistenceManager;
+   }
+
+   public void setPersistenceManager(String persistenceManager)
+   {
+      this.persistenceManager = persistenceManager;
+   }
+   
+   public String getCacheClass()
+   {
+      return cacheClass;
+   }
+
+   public void setCacheClass(String cacheClass)
+   {
+      this.cacheClass = cacheClass;
+   }
+
+   public String getMaxSize()
+   {
+      return maxSize;
+   }
+
+   public void setMaxSize(String maxSize)
+   {
+      this.maxSize = maxSize;
+   }
+   
+   public String getIdleTimeoutSeconds()
+   {
+      return idleTimeoutSeconds;
+   }
+
+   public void setIdleTimeoutSeconds(String idleTimeoutSeconds)
+   {
+      this.idleTimeoutSeconds = idleTimeoutSeconds;
+   }
+   
+   public String getRemoveTimeoutSeconds()
+   {
+      return removeTimeoutSeconds;
+   }
+
+   public void setRemoveTimeoutSeconds(String removeTimeoutSeconds)
+   {
+      this.removeTimeoutSeconds = removeTimeoutSeconds;
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }   
+
+   public String getReplicationIsPassivation()
+   {
+      return replicationIsPassivation;
+   }
+
+   public void setReplicationIsPassivation(String replicationIsPassivation)
+   {
+      this.replicationIsPassivation = replicationIsPassivation;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("cacheClass=").append(cacheClass);
+      sb.append(", maxSize=").append(maxSize);
+      sb.append(", idleTimeoutSeconds=").append(idleTimeoutSeconds);
+      sb.append(", name=").append(name);
+      sb.append(", replicationIsPassivation=").append(replicationIsPassivation);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ClusterConfig.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ClusterConfig.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ClusterConfig.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+
+/**
+ * Represents an <cluster-config> element of the jboss.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class ClusterConfig
+{
+   private String loadBalancePolicy = null;
+
+   private String partition = null;
+
+   public String getLoadBalancePolicy()
+   {
+      return loadBalancePolicy;
+   }
+
+   public void setLoadBalancePolicy(String loadBalancePolicy)
+   {
+      this.loadBalancePolicy = loadBalancePolicy;
+   }
+
+   public String getPartition()
+   {
+      return partition;
+   }
+
+   public void setPartition(String partition)
+   {
+      this.partition = partition;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("loadBalancePolicy=").append(loadBalancePolicy);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CmpField.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CmpField.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CmpField.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * Represents an cmp-field element of the ejb-jar.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class CmpField
+{
+
+   private String fieldName;
+
+   public String getFieldName()
+   {
+      return fieldName;
+   }
+
+   public void setFieldName(String fieldName)
+   {
+      this.fieldName = fieldName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("fieldName=").append(fieldName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CmrField.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CmrField.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CmrField.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * Represents an <cmr-field> element of the ejb-jar.xml deployment
+ * descriptor for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class CmrField
+{
+
+   private String cmrFieldName;
+
+   private String cmrFieldType;
+
+   public String getCmrFieldName()
+   {
+      return cmrFieldName;
+   }
+
+   public void setCmrFieldName(String cmrFieldName)
+   {
+      this.cmrFieldName = cmrFieldName;
+   }
+
+   public String getCmrFieldType()
+   {
+      return cmrFieldType;
+   }
+
+   public void setCmrFieldType(String cmrFieldType)
+   {
+      this.cmrFieldType = cmrFieldType;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("cmrFieldName=").append(cmrFieldName);
+      sb.append(",cmrFieldType=").append(cmrFieldType);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Consumer.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Consumer.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Consumer.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class Consumer extends EnterpriseBean
+{
+   private static final Logger log = Logger.getLogger(Consumer.class);
+   
+   private String destination = null;
+   private String destinationType = null;
+   private CurrentMessage currentMessage = null;
+   private MessageProperties messageProperties = null;
+   private List producers = new ArrayList();
+   private List localProducers = new ArrayList();
+   
+   public String getDestination()
+   {
+      return destination;
+   }
+   
+   public void setDestination(String destination)
+   {
+      this.destination = destination;
+   }
+   
+   public String getDestinationType()
+   {
+      return destinationType;
+   }
+   
+   public void setDestinationType(String destinationType)
+   {
+      this.destinationType = destinationType;
+   }
+   
+   public CurrentMessage getCurrentMessage()
+   {
+      return currentMessage;
+   }
+   
+   public void setCurrentMessage(CurrentMessage currentMessage)
+   {
+      this.currentMessage = currentMessage;
+   }
+   
+   public MessageProperties getMessageProperties()
+   {
+      return messageProperties;
+   }
+   
+   public void setMessageProperties(MessageProperties messageProperties)
+   {
+      this.messageProperties = messageProperties;
+   }
+   
+   public List getProducers()
+   {
+      return producers;
+   }
+   
+   public void addProducer(Producer producer)
+   {
+      producers.add(producer);
+   }
+   
+   public List getLocalProducers()
+   {
+      return localProducers;
+   }
+   
+   public void addLocalProducer(Producer producer)
+   {
+      localProducers.add(producer);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[Consumer:");
+      sb.append(super.toString());
+      sb.append(", destination=" + destination);
+      sb.append(", destinationType=" + destinationType);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ContainerTransaction.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ContainerTransaction.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ContainerTransaction.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+
+/**
+ * Represents an <container-transaction> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class ContainerTransaction
+{
+
+   private String transAttribute;
+
+   private Method method;
+
+   public String getTransAttribute()
+   {
+      return transAttribute;
+   }
+
+   public void setTransAttribute(String transAttribute)
+   {
+      this.transAttribute = transAttribute;
+   }
+
+   public Method getMethod()
+   {
+      return method;
+   }
+
+   public void setMethod(Method method)
+   {
+      this.method = method;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbRelationName=").append(transAttribute);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CurrentMessage.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CurrentMessage.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/CurrentMessage.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class CurrentMessage
+{
+   private List methods = new ArrayList();
+
+   public List getMethods()
+   {
+      return methods;
+   }
+   
+   public void addMethod(Method method)
+   {
+      methods.add(method);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbName=").append(methods);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Ejb3PortComponent.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Ejb3PortComponent.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Ejb3PortComponent.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,88 @@
+package org.jboss.ejb3.metamodel;
+
+public class Ejb3PortComponent
+{
+    private static final long serialVersionUID = 1;
+
+   private SessionEnterpriseBean sessionMetaData;
+
+   private String portComponentName;
+   private String portComponentURI;
+   private String authMethod;
+   private String transportGuarantee;
+   private Boolean secureWSDLAccess;
+
+
+   public Ejb3PortComponent()
+   {
+   }
+
+   public Ejb3PortComponent(SessionEnterpriseBean sessionMetaData)
+   {
+      this.sessionMetaData = sessionMetaData;
+   }
+
+   public SessionEnterpriseBean getSessionMetaData()
+   {
+      return sessionMetaData;
+   }
+
+   public String getPortComponentName()
+   {
+      return portComponentName;
+   }
+
+   public void setPortComponentName(String portComponentName)
+   {
+      this.portComponentName = portComponentName;
+   }
+
+   public String getPortComponentURI()
+   {
+      return portComponentURI;
+   }
+
+   public void setPortComponentURI(String portComponentURI)
+   {
+      this.portComponentURI = portComponentURI;
+   }
+
+   public String getURLPattern()
+   {
+      String pattern = "/*";
+      if (portComponentURI != null)
+         pattern = portComponentURI;
+
+      return pattern;
+   }
+
+   public String getAuthMethod()
+   {
+      return authMethod;
+   }
+
+   public void setAuthMethod(String authMethod)
+   {
+      this.authMethod = authMethod;
+   }
+
+   public String getTransportGuarantee()
+   {
+      return transportGuarantee;
+   }
+
+   public void setTransportGuarantee(String transportGuarantee)
+   {
+      this.transportGuarantee = transportGuarantee;
+   }
+
+   public Boolean getSecureWSDLAccess()
+   {
+      return secureWSDLAccess;
+   }
+
+   public void setSecureWSDLAccess(Boolean secureWSDLAccess)
+   {
+      this.secureWSDLAccess = secureWSDLAccess;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbJarDD.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbJarDD.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbJarDD.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,185 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.HashMap;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents the ejb-jar.xml deployment descriptor for the 2.1 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 62341 $</tt>
+ */
+public class EjbJarDD
+{
+   private static final Logger log = Logger.getLogger(EjbJarDD.class);
+
+   // ejb-jar.xml
+   private String version;
+
+   private String displayName;
+
+   private Relationships relationships;
+
+   private AssemblyDescriptor assemblyDescriptor;
+
+   private Interceptors interceptors;
+
+   // jboss.xml
+   private String securityDomain;
+   private String unauthenticatedPrincipal;
+   private String jmxName;
+
+   private HashMap<String, ResourceManager> resourceManagers = new HashMap();
+
+   // both
+   private EnterpriseBeans enterpriseBeans;
+
+   private Webservices webservices;
+
+   public void addResourceManager(ResourceManager manager)
+   {
+      resourceManagers.put(manager.getResourceName(), manager);
+   }
+
+   public String resolveResourceManager(String resourceName)
+   {
+      ResourceManager manager = resourceManagers.get(resourceName);
+      if (manager != null)
+         return manager.getResourceJndiName();
+
+      return null;
+   }
+
+   public String getSecurityDomain()
+   {
+      return securityDomain;
+   }
+
+   public void setSecurityDomain(String securityDomain)
+   {
+      this.securityDomain = securityDomain;
+   }
+
+   public String getUnauthenticatedPrincipal()
+   {
+      return unauthenticatedPrincipal;
+   }
+
+   public void setUnauthenticatedPrincipal(String unauthenticatedPrincipal)
+   {
+      this.unauthenticatedPrincipal = unauthenticatedPrincipal;
+   }
+
+   public String getJmxName()
+   {
+      return jmxName;
+   }
+
+   public void setJmxName(String jmxName)
+   {
+      this.jmxName = jmxName;
+   }
+
+   public String getVersion()
+   {
+      return version;
+   }
+
+   public void setVersion(String version)
+   {
+      this.version = version;
+   }
+
+   public String getDisplayName()
+   {
+      return displayName;
+   }
+
+   public void setDisplayName(String displayName)
+   {
+      this.displayName = displayName;
+   }
+
+   public EnterpriseBeans getEnterpriseBeans()
+   {
+      return enterpriseBeans;
+   }
+
+   public void setEnterpriseBeans(EnterpriseBeans enterpriseBeans)
+   {
+      this.enterpriseBeans = enterpriseBeans;
+   }
+
+   public Interceptors getInterceptors()
+   {
+      return interceptors;
+   }
+
+   public void setInterceptors(Interceptors interceptors)
+   {
+      this.interceptors = interceptors;
+   }
+
+   public Relationships getRelationships()
+   {
+      return relationships;
+   }
+
+   public void setRelationships(Relationships relationships)
+   {
+      this.relationships = relationships;
+   }
+
+   public AssemblyDescriptor getAssemblyDescriptor()
+   {
+      return assemblyDescriptor;
+   }
+
+   public void setAssemblyDescriptor(AssemblyDescriptor assemblyDescriptor)
+   {
+      this.assemblyDescriptor = assemblyDescriptor;
+   }
+
+   public Webservices getWebservices()
+   {
+      return webservices;
+   }
+
+   public void setWebservices(Webservices webservices)
+   {
+      this.webservices = webservices;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append('[');
+      sb.append("version=").append(version);
+      sb.append(",");
+      sb.append("displayName=").append(displayName);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,1513 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.DDObjectFactory;
+import org.jboss.metamodel.descriptor.EjbLocalRef;
+import org.jboss.metamodel.descriptor.EjbRef;
+import org.jboss.metamodel.descriptor.EnvEntry;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.NameValuePair;
+import org.jboss.metamodel.descriptor.PersistenceContextRef;
+import org.jboss.metamodel.descriptor.PersistenceUnitRef;
+import org.jboss.metamodel.descriptor.ResourceEnvRef;
+import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.metamodel.descriptor.RunAs;
+import org.jboss.metamodel.descriptor.SecurityRole;
+import org.jboss.metamodel.descriptor.SecurityRoleRef;
+import org.jboss.util.StringPropertyReplacer;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * org.jboss.xb.binding.ObjectModelFactory implementation that accepts data
+ * chuncks from unmarshaller and assembles them into an EjbJarDD instance.
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @author Anil.Saldhana at jboss.org
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class EjbJarDDObjectFactory extends DDObjectFactory
+{
+
+   private static final Logger log = Logger.getLogger(EjbJarDDObjectFactory.class);
+
+   public static EjbJarDD parse(URL ddResource) throws JBossXBException, IOException
+   {
+      ObjectModelFactory factory = null;
+      Unmarshaller unmarshaller = null;
+      EjbJarDD dd = null;
+
+      if (ddResource != null)
+      {
+         log.debug("found ejb-jar.xml " + ddResource);
+
+         factory = new EjbJarDDObjectFactory();
+         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
+         unmarshaller = unmarshallerFactory.newUnmarshaller();
+         unmarshaller.setEntityResolver(new JBossEntityResolver());
+         unmarshaller.setNamespaceAware(true);
+         unmarshaller.setSchemaValidation(true);
+         unmarshaller.setValidation(true);
+
+         dd = (EjbJarDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null);
+      }
+
+      return dd;
+   }
+
+   public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+
+      final EjbJarDD dd;
+      if (root == null)
+      {
+         root = dd = new EjbJarDD();
+      }
+      else
+      {
+         dd = (EjbJarDD)root;
+      }
+
+      if (attrs.getLength() > 0)
+      {
+         for (int i = 0; i < attrs.getLength(); ++i)
+         {
+            if (attrs.getLocalName(i).equals("version"))
+            {
+               dd.setVersion(attrs.getValue(i));
+            }
+         }
+      }
+
+      return root;
+   }
+
+   public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
+   {
+      return root;
+   }
+
+   // Methods discovered by introspection
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(EjbJarDD dd, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("enterprise-beans"))
+      {
+         child = new EnterpriseBeans();
+      }
+      if (localName.equals("interceptors"))
+      {
+         child = new Interceptors();
+      }
+      else if (localName.equals("relationships"))
+      {
+         child = new Relationships();
+      }
+      else if (localName.equals("assembly-descriptor"))
+      {
+         child = new AssemblyDescriptor();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(EnterpriseBeans ejbs, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("session"))
+      {
+         child = new SessionEnterpriseBean();
+      }
+      else if (localName.equals("entity"))
+      {
+         child = new EntityEnterpriseBean();
+      }
+      else if (localName.equals("message-driven"))
+      {
+         child = new MessageDrivenBean();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   private Object newEjbChild(EnterpriseBean parent, String localName)
+   {
+      Object child = null;
+
+      if ((child = super.newEnvRefGroupChild(localName)) != null)
+         return child;
+      return child;
+   }
+
+   private Object newEjbHasInterceptorsChild(EnterpriseBean parent, String localName)
+   {
+      Object child = null;
+
+      if (localName.equals("around-invoke"))
+      {
+         child = new Method();
+      }
+      else if (localName.equals("post-construct"))
+      {
+         child = new Method();
+      }
+      else if (localName.equals("pre-destroy"))
+      {
+         child = new Method();
+      }
+      else if (localName.equals("post-activate"))
+      {
+         child = new Method();
+      }
+      else if (localName.equals("pre-passivate"))
+      {
+         child = new Method();
+      }
+      return child;
+   }
+
+   public Object newChild(MessageDrivenBean parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = newEjbChild(parent, localName);
+      if (child != null)
+         return child;
+
+      child = newEjbHasInterceptorsChild(parent, localName);
+      if (child != null)
+         return child;
+
+      if (localName.equals("message-driven-destination"))
+      {
+         child = new MessageDrivenDestination();
+      }
+      else if (localName.equals("activation-config"))
+      {
+         child = new ActivationConfig();
+      }
+
+      return child;
+   }
+
+   public Object newChild(ActivationConfig parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("activation-config-property"))
+      {
+         child = new NameValuePair();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(SessionEnterpriseBean parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = newEjbChild(parent, localName);
+      if (child != null)
+         return child;
+
+      child = newEjbHasInterceptorsChild(parent, localName);
+      if (child != null)
+         return child;
+
+      if (localName.equals("security-role-ref"))
+      {
+         child = new SecurityRoleRef();
+      }
+      else if (localName.equals("security-identity"))
+      {
+         child = new SecurityIdentity();
+      }
+      else if (localName.equals("remove-method"))
+      {
+         RemoveMethod method = new RemoveMethod();
+         parent.addRemoveMethod(method);
+         child = method;
+      }
+      else if (localName.equals("init-method"))
+      {
+         InitMethod method = new InitMethod();
+         parent.addInitMethod(method);
+         child = method;
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(EntityEnterpriseBean parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      child = newEjbChild(parent, localName);
+      if (child == null)
+      {
+         if (localName.equals("security-role-ref"))
+         {
+            child = new SecurityRoleRef();
+         }
+         else if (localName.equals("cmp-field"))
+         {
+            child = new CmpField();
+         }
+         else if (localName.equals("query"))
+         {
+            child = new Query();
+         }
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(SecurityIdentity parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("run-as"))
+      {
+         child = new RunAs();
+      }
+      else if (localName.equals("use-caller-identity"))
+      {
+         parent.setUseCallerIdentity(true);
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(RemoveMethod parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("bean-method"))
+      {
+         parent.setBeanMethod(new Method());
+         child = parent.getBeanMethod();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(InitMethod parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("bean-method"))
+      {
+         parent.setBeanMethod(new Method());
+         child = parent.getBeanMethod();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(RemoveMethod dd, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("retain-if-exception"))
+      {
+         dd.setRetainIfException(Boolean.parseBoolean(getValue(localName, value)));
+      }
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(Relationships relationships, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("ejb-relation"))
+      {
+         child = new EjbRelation();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(EjbRelation relation, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("ejb-relationship-role"))
+      {
+         child = new EjbRelationshipRole();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(EjbRelationshipRole parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("cascade-delete"))
+      {
+         parent.setCascadeDelete(true);
+      }
+      else if (localName.equals("relationship-role-source"))
+      {
+         child = new RelationshipRoleSource();
+      }
+      else if (localName.equals("cmr-field"))
+      {
+         child = new CmrField();
+      }
+
+      return child;
+   }
+
+   public Object newChild(Interceptors interceptors, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("interceptor"))
+      {
+         return new Interceptor();
+      }
+
+      return child;
+   }
+
+   public Object newChild(Interceptor interceptor, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if ((child = this.newEnvRefGroupChild(localName)) != null)
+         return child;
+
+      if (localName.equals("around-invoke"))
+      {
+         return new Method();
+      }
+      else if (localName.equals("post-construct"))
+      {
+         return new Method();
+      }
+      else if (localName.equals("pre-destroy"))
+      {
+         return new Method();
+      }
+      else if (localName.equals("post-activate"))
+      {
+         return new Method();
+      }
+      else if (localName.equals("pre-passivate"))
+      {
+         return new Method();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(AssemblyDescriptor relationships, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("security-role"))
+      {
+         child = new SecurityRole();
+      }
+      else if (localName.equals("method-permission"))
+      {
+         child = new MethodPermission();
+      }
+      if (localName.equals("container-transaction"))
+      {
+         child = new ContainerTransaction();
+      }
+      else if (localName.equals("inject"))
+      {
+         child = new Inject();
+      }
+      else if (localName.equals("exclude-list"))
+      {
+         child = new ExcludeList();
+      }
+      else if (localName.equals("application-exception"))
+      {
+         child = new ApplicationException();
+      }
+      else if (localName.equals("interceptor-binding"))
+      {
+         child = new InterceptorBinding();
+      }
+      else if (localName.equals("message-destination"))
+      {
+         child = new MessageDestination();
+      }
+      
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(Inject inject, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method"))
+      {
+         child = new Method();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(MethodPermission permission, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method"))
+      {
+         child = new Method();
+      }
+      else if (localName.equals("unchecked"))
+      {
+         permission.setUnchecked(true);
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(ExcludeList list, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method"))
+      {
+         child = new Method();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(InitList list, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method"))
+      {
+         child = new Method();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(ContainerTransaction transaction, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method"))
+      {
+         child = new Method();
+      }
+
+      return child;
+   }
+
+   public Object newChild(Method method, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method-params"))
+      {
+         method.setHasParameters();
+      }
+
+      return child;
+   }
+
+   public Object newChild(InterceptorBinding binding, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("interceptor-order"))
+      {
+         child = new InterceptorOrder();
+      }
+      else if (localName.equals("exclude-default-interceptors"))
+      {
+         child = new ExcludeDefaultInterceptors();
+      }
+      else if (localName.equals("exclude-class-interceptors"))
+      {
+         child = new ExcludeClassInterceptors();
+      }
+      else if (localName.equals("method-params"))
+      {
+         binding.setHasParameters();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageDrivenBean parent, ActivationConfig config, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setActivationConfig(config);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageDrivenBean parent, EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageDrivenBean parent, EjbLocalRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbLocalRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageDrivenBean parent, EnvEntry entry, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEnvEntry(entry);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageDrivenBean parent, ResourceEnvRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceEnvRef(envRef);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageDrivenBean parent, ResourceRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceRef(envRef);
+   }
+
+   public void addChild(MessageDrivenBean parent, ServiceRefMetaData envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addServiceRef(envRef);
+   }
+
+   public void addChild(MessageDrivenBean parent, MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMessageDestinationRef(ref);
+   }
+
+   public void addChild(ActivationConfig parent, NameValuePair property, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addActivationConfigProperty(property);
+   }
+
+   public void addChild(EjbJarDD parent, EnterpriseBeans ejbs, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setEnterpriseBeans(ejbs);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, EnterpriseBean ejb, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEnterpriseBean(ejb);
+   }
+
+   public void addChild(SessionEnterpriseBean parent, SecurityRoleRef roleRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addSecurityRoleRef(roleRef);
+   }
+
+   public void addChild(SessionEnterpriseBean parent, SecurityIdentity si, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setSecurityIdentity(si);
+   }
+
+   public void addChild(SecurityIdentity parent, RunAs runAs, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setRunAs(runAs);
+   }
+
+   public void addChild(SessionEnterpriseBean parent, EjbLocalRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbLocalRef(ref);
+   }
+
+   public void addChild(SessionEnterpriseBean parent, EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbRef(ref);
+   }
+
+   public void addChild(SessionEnterpriseBean parent, PersistenceContextRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addPersistenceContextRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(SessionEnterpriseBean parent, PersistenceUnitRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addPersistenceUnitRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(SessionEnterpriseBean parent, MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMessageDestinationRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(SessionEnterpriseBean parent, EnvEntry entry, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEnvEntry(entry);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(SessionEnterpriseBean parent, ResourceEnvRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceEnvRef(envRef);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(SessionEnterpriseBean parent, ResourceRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceRef(envRef);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(SessionEnterpriseBean parent, ServiceRefMetaData envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addServiceRef(envRef);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(SessionEnterpriseBean parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      if (localName.equals("around-invoke"))
+      {
+         parent.setAroundInvoke(method);
+      }
+      else if (localName.equals("post-construct"))
+      {
+         parent.setPostConstruct(method);
+      }
+      else if (localName.equals("pre-destroy"))
+      {
+         parent.setPreDestroy(method);
+      }
+      else if (localName.equals("post-activate"))
+      {
+         parent.setPostActivate(method);
+      }
+      else if (localName.equals("pre-passivate"))
+      {
+         parent.setPrePassivate(method);
+      }
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EntityEnterpriseBean parent, CmpField field, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addCmpField(field);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EntityEnterpriseBean parent, Query query, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addQuery(query);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EjbJarDD parent, Relationships relationships, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setRelationships(relationships);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Relationships parent, EjbRelation relation, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbRelation(relation);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EjbRelation parent, EjbRelationshipRole role, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbRelationshipRole(role);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EjbRelationshipRole parent, RelationshipRoleSource source, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setRelationshipRoleSource(source);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EjbRelationshipRole parent, CmrField field, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setCmrField(field);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EjbJarDD parent, AssemblyDescriptor descriptor, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setAssemblyDescriptor(descriptor);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(AssemblyDescriptor parent, SecurityRole role, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addSecurityRole(role);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(AssemblyDescriptor parent, MethodPermission permission, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMethodPermission(permission);
+   }
+
+   public void addChild(AssemblyDescriptor parent, MessageDestination destination, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMessageDestination(destination);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(AssemblyDescriptor parent, ExcludeList list, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setExcludeList(list);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(AssemblyDescriptor parent, ApplicationException exception, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addApplicationException(exception);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(AssemblyDescriptor parent, InitList list, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInitList(list);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(AssemblyDescriptor parent, Inject inject, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addInject(inject);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(AssemblyDescriptor parent, InterceptorBinding binding, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addInterceptorBinding(binding);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(ExcludeList parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMethod(method);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(InitList parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMethod(method);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MethodPermission parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMethod(method);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Inject parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMethod(method);
+   }
+
+   public void addChild(EjbJarDD parent, Interceptors interceptors, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInterceptors(interceptors);
+   }
+
+   public void addChild(Interceptors parent, Interceptor interceptor, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addInterceptor(interceptor);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, EjbLocalRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbLocalRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, PersistenceContextRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addPersistenceContextRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, PersistenceUnitRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addPersistenceUnitRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMessageDestinationRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, EnvEntry entry, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEnvEntry(entry);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, ResourceEnvRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceEnvRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, ResourceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Interceptor parent, ServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addServiceRef(ref);
+   }
+
+   public void addChild(Interceptor parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      if (localName.equals("around-invoke"))
+      {
+         parent.setAroundInvoke(method);
+      }
+      else if (localName.equals("post-construct"))
+      {
+         parent.setPostConstruct(method);
+      }
+      else if (localName.equals("pre-destroy"))
+      {
+         parent.setPreDestroy(method);
+      }
+      else if (localName.equals("post-activate"))
+      {
+         parent.setPostActivate(method);
+      }
+      else if (localName.equals("pre-passivate"))
+      {
+         parent.setPrePassivate(method);
+      }
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(InterceptorBinding parent, InterceptorOrder order, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setOrderedInterceptorClasses(order);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(InterceptorBinding parent, ExcludeDefaultInterceptors exclude, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setExcludeDefaultInterceptors(true);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(InterceptorBinding parent, ExcludeClassInterceptors exclude, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setExcludeClassInterceptors(true);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(ContainerTransaction parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setMethod(method);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageDrivenBean parent, MessageDrivenDestination destination, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setMessageDrivenDestination(destination);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageDrivenBean parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      if (localName.equals("around-invoke"))
+      {
+         parent.setAroundInvoke(method);
+      }
+      else if (localName.equals("post-construct"))
+      {
+         parent.setPostConstruct(method);
+      }
+      else if (localName.equals("pre-destroy"))
+      {
+         parent.setPreDestroy(method);
+      }
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(AssemblyDescriptor parent, ContainerTransaction transaction, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addContainerTransaction(transaction);
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(EjbJarDD dd, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("display-name"))
+      {
+         dd.setDisplayName(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(NameValuePair property, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("activation-config-property-name"))
+      {
+         property.setName(getValue(localName, value));
+      }
+      else if (localName.equals("activation-config-property-value"))
+      {
+         property.setValue(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   private boolean isEjbParentName(EnterpriseBean ejb, String localName, String value)
+   {
+      if (localName.equals("ejb-name"))
+      {
+         ejb.setEjbName(getValue(localName, value));
+         return true;
+      }
+      else if (localName.equals("home"))
+      {
+         ejb.setHome(getValue(localName, value));
+         return true;
+      }
+      else if (localName.equals("remote") || localName.equals("business-remote"))
+      {
+         ejb.setRemote(getValue(localName, value));
+         return true;
+      }
+      else if (localName.equals("local-home"))
+      {
+         ejb.setLocalHome(getValue(localName, value));
+         return true;
+      }
+      else if (localName.equals("local") || localName.equals("business-local"))
+      {
+         ejb.setLocal(getValue(localName, value));
+         return true;
+      }
+      else if (localName.equals("ejb-class"))
+      {
+         ejb.setEjbClass(getValue(localName, value));
+         return true;
+      }
+
+      return false;
+   }
+
+   public void setValue(MessageDestination destination, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("message-destination-name"))
+      {
+         destination.setMessageDestinationName(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(MessageDrivenBean ejb, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (!isEjbParentName(ejb, localName, value))
+      {
+         if (localName.equals("acknowledge-mode"))
+         {
+            ejb.setAcknowledgeMode(getValue(localName, value));
+         }
+         else if (localName.equals("transaction-type"))
+         {
+            ejb.setTransactionType(getValue(localName, value));
+         }
+         else if (localName.equals("messaging-type"))
+         {
+            ejb.setMessagingType(getValue(localName, value));
+         }
+         else if (localName.equals("message-destination-link"))
+         {
+            ejb.setMessageDestinationLink(getValue(localName, value));
+         }
+         else if (localName.equals("message-destination-type"))
+         {
+            MessageDrivenDestination destination = ejb.getMessageDrivenDestination();
+            if (destination == null)
+            {
+               destination = new MessageDrivenDestination();
+               ejb.setMessageDrivenDestination(destination);
+            }
+
+            destination.setDestinationType(getValue(localName, value));
+         }
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(MessageDrivenDestination destination, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("destination-type"))
+      {
+         destination.setDestinationType(getValue(localName, value));
+      }
+      else if (localName.equals("subscription-durability"))
+      {
+         destination.setSubscriptionDurability(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(SessionEnterpriseBean ejb, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (!isEjbParentName(ejb, localName, value))
+      {
+         if (localName.equals("session-type"))
+         {
+            ejb.setSessionType(getValue(localName, value));
+         }
+         else if (localName.equals("transaction-type"))
+         {
+            ejb.setTransactionManagementType(getValue(localName, value));
+         }
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(ApplicationException exception, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("exception-class"))
+      {
+         exception.setExceptionClass(getValue(localName, value));
+      }
+      else if (localName.equals("rollback"))
+      {
+         exception.setRollback(Boolean.valueOf(getValue(localName, value)));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(EntityEnterpriseBean ejb, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (!isEjbParentName(ejb, localName, value))
+      {
+         if (localName.equals("persistence-type"))
+         {
+            ejb.setPersistenceType(getValue(localName, value));
+         }
+      }
+   }
+
+   /**
+    * <!ELEMENT security-role-ref (rolename,role-link))>
+    */
+   public void setValue(SecurityRoleRef parent, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("role-name"))
+      {
+         parent.setRoleName(value);
+      }
+      else if (localName.equals("role-link"))
+      {
+         parent.setRoleLink(value);
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(SecurityIdentity si, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("use-caller-identity"))
+      {
+         si.setUseCallerIdentity(true);
+      }
+   }
+
+   public void setValue(Interceptor interceptor, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("interceptor-class"))
+      {
+         interceptor.setInterceptorClass(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(EjbRelation relation, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-relation-name"))
+      {
+         relation.setEjbRelationName(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(EjbRelationshipRole role, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-relationship-role-name"))
+      {
+         role.setEjbRelationshipRoleName(getValue(localName, value));
+      }
+      else if (localName.equals("multiplicity"))
+      {
+         role.setMultiplicity(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(RelationshipRoleSource source, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-name"))
+      {
+         source.setEjbName(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(CmrField field, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("cmr-field-name"))
+      {
+         field.setCmrFieldName(getValue(localName, value));
+      }
+      else if (localName.equals("cmr-field-type"))
+      {
+         field.setCmrFieldType(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(SecurityRole role, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("role-name"))
+      {
+         role.setRoleName(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(MethodPermission permission, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("role-name"))
+      {
+         permission.addRoleName(getValue(localName, value));
+      }
+      else if (localName.equals("unchecked"))
+      {
+         permission.setUnchecked(true);
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(ContainerTransaction transaction, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("trans-attribute"))
+      {
+         transaction.setTransAttribute(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(Method method, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-name"))
+      {
+         method.setEjbName(getValue(localName, value));
+      }
+      else if (localName.equals("method-name"))
+      {
+         method.setMethodName(getValue(localName, value));
+      }
+      else if (localName.equals("method-param"))
+      {
+         method.addMethodParam(getValue(localName, value));
+      }
+      else if (localName.equals("lifecycle-callback-method"))
+      {
+         method.setMethodName(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(Inject inject, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("jndi-name"))
+      {
+         inject.setJndiName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(InterceptorBinding binding, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-name"))
+      {
+         binding.setEjbName(getValue(localName, value));
+      }
+      else if (localName.equals("interceptor-class"))
+      {
+         binding.addInterceptorClass(getValue(localName, value));
+      }
+      else if (localName.equals("method-name"))
+      {
+         binding.setMethodName(getValue(localName, value));
+      }
+      else if (localName.equals("method-param"))
+      {
+         binding.addMethodParam(getValue(localName, value));
+      }
+      else if (localName.equals("exclude-default-interceptors"))
+      {
+         binding.setExcludeDefaultInterceptors(true);
+      }
+      else if (localName.equals("exclude-class-interceptors"))
+      {
+         binding.setExcludeClassInterceptors(true);
+      }
+   }
+
+   public void setValue(InterceptorOrder order, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("interceptor-class"))
+      {
+         order.addInterceptorClass(getValue(localName, value));
+      }
+   }
+
+   // may want to run StringPropertyReplacer on the whole descriptor at once
+   protected String getValue(String name, String value)
+   {
+      if (value.startsWith("${") && value.endsWith("}"))
+      {
+         String replacement = StringPropertyReplacer.replaceProperties(value);
+         if (replacement != null)
+            value = replacement;
+      }
+      return value;
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbRelation.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbRelation.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbRelation.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Represents an ejb-relation element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class EjbRelation
+{
+
+   private String ejbRelationName = null;
+
+   private List ejbRelationshipRoles = new ArrayList();
+
+   public String getEjbRelationName()
+   {
+      return ejbRelationName;
+   }
+
+   public void setEjbRelationName(String ejbRelationName)
+   {
+      this.ejbRelationName = ejbRelationName;
+   }
+
+   public List getEjbRelationshipRoles()
+   {
+      return ejbRelationshipRoles;
+   }
+
+   public void setEjbRelationshipRoles(List ejbRelationshipRoles)
+   {
+      this.ejbRelationshipRoles = ejbRelationshipRoles;
+   }
+
+   public void addEjbRelationshipRole(EjbRelationshipRole role)
+   {
+      ejbRelationshipRoles.add(role);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbRelationName=").append(ejbRelationName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbRelationshipRole.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbRelationshipRole.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EjbRelationshipRole.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Represents an ejb-relationship-role element of the ejb-jar.xml deployment
+ * descriptor for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class EjbRelationshipRole
+{
+
+   private String ejbRelationshipRoleName;
+
+   private String multiplicity;
+
+   private boolean cascadeDelete = false;
+
+   private List ejbRelationshipRoles = new ArrayList();
+
+   private RelationshipRoleSource relationshipRoleSource;;
+
+   private CmrField cmrField;
+
+   public String getEjbRelationshipRoleName()
+   {
+      return ejbRelationshipRoleName;
+   }
+
+   public void setEjbRelationshipRoleName(String ejbRelationName)
+   {
+      this.ejbRelationshipRoleName = ejbRelationName;
+   }
+
+   public String getMultiplicity()
+   {
+      return multiplicity;
+   }
+
+   public void setMultiplicity(String multiplicity)
+   {
+      this.multiplicity = multiplicity;
+   }
+
+   public boolean isCascadeDelete()
+   {
+      return cascadeDelete;
+   }
+
+   public void setCascadeDelete(boolean cascadeDelete)
+   {
+      this.cascadeDelete = cascadeDelete;
+   }
+
+   public List getEjbRelationshipRoles()
+   {
+      return ejbRelationshipRoles;
+   }
+
+   public void setEjbRelationshipRoles(List ejbRelationshipRoles)
+   {
+      this.ejbRelationshipRoles = ejbRelationshipRoles;
+   }
+
+   public void addEjbRelationshipRole(EjbRelationshipRole role)
+   {
+      ejbRelationshipRoles.add(role);
+   }
+
+   public RelationshipRoleSource getRelationshipRoleSource()
+   {
+      return relationshipRoleSource;
+   }
+
+   public void setRelationshipRoleSource(RelationshipRoleSource relationshipRoleSource)
+   {
+      this.relationshipRoleSource = relationshipRoleSource;
+   }
+
+   public CmrField getCmrField()
+   {
+      return cmrField;
+   }
+
+   public void setCmrField(CmrField cmrField)
+   {
+      this.cmrField = cmrField;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("ejbRelationshipRoleName=").append(ejbRelationshipRoleName);
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EnterpriseBean.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EnterpriseBean.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EnterpriseBean.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,416 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+
+import javax.ejb.TransactionManagementType;
+
+import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
+import org.jboss.metamodel.descriptor.InjectionTarget;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.ResourceEnvRef;
+import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.metamodel.descriptor.SecurityRoleRef;
+
+/**
+ * Represents an EJB element of the ejb-jar.xml deployment descriptor for the
+ * 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 63862 $</tt>
+ */
+public abstract class EnterpriseBean
+   extends EnvironmentRefGroup implements Injectable
+{
+   private static final Logger log = Logger.getLogger(EnterpriseBean.class);
+
+   public static final String BEAN = "Bean";
+
+   public static final String CONTAINER = "Container";
+
+   // ejb-jar.xml
+   private String ejbName = null;
+
+   private String home = null;
+
+   private String remote = null;
+
+   private String localHome = null;
+
+   private String local = null;
+
+   private String ejbClass = null;
+
+   private List<RemoteBinding> remoteBindings = new ArrayList();
+
+   private SecurityIdentity securityIdentity;
+
+   protected TransactionManagementType tmType = null;
+
+   // jboss.xml
+   private String jndiName;
+   private String homeJndiName;
+
+   private String localJndiName;
+   private String localHomeJndiName;
+
+   private String securityDomain;
+
+   private boolean callByValue = false;
+
+   private String aopDomainName = null;
+
+   private MethodAttributes methodAttributes = null;
+
+   private Collection<String> dependencies = new HashSet<String>();
+
+   private Collection<InjectionTarget> ignoreDependencies = new HashSet<InjectionTarget>();
+   
+   private Collection<XmlAnnotation> xmlAnnotations = new HashSet<XmlAnnotation>();
+
+   private PoolConfig poolConfig = null;
+   
+   private Ejb3PortComponent portComponent;
+   
+   /** The security-role-ref element(s) info */
+   private Collection<SecurityRoleRef> securityRoleRefs = new HashSet<SecurityRoleRef>();
+   
+   
+   public void addXmlAnnotation(XmlAnnotation annotation)
+   {
+      xmlAnnotations.add(annotation);
+   }
+
+   public Collection<XmlAnnotation> getXmlAnnotations()
+   {
+      return xmlAnnotations;
+   }
+
+   public void setPoolConfig(PoolConfig poolConfig)
+   {
+      this.poolConfig = poolConfig;
+   }
+
+   public PoolConfig getPoolConfig()
+   {
+      return poolConfig;
+   }
+
+   public void addRemoteBinding(RemoteBinding binding)
+   {
+      remoteBindings.add(binding);
+   }
+
+   public List<RemoteBinding> getRemoteBindings()
+   {
+      return remoteBindings;
+   }
+
+   public void addDependency(String depends)
+   {
+      dependencies.add(depends);
+   }
+
+   public Collection<String> getDependencies()
+   {
+      return dependencies;
+   }
+
+   public void addIgnoreDependency(InjectionTarget ignore)
+   {
+      ignoreDependencies.add(ignore);
+   }
+
+   public Collection<InjectionTarget> getIgnoreDependencies()
+   {
+      return ignoreDependencies;
+   }
+
+   public void mergeMessageDestinationRef(MessageDestinationRef ref)
+   {
+      MessageDestinationRef tmpRef = (MessageDestinationRef)messageDestinationRefs.get(ref.getMessageDestinationRefName());
+      if (tmpRef != null)
+         tmpRef.merge(ref);
+   }
+
+   public void mergeResourceRef(ResourceRef ref)
+   {
+      ResourceRef tmpRef = (ResourceRef)resourceRefs.get(ref.getResRefName());
+      if (tmpRef != null)
+         tmpRef.merge(ref);
+   }
+
+   public void mergeResourceEnvRef(ResourceEnvRef ref)
+   {
+      ResourceEnvRef tmpRef = (ResourceEnvRef)resourceEnvRefs.get(ref.getResRefName());
+      if (tmpRef != null)
+         tmpRef.merge(ref);
+   }
+
+   public void setMethodAttributes(MethodAttributes methodAttributes)
+   {
+      this.methodAttributes = methodAttributes;
+   }
+
+   public MethodAttributes getMethodAttributes()
+   {
+      return methodAttributes;
+   }
+
+   public void setAopDomainName(String aopDomainName)
+   {
+      this.aopDomainName = aopDomainName;
+   }
+
+   public String getAopDomainName()
+   {
+      return aopDomainName;
+   }
+
+   public void setRunAsPrincipal(String principal)
+   {
+      /**
+       * A case where the RunAs is defined in annotations and the 
+       * RunAsPrincipal is specified in jboss.xml
+       */
+      if (securityIdentity == null)
+      {
+         securityIdentity = new SecurityIdentity();
+      }
+      securityIdentity.setRunAsPrincipal(principal);
+   }
+
+   public void setCallByValue(boolean callByValue)
+   {
+      this.callByValue = callByValue;
+   }
+
+   public boolean isCallByValue()
+   {
+      return callByValue;
+   }
+
+   public String getSecurityDomain()
+   {
+      return securityDomain;
+   }
+
+   public void setSecurityDomain(String securityDomain)
+   {
+      this.securityDomain = securityDomain;
+   }
+
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+   
+   public String getHomeJndiName()
+   {
+      return homeJndiName;
+   }
+   
+   public void setHomeJndiName(String homeJndiName)
+   {
+      this.homeJndiName = homeJndiName;
+   }
+
+   public String getLocalJndiName()
+   {
+      return localJndiName;
+   }
+
+   public void setLocalJndiName(String localJndiName)
+   {
+      this.localJndiName = localJndiName;
+   }
+   
+   public String getLocalHomeJndiName()
+   {
+      return localHomeJndiName;
+   }
+
+   public void setLocalHomeJndiName(String localHomeJndiName)
+   {
+      this.localHomeJndiName = localHomeJndiName;
+   }
+
+   public TransactionManagementType getTransactionManagementType()
+   {
+      return tmType;
+   }
+
+   public void setTransactionManagementType(String transactionType)
+   {
+      if (transactionType.equals(BEAN))
+         tmType = TransactionManagementType.BEAN;
+      else if (transactionType.equals(CONTAINER))
+         tmType = TransactionManagementType.CONTAINER;
+   }
+
+   public boolean isSessionBean()
+   {
+      return this instanceof SessionEnterpriseBean;
+   }
+
+   public boolean isConsumer()
+   {
+      return this instanceof Consumer;
+   }
+
+   public boolean isEntityBean()
+   {
+      return this instanceof EntityEnterpriseBean;
+   }
+
+   public boolean isMessageDrivenBean()
+   {
+      return this instanceof MessageDrivenBean;
+   }
+
+   public boolean isService()
+   {
+      return this instanceof Service;
+   }
+
+   public String getEjbName()
+   {
+      return ejbName;
+   }
+
+   public void setEjbName(String ejbName)
+   {
+      this.ejbName = ejbName;
+   }
+
+   public String getHome()
+   {
+      return home;
+   }
+
+   public void setHome(String home)
+   {
+      this.home = home;
+   }
+
+   public String getRemote()
+   {
+      return remote;
+   }
+
+   public void setRemote(String remote)
+   {
+      this.remote = remote;
+   }
+
+   public String getLocalHome()
+   {
+      return localHome;
+   }
+
+   public void setLocalHome(String localHome)
+   {
+      this.localHome = localHome;
+   }
+
+   public String getLocal()
+   {
+      return local;
+   }
+
+   public void setLocal(String local)
+   {
+      this.local = local;
+   }
+
+   public String getEjbClass()
+   {
+      return ejbClass;
+   }
+
+   public void setEjbClass(String ejbClass)
+   {
+      this.ejbClass = ejbClass;
+   }
+
+   public SecurityIdentity getSecurityIdentity()
+   {
+      return securityIdentity;
+   }
+
+   public void setSecurityIdentity(SecurityIdentity securityIdentity)
+   {
+      this.securityIdentity = securityIdentity;
+   }
+   
+   public void addSecurityRoleRef(SecurityRoleRef roleRef)
+   {
+      this.securityRoleRefs.add(roleRef);
+   }
+
+   public Collection<SecurityRoleRef> getSecurityRoleRefs()
+   {
+      return securityRoleRefs;
+   }
+
+   public Ejb3PortComponent getPortComponent()
+   {
+      return portComponent;
+   }
+
+   public void setPortComponent(Ejb3PortComponent portComponent)
+   {
+      this.portComponent = portComponent;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("ejbName=").append(ejbName);
+      sb.append(",remoteBindings=").append(remoteBindings);
+      sb.append(",jndiName=").append(jndiName);
+      sb.append(",local=").append(local);
+      sb.append(",remote=").append(remote);
+      sb.append(",home=").append(home);
+      sb.append(",localHome=").append(localHome);
+      sb.append(",ejbClass=").append(ejbClass);
+      sb.append(",ejbRefs=").append(ejbRefs);
+      sb.append(",ejbLocalRefs=").append(ejbLocalRefs);
+      sb.append(",resourceRefs=").append(resourceRefs);
+      sb.append(",resourceEnvRefs=").append(resourceEnvRefs);
+      sb.append(",methodAttributes=").append(methodAttributes);
+      sb.append(",aopDomainName=").append(aopDomainName);
+      sb.append(",dependencies=").append(dependencies);
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EnterpriseBeans.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EnterpriseBeans.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EnterpriseBeans.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,351 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.EjbLocalRef;
+import org.jboss.metamodel.descriptor.EjbRef;
+import org.jboss.metamodel.descriptor.InjectionTarget;
+import org.jboss.metamodel.descriptor.JndiRef;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.ResourceEnvRef;
+import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+
+/**
+ * Represents EJB elements of the ejb-jar.xml deployment descriptor for the 1.4
+ * schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ *         ejbs.setCurrentEjbName(value); } else if
+ *         (localName.equals("jndi-name")){ ejbs.setJndiName(value);
+ * @version <tt>$Revision: 65861 $</tt>
+ */
+public class EnterpriseBeans
+{
+   private static final Logger log = Logger.getLogger(EnterpriseBeans.class);
+
+   private HashMap<String, EnterpriseBean> enterpriseBeans = new HashMap();
+
+   private EnterpriseBean currentEjb;
+
+   public void setPoolConfig(PoolConfig config)
+   {
+      currentEjb.setPoolConfig(config);
+   }
+
+   public void setDefaultActivationConfig(ActivationConfig config)
+   {
+      ((MessageDrivenBean)currentEjb).setDefaultActivationConfig(config);
+   }
+
+   public void setCacheConfig(CacheConfig config)
+   {
+      ((SessionEnterpriseBean)currentEjb).setCacheConfig(config);
+   }
+
+   public void setClustered(String clustered)
+   {
+      ((SessionEnterpriseBean)currentEjb).setClustered(clustered);
+   }
+
+   public void setConcurrent(String concurrent)
+   {
+      ((SessionEnterpriseBean)currentEjb).setConcurrent(concurrent);
+   }
+
+   public void addJndiRef(JndiRef ref)
+   {
+      currentEjb.addJndiRef(ref);
+   }
+
+   public void addXmlAnnotation(XmlAnnotation xmlAnnotation)
+   {
+      currentEjb.addXmlAnnotation(xmlAnnotation);
+   }
+
+   public void addRemoteBinding(RemoteBinding binding)
+   {
+      currentEjb.addRemoteBinding(binding);
+   }
+
+   public void addIgnoreDependency(InjectionTarget ignore)
+   {
+      currentEjb.addIgnoreDependency(ignore);
+   }
+
+   public void addResourceRef(ResourceRef ref)
+   {
+      currentEjb.mergeResourceRef(ref);
+   }
+
+   public void addResourceEnvRef(ResourceEnvRef ref)
+   {
+      currentEjb.mergeResourceEnvRef(ref);
+   }
+
+   public void addMessageDestinationRef(MessageDestinationRef ref)
+   {
+      currentEjb.mergeMessageDestinationRef(ref);
+   }
+
+   public void addServiceRef(ServiceRefMetaData ref)
+   {
+      currentEjb.addServiceRef(ref);
+   }
+
+   public ServiceRefMetaData getServiceRef(String name)
+   {
+      return currentEjb.getServiceRef(name);
+   }
+
+   public void addPortComponent(Ejb3PortComponent portComp)
+   {
+      currentEjb.setPortComponent(portComp);
+   }
+
+   public void setMethodAttributes(MethodAttributes attributes)
+   {
+      currentEjb.setMethodAttributes(attributes);
+   }
+
+   public void setCurrentEjbName(String currentEjbName, Class ejbClass)
+   {
+      currentEjb = createEjbByEjbName(currentEjbName, ejbClass);
+   }
+
+   public void addDependency(String depends)
+   {
+      currentEjb.addDependency(depends);
+   }
+
+   public void updateEjbRef(EjbRef ref)
+   {
+      currentEjb.updateEjbRef(ref);
+   }
+
+   public void updateEjbLocalRef(EjbLocalRef ref)
+   {
+      currentEjb.updateEjbLocalRef(ref);
+   }
+
+   public void updateResourceRef(ResourceRef ref)
+   {
+      currentEjb.updateResourceRef(ref);
+   }
+
+   public void updateResourceEnvRef(ResourceEnvRef ref)
+   {
+      currentEjb.updateResourceEnvRef(ref);
+   }
+
+   public void updateMessageDestinationRef(MessageDestinationRef ref)
+   {
+      currentEjb.updateMessageDestinationRef(ref);
+   }
+
+   public void setResourceAdapterName(String name)
+   {
+      ((MessageDrivenBean)currentEjb).setResourceAdaptorName(name);
+   }
+
+   public void setDestinationJndiName(String name)
+   {
+      ((MessageDrivenBean)currentEjb).setDestinationJndiName(name);
+   }
+
+   public void setMdbUser(String name)
+   {
+      ((MessageDrivenBean)currentEjb).setMdbUser(name);
+   }
+
+   public void setMdbPassword(String name)
+   {
+      ((MessageDrivenBean)currentEjb).setMdbPassword(name);
+   }
+
+   public void setMdbSubscriptionId(String id)
+   {
+      ((MessageDrivenBean)currentEjb).setMdbSubscriptionId(id);
+   }
+
+   public void setAopDomainName(String aopDomainName)
+   {
+      currentEjb.setAopDomainName(aopDomainName);
+   }
+
+   public void setRunAsPrincipal(String principal)
+   {
+      currentEjb.setRunAsPrincipal(principal);
+   }
+
+   public void setClusterConfig(ClusterConfig config)
+   {
+      ((SessionEnterpriseBean)currentEjb).setClusterConfig(config);
+   }
+
+   public void setCallByValue(boolean callByValue)
+   {
+      currentEjb.setCallByValue(callByValue);
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      currentEjb.setJndiName(jndiName);
+   }
+
+   public void setHomeJndiName(String homeJndiName)
+   {
+      currentEjb.setHomeJndiName(homeJndiName);
+   }
+
+   public void setSecurityDomain(String securityDomain)
+   {
+      currentEjb.setSecurityDomain(securityDomain);
+   }
+
+   public void setLocalJndiName(String jndiName)
+   {
+      currentEjb.setLocalJndiName(jndiName);
+   }
+
+   public void setLocalHomeJndiName(String homeJndiName)
+   {
+      currentEjb.setLocalHomeJndiName(homeJndiName);
+   }
+
+   public EnterpriseBean createEjbByEjbName(String ejbName, Class ejbClass)
+   {
+      EnterpriseBean ejb = (EnterpriseBean)enterpriseBeans.get(ejbName);
+      if (ejb != null)
+         return ejb;
+
+      try
+      {
+         ejb = (EnterpriseBean)ejbClass.newInstance();
+         ejb.setEjbName(ejbName);
+         enterpriseBeans.put(ejbName, ejb);
+      }
+      catch (Exception e)
+      {
+      }
+
+      return ejb;
+   }
+
+   public EnterpriseBean findEjbByEjbName(String ejbName)
+   {
+      return enterpriseBeans.get(ejbName);
+   }
+
+   public List<EnterpriseBean> findEjbsByClass(String className)
+   {
+      ArrayList<EnterpriseBean> result = new ArrayList<EnterpriseBean>();
+
+      Iterator ejbs = enterpriseBeans.values().iterator();
+      while (ejbs.hasNext())
+      {
+         EnterpriseBean ejb = (EnterpriseBean)ejbs.next();
+         String ejbClassName = ejb.getEjbClass();
+         if (ejbClassName != null && ejbClassName.equals(className))
+            result.add(ejb);
+      }
+      return result;
+   }
+
+   public EnterpriseBean findEjbByRemote(String remote)
+   {
+      Iterator ejbs = enterpriseBeans.values().iterator();
+      while (ejbs.hasNext())
+      {
+         EnterpriseBean ejb = (EnterpriseBean)ejbs.next();
+         if (ejb.getRemote() != null && ejb.getRemote().equals(remote))
+            return ejb;
+      }
+      return null;
+   }
+
+   public EnterpriseBean findEjbByLocal(String local)
+   {
+      Iterator ejbs = enterpriseBeans.values().iterator();
+      while (ejbs.hasNext())
+      {
+         EnterpriseBean ejb = (EnterpriseBean)ejbs.next();
+         if (ejb.getLocal() != null && ejb.getLocal().equals(local))
+            return ejb;
+      }
+      return null;
+   }
+
+   public Collection<EnterpriseBean> getEnterpriseBeans()
+   {
+      return enterpriseBeans.values();
+   }
+
+   /*   public void setEnterpriseBeans(List enterpriseBeans)
+    {
+    this.enterpriseBeans = enterpriseBeans;
+    }*/
+
+   public void addEnterpriseBean(EnterpriseBean ejb)
+   {
+      enterpriseBeans.put(ejb.getEjbName(), ejb);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("enterpriseBeans=").append(enterpriseBeans);
+      sb.append("]");
+      return sb.toString();
+   }
+
+   public boolean equals(Object o)
+   {
+      if (this == o)
+         return true;
+      if (!(o instanceof EnterpriseBeans))
+         return false;
+
+      final EnterpriseBeans ejbs = (EnterpriseBeans)o;
+
+      if (enterpriseBeans != null ? !enterpriseBeans.equals(ejbs.enterpriseBeans) : ejbs.enterpriseBeans != null)
+         return false;
+
+      return true;
+   }
+
+   public int hashCode()
+   {
+      int result;
+      result = (enterpriseBeans != null ? enterpriseBeans.hashCode() : 0);
+      // result = 29 * result + (version != null ? version.hashCode() : 0);
+      return result;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/EntityEnterpriseBean.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Represents an Entity EJB element of the ejb-jar.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class EntityEnterpriseBean extends EnterpriseBean
+{
+
+   private String persistenceType;
+
+   private List cmpFields = new ArrayList();
+
+   private List queries = new ArrayList();
+
+   public String getPersistenceType()
+   {
+      return persistenceType;
+   }
+
+   public void setPersistenceType(String persistenceType)
+   {
+      this.persistenceType = persistenceType;
+   }
+
+   public List getCmpFields()
+   {
+      return cmpFields;
+   }
+
+   public void setCmpFields(List cmpFields)
+   {
+      this.cmpFields = cmpFields;
+   }
+
+   public void addCmpField(CmpField cmpField)
+   {
+      cmpFields.add(cmpField);
+   }
+
+   public List getQueries()
+   {
+      return queries;
+   }
+
+   public void setQueries(List queries)
+   {
+      this.queries = queries;
+   }
+
+   public void addQuery(Query query)
+   {
+      queries.add(query);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append('[');
+      sb.append(super.toString());
+      sb.append(",");
+      sb.append("persistenceType=").append(persistenceType);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeClassInterceptors.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61136 $
+ */
+public class ExcludeClassInterceptors
+{
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeDefaultInterceptors.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61136 $
+ */
+public class ExcludeDefaultInterceptors
+{
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeList.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeList.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ExcludeList.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents an <exlude-list> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class ExcludeList
+{
+   private static final Logger log = Logger.getLogger(ExcludeList.class);
+
+   private List methods = new ArrayList();
+
+   public List getMethods()
+   {
+      return methods;
+   }
+
+   public void addMethod(Method method)
+   {
+      methods.add(method);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("methods=").append(methods);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/GenericBean.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/GenericBean.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/GenericBean.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.ejb3.metamodel;
+
+/**
+ * Bean deployment descriptors found in jboss.xml for an unknown (/ annotated)
+ * Enterprise Java Bean.
+ * 
+ * TODO: maybe instantiate EnterpriseBean instead
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class GenericBean extends EnterpriseBean
+{
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InitList.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InitList.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InitList.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents an <init-list> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class InitList
+{
+   private static final Logger log = Logger.getLogger(InitList.class);
+
+   private List methods = new ArrayList();
+
+   public List getMethods()
+   {
+      return methods;
+   }
+
+   public void addMethod(Method method)
+   {
+      methods.add(method);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("methods=").append(methods);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InitMethod.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InitMethod.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InitMethod.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * Represents an <init-method> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class InitMethod
+{
+   private Method beanMethod;
+   private Method createMethod;
+
+   public Method getBeanMethod()
+   {
+      return beanMethod;
+   }
+
+   public void setBeanMethod(Method beanMethod)
+   {
+      this.beanMethod = beanMethod;
+   }
+
+   public Method getCreateMethod()
+   {
+      return createMethod;
+   }
+
+   public void setCreateMethod(Method createMethod)
+   {
+      this.createMethod = createMethod;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("method=").append(beanMethod);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Inject.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Inject.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Inject.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents an <inject> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class Inject
+{
+   private static final Logger log = Logger.getLogger(Inject.class);
+
+   private List methods = new ArrayList();
+   private String jndiName;
+
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+
+   public List getMethods()
+   {
+      return methods;
+   }
+
+   public void addMethod(Method method)
+   {
+      methods.add(method);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("jndiName=").append(jndiName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Injectable.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Injectable.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Injectable.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.jboss.metamodel.descriptor.EjbLocalRef;
+import org.jboss.metamodel.descriptor.EjbRef;
+import org.jboss.metamodel.descriptor.JndiRef;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.PersistenceContextRef;
+import org.jboss.metamodel.descriptor.PersistenceUnitRef;
+import org.jboss.metamodel.descriptor.ResourceEnvRef;
+import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 65861 $
+ */
+public interface Injectable
+{
+
+   Collection<EjbLocalRef> getEjbLocalRefs();
+
+   Collection<EjbRef> getEjbRefs();
+
+   Collection<ResourceEnvRef> getResourceEnvRefs();
+
+   Collection<ResourceRef> getResourceRefs();
+
+   Collection<ServiceRefMetaData> getServiceRefs();
+
+   Collection<MessageDestinationRef> getMessageDestinationRefs();
+
+   List<PersistenceUnitRef> getPersistenceUnitRefs();
+
+   List<PersistenceContextRef> getPersistenceContextRefs();
+
+   Collection<JndiRef> getJndiRefs();
+}
\ No newline at end of file

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Interceptor.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Interceptor.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Interceptor.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
+import org.jboss.metamodel.descriptor.PersistenceContextRef;
+import org.jboss.metamodel.descriptor.PersistenceUnitRef;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 75470 $
+ */
+public class Interceptor
+   extends EnvironmentRefGroup implements Injectable
+{
+   String interceptorClass;
+   Method aroundInvoke;
+   Method postConstruct;
+   Method postActivate;
+   Method preDestroy;
+   Method prePassivate;
+
+   public Interceptor()
+   {
+   }
+
+   public Method getAroundInvoke()
+   {
+      return aroundInvoke;
+   }
+
+   public void setAroundInvoke(Method aroundInvoke)
+   {
+      this.aroundInvoke = aroundInvoke;
+   }
+
+   public String getInterceptorClass()
+   {
+      return interceptorClass;
+   }
+
+   public void setInterceptorClass(String interceptorClass)
+   {
+      this.interceptorClass = interceptorClass;
+   }
+
+   public Method getPostActivate()
+   {
+      return postActivate;
+   }
+
+   public void setPostActivate(Method postActivate)
+   {
+      this.postActivate = postActivate;
+   }
+
+   public Method getPostConstruct()
+   {
+      return postConstruct;
+   }
+
+   public void setPostConstruct(Method postConstruct)
+   {
+      this.postConstruct = postConstruct;
+   }
+
+   public Method getPreDestroy()
+   {
+      return preDestroy;
+   }
+
+   public void setPreDestroy(Method preDestroy)
+   {
+      this.preDestroy = preDestroy;
+   }
+
+   public Method getPrePassivate()
+   {
+      return prePassivate;
+   }
+
+   public void setPrePassivate(Method prePassivate)
+   {
+      this.prePassivate = prePassivate;
+   }
+
+   private List<PersistenceContextRef> persistenceContextRefs = new ArrayList<PersistenceContextRef>();
+   private List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
+
+   public List<PersistenceContextRef> getPersistenceContextRefs()
+   {
+      return persistenceContextRefs;
+   }
+
+   public List<PersistenceUnitRef> getPersistenceUnitRefs()
+   {
+      return persistenceUnitRefs;
+   }
+
+   public void addPersistenceContextRef(PersistenceContextRef ref)
+   {
+      persistenceContextRefs.add(ref);
+   }
+
+   public void addPersistenceUnitRef(PersistenceUnitRef ref)
+   {
+      persistenceUnitRefs.add(ref);
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InterceptorBinding.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InterceptorBinding.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InterceptorBinding.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61136 $
+ */
+public class InterceptorBinding extends Method
+{
+   Boolean ordered = null;
+   private ArrayList<String> interceptorClasses = new ArrayList<String>();
+   private boolean excludeDefaultInterceptors;
+   private boolean excludeClassInterceptors;
+   
+   public InterceptorBinding()
+   {
+      super();
+   }
+
+   public boolean getExcludeClassInterceptors()
+   {
+      return excludeClassInterceptors;
+   }
+
+   public void setExcludeClassInterceptors(boolean excludeClassInterceptors)
+   {
+      this.excludeClassInterceptors = excludeClassInterceptors;
+   }
+
+   public boolean getExcludeDefaultInterceptors()
+   {
+      return excludeDefaultInterceptors;
+   }
+
+   public void setExcludeDefaultInterceptors(boolean excludeDefaultInterceptors)
+   {
+      this.excludeDefaultInterceptors = excludeDefaultInterceptors;
+   }
+
+   public ArrayList<String> getInterceptorClasses()
+   {
+      return interceptorClasses;
+   }
+
+   public void addInterceptorClass(String interceptorClass)
+   {
+      if (ordered == null)
+      {
+         ordered = false;
+      }
+      if (ordered) throw new RuntimeException("Cannot have both interceptor-class and interceptor-order in interceptor-binding");
+      this.interceptorClasses.add(interceptorClass);
+   }
+
+   public void setOrderedInterceptorClasses(InterceptorOrder order)
+   {
+      if (ordered == null)
+      {
+         ordered = true;
+      }
+      if (!ordered) throw new RuntimeException("Cannot have both interceptor-class and interceptor-order in interceptor-binding");
+      this.interceptorClasses.addAll(order.getInterceptorClasses());
+   }
+
+   public boolean isOrdered()
+   {
+      if (ordered == null) return false;
+      return ordered;
+   }
+
+   public String toString()
+   {
+      return InterceptorBinding.class.getName() + "[ejbName=" + getEjbName() +
+         ",methodName=" + getMethodName() +
+         ",ordered=" + isOrdered() + 
+         ",excludeClassInterceptors=" + excludeClassInterceptors + 
+         ",excludeDefaultInterceptors=" + excludeDefaultInterceptors +
+         ",interceptorClasses=" + interceptorClasses +
+         "]";
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InterceptorOrder.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InterceptorOrder.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/InterceptorOrder.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61136 $
+ */
+public class InterceptorOrder
+{
+   private ArrayList<String> interceptorClasses = new ArrayList<String>();
+
+   public InterceptorOrder()
+   {
+      // FIXME InterceptorOrder constructor
+      super();
+   }
+
+   public void addInterceptorClass(String interceptorClass)
+   {
+      this.interceptorClasses.add(interceptorClass);
+   }
+
+   public ArrayList<String> getInterceptorClasses()
+   {
+      return interceptorClasses;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Interceptors.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Interceptors.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Interceptors.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61136 $
+ */
+public class Interceptors
+{
+   ArrayList<Interceptor> interceptors = new ArrayList<Interceptor>();
+   
+   public Interceptors()
+   {
+      // FIXME Interceptors constructor
+      super();
+   }
+   
+   public void addInterceptor(Interceptor interceptor)
+   {
+      interceptors.add(interceptor);
+   }
+
+   public ArrayList<Interceptor> getInterceptors()
+   {
+      return interceptors;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,161 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * 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.ejb3.metamodel;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.metamodel.descriptor.DDObjectFactory;
+import org.jboss.metamodel.descriptor.EjbRef;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.ResourceEnvRef;
+import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A JBossXB object factory for parsing JBoss application client descriptor files.
+ * 
+ * http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd
+ * 
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class JBossClientDDObjectFactory extends DDObjectFactory
+{
+   private static final Logger log = Logger.getLogger(JBossClientDDObjectFactory.class);
+
+   private ApplicationClientDD dd;
+
+   public static ApplicationClientDD parse(URL ddResource, ApplicationClientDD dd) throws JBossXBException, IOException
+   {
+      // TODO: how to properly fix this
+      if (dd == null)
+         dd = new ApplicationClientDD();
+
+      if (ddResource == null)
+         return dd;
+
+      log.debug("found jboss-client.xml " + ddResource);
+
+      JBossClientDDObjectFactory factory = new JBossClientDDObjectFactory(dd);
+      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
+      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
+      unmarshaller.setEntityResolver(new JBossEntityResolver());
+      unmarshaller.setNamespaceAware(true);
+      unmarshaller.setSchemaValidation(true);
+      unmarshaller.setValidation(true);
+
+      dd = (ApplicationClientDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null);
+
+      return dd;
+   }
+
+   public JBossClientDDObjectFactory(ApplicationClientDD dd)
+   {
+      // JBossXB will otherwise fail later on
+      if (dd == null)
+         throw new NullPointerException("dd is null");
+
+      this.dd = dd;
+   }
+
+   public void addChild(ApplicationClientDD parent, EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      dd.updateEjbRef(ref);
+   }
+
+   public void addChild(ApplicationClientDD parent, MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      dd.updateMessageDestinationRef(ref);
+   }
+
+   public void addChild(ApplicationClientDD parent, ServiceRefMetaData sref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      String refName = sref.getServiceRefName();
+      if (refName == null)
+         throw new IllegalStateException("Invalid service-ref-name: " + refName);
+
+      ServiceRefMetaData targetRef = parent.getServiceRef(refName);
+      if (targetRef == null)
+      {
+         log.debug("Cannot find <service-ref> with name: " + refName);
+         parent.addServiceRef(sref);
+      }
+      else
+      {
+         targetRef.merge(sref);
+      }
+   }
+
+   public void addChild(ApplicationClientDD dd, ResourceEnvRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      dd.updateResourceEnvRef(envRef);
+   }
+
+   public void addChild(ApplicationClientDD parent, ResourceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      dd.updateResourceRef(ref);
+   }
+
+   public Object completeRoot(Object root, UnmarshallingContext navigator, String uri, String name)
+   {
+      return root;
+   }
+
+   public Object newChild(ApplicationClientDD dd, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      child = newEnvRefGroupChild(localName);
+      if (child != null)
+         return child;
+
+      // space for more
+      if (localName.equals("webservices"))
+      {
+         // TODO: Similiar delegate mechanism as for <service-ref>
+         System.out.println("** Skip <webservices> element in JBossClientDDObjectfactory **");
+      }
+
+      return child;
+   }
+
+   public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return dd;
+   }
+
+   public void setValue(ApplicationClientDD dd, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("jndi-name"))
+         dd.setJndiName(value);
+      else if (localName.equals("depends"))
+         dd.addDependency(value);
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,1216 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.SecurityRoleMetaData;
+import org.jboss.metamodel.descriptor.DDObjectFactory;
+import org.jboss.metamodel.descriptor.EjbLocalRef;
+import org.jboss.metamodel.descriptor.EjbRef;
+import org.jboss.metamodel.descriptor.InjectionTarget;
+import org.jboss.metamodel.descriptor.JndiRef;
+import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.NameValuePair;
+import org.jboss.metamodel.descriptor.ResourceEnvRef;
+import org.jboss.metamodel.descriptor.ResourceRef;
+import org.jboss.util.StringPropertyReplacer;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * Represents the jboss.xml deployment descriptor for the 2.1 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @author Anil.Saldhana at jboss.com
+ * @version <tt>$Revision: 65861 $</tt>
+ */
+public class JBossDDObjectFactory extends DDObjectFactory
+{
+   private static final Logger log = Logger.getLogger(JBossDDObjectFactory.class);
+
+   private EjbJarDD dd;
+   private Class ejbClass;
+
+   public static EjbJarDD parse(URL ddResource, EjbJarDD dd) throws JBossXBException, IOException
+   {
+      ObjectModelFactory factory = null;
+      Unmarshaller unmarshaller = null;
+
+      if (ddResource != null)
+      {
+         log.debug("found jboss.xml " + ddResource);
+
+         if (dd == null)
+            dd = new EjbJarDD();
+
+         factory = new JBossDDObjectFactory(dd);
+         UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
+         unmarshaller = unmarshallerFactory.newUnmarshaller();
+         unmarshaller.setEntityResolver(new JBossEntityResolver());
+         unmarshaller.setNamespaceAware(true);
+         unmarshaller.setSchemaValidation(true);
+         unmarshaller.setValidation(true);
+
+         dd = (EjbJarDD)unmarshaller.unmarshal(ddResource.openStream(), factory, null);
+      }
+
+      return dd;
+   }
+
+   public JBossDDObjectFactory(EjbJarDD dd)
+   {
+      super();
+      this.dd = dd;
+   }
+
+   /**
+    * Return the root.
+    */
+   public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return dd;
+   }
+
+   public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
+   {
+      return root;
+   }
+
+   // Methods discovered by introspection
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(EjbJarDD dd, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("enterprise-beans"))
+      {
+         child = dd.getEnterpriseBeans();
+         if (child == null)
+         {
+            dd.setEnterpriseBeans(new EnterpriseBeans());
+            child = dd.getEnterpriseBeans();
+         }
+      }
+      else if (localName.equals("assembly-descriptor"))
+      {
+         child = dd.getAssemblyDescriptor();
+         if (child == null)
+         {
+            dd.setAssemblyDescriptor(new AssemblyDescriptor());
+            child = dd.getAssemblyDescriptor();
+         }
+      }
+      else if (localName.equals("resource-manager"))
+      {
+         child = new ResourceManager();
+      }
+      else if (localName.equals("webservices"))
+      {
+         child = dd.getWebservices();
+         if (child == null)
+         {
+            dd.setWebservices(new Webservices());
+            child = dd.getWebservices();
+         }
+      }
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(Consumer consumer, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if ((child = this.newEnvRefGroupChild(localName)) != null)
+         return child;
+
+      if (localName.equals("current-message"))
+      {
+         child = new CurrentMessage();
+      }
+      else if (localName.equals("message-properties"))
+      {
+         child = new MessageProperties();
+      }
+      else if (localName.equals("producer"))
+      {
+         child = new Producer(false);
+      }
+      else if (localName.equals("local-producer"))
+      {
+         child = new Producer(true);
+      }
+      else if (localName.equals("annotation"))
+      {
+         child = new XmlAnnotation();
+      }
+      else if (localName.equals("ignore-dependency"))
+      {
+         child = new InjectionTarget();
+      }
+      else if (localName.equals("remote-binding"))
+      {
+         child = new RemoteBinding();
+      }
+      else if (localName.equals("pool-config"))
+      {
+         child = new PoolConfig();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(Service service, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if ((child = this.newEnvRefGroupChild(localName)) != null)
+         return child;
+
+      if (localName.equals("ignore-dependency"))
+      {
+         child = new InjectionTarget();
+      }
+      else if (localName.equals("annotation"))
+      {
+         child = new XmlAnnotation();
+      }
+      else if (localName.equals("remote-binding"))
+      {
+         child = new RemoteBinding();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(Webservices webservices, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("webservice-description"))
+      {
+         child = new WebserviceDescription();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(CurrentMessage message, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method"))
+      {
+         child = new Method();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(MessageProperties properties, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method"))
+      {
+         child = new Method();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(MethodAttributes attributes, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("method"))
+      {
+         child = new Method();
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(AssemblyDescriptor descriptor, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("message-destination"))
+      {
+         child = new MessageDestination();
+      }
+      if (localName.equals("security-role"))
+      {
+         child = new SecurityRoleMetaData("dummy_to_be_replaced_in_setValue");
+      }
+
+      return child;
+   }
+
+   /**
+    * Called when parsing of a new element started.
+    */
+   public Object newChild(EnterpriseBeans ejbs, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if ((child = this.newEnvRefGroupChild(localName)) != null)
+      {
+         return child;
+      }
+
+      if (localName.equals("session"))
+      {
+         ejbClass = SessionEnterpriseBean.class;
+         child = ejbs;
+      }
+      else if (localName.equals("message-driven"))
+      {
+         ejbClass = MessageDrivenBean.class;
+         child = ejbs;
+      }
+      else if (localName.equals("ejb"))
+      {
+         ejbClass = GenericBean.class;
+         child = ejbs;
+      }
+      else if (localName.equals("service"))
+      {
+         child = new Service();
+      }
+      else if (localName.equals("consumer"))
+      {
+         child = new Consumer();
+      }
+      else if (localName.equals("method-attributes"))
+      {
+         child = new MethodAttributes();
+      }
+      else if (localName.equals("annotation"))
+      {
+         child = new XmlAnnotation();
+      }
+      else if (localName.equals("ignore-dependency"))
+      {
+         child = new InjectionTarget();
+      }
+      else if (localName.equals("cluster-config"))
+      {
+         child = new ClusterConfig();
+      }
+      else if (localName.equals("remote-binding"))
+      {
+         child = new RemoteBinding();
+      }
+      else if (localName.equals("cache-config"))
+      {
+         child = new CacheConfig();
+      }
+      else if (localName.equals("pool-config"))
+      {
+         child = new PoolConfig();
+      }
+      else if (localName.equals("default-activation-config"))
+      {
+         child = new ActivationConfig();
+      }
+      else if (localName.equals("port-component"))
+      {
+         child = new Ejb3PortComponent();
+      }
+      return child;
+   }
+
+   public Object newChild(ActivationConfig parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("default-activation-config-property"))
+      {
+         child = new NameValuePair();
+      }
+
+      return child;
+   }
+
+   public Object newChild(XmlAnnotation parent, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+
+      if (localName.equals("injection-target"))
+      {
+         child = new InjectionTarget();
+      }
+      else if (localName.equals("property"))
+      {
+         child = new NameValuePair();
+      }
+
+      return child;
+   }
+
+   public void addChild(SessionEnterpriseBean parent, Ejb3PortComponent portComp, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setPortComponent(portComp);
+   }
+
+   public void addChild(XmlAnnotation parent, NameValuePair property, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addProperty(property);
+   }
+
+   public void addChild(XmlAnnotation parent, InjectionTarget injectionTarget, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(injectionTarget);
+   }
+
+   public void addChild(EnterpriseBeans parent, ActivationConfig config, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setDefaultActivationConfig(config);
+   }
+
+   public void addChild(ActivationConfig parent, NameValuePair property, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addActivationConfigProperty(property);
+   }
+
+   public void addChild(Consumer parent, Producer producer, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      if (producer.isLocal())
+         parent.addLocalProducer(producer);
+      else parent.addProducer(producer);
+   }
+
+   public void addChild(Consumer parent, RemoteBinding binding, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addRemoteBinding(binding);
+   }
+
+   public void addChild(AssemblyDescriptor parent, MessageDestination destination, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMessageDestination(destination);
+   }
+
+   public void addChild(AssemblyDescriptor parent, SecurityRoleMetaData srm, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addSecurityRoleMetaData(srm);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, CacheConfig config, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setCacheConfig(config);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, PoolConfig config, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setPoolConfig(config);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, MethodAttributes attributes, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setMethodAttributes(attributes);
+   }
+
+   public void addChild(EnterpriseBeans parent, RemoteBinding binding, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addRemoteBinding(binding);
+   }
+
+   public void addChild(EnterpriseBeans parent, InjectionTarget ignoreDependency, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addIgnoreDependency(ignoreDependency);
+   }
+
+   public void addChild(EnterpriseBeans parent, XmlAnnotation xmlAnnotation, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addXmlAnnotation(xmlAnnotation);
+   }
+
+   public void addChild(EnterpriseBeans parent, Ejb3PortComponent portComp, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addPortComponent(portComp);
+   }
+
+   public void addChild(MethodAttributes parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMethod(method);
+   }
+
+   public void addChild(Consumer parent, CurrentMessage message, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setCurrentMessage(message);
+   }
+
+   public void addChild(Consumer parent, PoolConfig config, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setPoolConfig(config);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Consumer parent, MessageProperties message, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setMessageProperties(message);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(CurrentMessage parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMethod(method);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(MessageProperties parent, Method method, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addMethod(method);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, Service service, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEnterpriseBean(service);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Service parent, EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Service parent, RemoteBinding binding, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addRemoteBinding(binding);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Service parent, EjbLocalRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbLocalRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Service parent, ResourceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Service parent, JndiRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addJndiRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Service parent, ResourceEnvRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceEnvRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Consumer parent, EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Consumer parent, EjbLocalRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEjbLocalRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Consumer parent, ResourceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Consumer parent, JndiRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addJndiRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Consumer parent, ResourceEnvRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceEnvRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, Consumer consumer, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addEnterpriseBean(consumer);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(Webservices parent, WebserviceDescription desc, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.getWebserviceDescriptions().add(desc);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, JndiRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addJndiRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EjbJarDD parent, ResourceManager manager, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.addResourceManager(manager);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EjbJarDD parent, Webservices webservices, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setWebservices(webservices);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, EnterpriseBeans ejbs, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.updateEjbRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, EjbLocalRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.updateEjbLocalRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, ClusterConfig config, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setClusterConfig(config);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, ResourceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.updateResourceRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.updateMessageDestinationRef(ref);
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, ServiceRefMetaData sref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      String refName = sref.getServiceRefName();
+      if (refName == null)
+         throw new IllegalStateException("Invalid service-ref-name: " + refName);
+
+      ServiceRefMetaData targetRef = parent.getServiceRef(refName);
+      if (targetRef == null)
+      {
+         log.debug("Cannot find <service-ref> with name: " + refName);
+         parent.addServiceRef(sref);
+      }
+      else
+      {
+         targetRef.merge(sref);
+      }
+   }
+
+   /**
+    * Called when parsing character is complete.
+    */
+   public void addChild(EnterpriseBeans parent, ResourceEnvRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.updateResourceEnvRef(ref);
+   }
+
+   public void setValue(XmlAnnotation xmlAnnotation, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("annotation-class"))
+      {
+         xmlAnnotation.setAnnotationClass(getValue(localName, value));
+      }
+      else if (localName.equals("annotation-implementation-class"))
+      {
+         xmlAnnotation.setAnnotationImplementationClass(getValue(localName, value));
+      }
+   }
+
+   public void setValue(NameValuePair property, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("activation-config-property-name") || localName.equals("message-driven-config-property-name") || localName.equals("property-name"))
+      {
+         property.setName(getValue(localName, value));
+      }
+      else if (localName.equals("activation-config-property-value") || localName.equals("message-driven-config-property-value") || localName.equals("property-value"))
+      {
+         property.setValue(getValue(localName, value));
+      }
+   }
+
+   public void setValue(ResourceManager manager, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("res-name"))
+      {
+         manager.setResourceName(getValue(localName, value));
+      }
+      else if (localName.equals("res-jndi-name"))
+      {
+         manager.setResourceJndiName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(MessageDestination destination, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("message-destination-name"))
+      {
+         destination.setMessageDestinationName(getValue(localName, value));
+      }
+      else if (localName.equals("jndi-name"))
+      {
+         destination.setJndiName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(EnterpriseBeans ejbs, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-name"))
+      {
+         ejbs.setCurrentEjbName(value, ejbClass);
+      }
+      else if (localName.equals("jndi-name"))
+      {
+         ejbs.setJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("home-jndi-name"))
+      {
+         ejbs.setHomeJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("local-jndi-name"))
+      {
+         ejbs.setLocalJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("local-home-jndi-name"))
+      {
+         ejbs.setLocalHomeJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("security-domain"))
+      {
+         ejbs.setSecurityDomain(getValue(localName, value));
+      }
+      else if (localName.equals("depends"))
+      {
+         ejbs.addDependency(getValue(localName, value));
+      }
+      else if (localName.equals("run-as-principal"))
+      {
+         ejbs.setRunAsPrincipal(getValue(localName, value));
+      }
+      else if (localName.equals("aop-domain-name"))
+      {
+         ejbs.setAopDomainName(getValue(localName, value));
+      }
+      else if (localName.equals("resource-adapter-name"))
+      {
+         ejbs.setResourceAdapterName(getValue(localName, value));
+      }
+      else if (localName.equals("destination-jndi-name"))
+      {
+         ejbs.setDestinationJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("mdb-user"))
+      {
+         ejbs.setMdbUser(getValue(localName, value));
+      }
+      else if (localName.equals("mdb-passwd"))
+      {
+         ejbs.setMdbPassword(getValue(localName, value));
+      }
+      else if (localName.equals("mdb-subscription-id"))
+      {
+         ejbs.setMdbSubscriptionId(getValue(localName, value));
+      }
+      else if (localName.equals("clustered"))
+      {
+         ejbs.setClustered(getValue(localName, value));
+      }
+      else if (localName.equals("concurrent"))
+      {
+         ejbs.setConcurrent(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(Service service, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-name"))
+      {
+         service.setEjbName(getValue(localName, value));
+      }
+      if (localName.equals("object-name"))
+      {
+         service.setObjectName(getValue(localName, value));
+      }
+      else if (localName.equals("ejb-class"))
+      {
+         service.setEjbClass(getValue(localName, value));
+      }
+      if (localName.equals("xmbean"))
+      {
+         service.setXMBean(getValue(localName, value));
+      }
+      else if (localName.equals("local"))
+      {
+         service.setLocal(getValue(localName, value));
+      }
+      else if (localName.equals("remote"))
+      {
+         service.setRemote(getValue(localName, value));
+      }
+      else if (localName.equals("management"))
+      {
+         service.setManagement(getValue(localName, value));
+      }
+      else if (localName.equals("jndi-name"))
+      {
+         service.setJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("local-jndi-name"))
+      {
+         service.setLocalJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("security-domain"))
+      {
+         service.setSecurityDomain(getValue(localName, value));
+      }
+      else if (localName.equals("aop-domain-name"))
+      {
+         service.setAopDomainName(getValue(localName, value));
+      }
+      else if (localName.equals("depends"))
+      {
+         service.addDependency(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(Consumer consumer, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("message-destination"))
+      {
+         consumer.setDestination(getValue(localName, value));
+      }
+      else if (localName.equals("message-destination-type"))
+      {
+         consumer.setDestinationType(getValue(localName, value));
+      }
+      else if (localName.equals("ejb-class"))
+      {
+         consumer.setEjbClass(getValue(localName, value));
+         consumer.setEjbName(getValue(localName, value));
+      }
+      else if (localName.equals("local"))
+      {
+         consumer.setLocal(getValue(localName, value));
+      }
+      else if (localName.equals("remote"))
+      {
+         consumer.setRemote(getValue(localName, value));
+      }
+      else if (localName.equals("jndi-name"))
+      {
+         consumer.setJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("local-jndi-name"))
+      {
+         consumer.setLocalJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("security-domain"))
+      {
+         consumer.setSecurityDomain(getValue(localName, value));
+      }
+      else if (localName.equals("run-as-principal"))
+      {
+         consumer.setRunAsPrincipal(getValue(localName, value));
+      }
+      else if (localName.equals("aop-domain-name"))
+      {
+         consumer.setAopDomainName(getValue(localName, value));
+      }
+      else if (localName.equals("depends"))
+      {
+         consumer.addDependency(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(RemoteBinding binding, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("jndi-name"))
+      {
+         binding.setJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("client-bind-url"))
+      {
+         binding.setClientBindUrl(getValue(localName, value));
+      }
+      else if (localName.equals("proxy-factory"))
+      {
+         binding.setProxyFactory(getValue(localName, value));
+      }
+      else if (localName.equals("interceptor-stack"))
+      {
+         binding.setInterceptorStack(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(MessageProperties properties, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("delivery"))
+      {
+         properties.setDelivery(getValue(localName, value));
+      }
+      else if (localName.equals("class"))
+      {
+         properties.setClassName(getValue(localName, value));
+      }
+      else if (localName.equals("priority"))
+      {
+         properties.setPriority(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(ClusterConfig config, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("load-balance-policy"))
+      {
+         config.setLoadBalancePolicy(getValue(localName, value));
+      }
+      else if (localName.equals("partition-name"))
+      {
+         config.setPartition(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(CacheConfig config, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("cache-class"))
+      {
+         config.setCacheClass(getValue(localName, value));
+      }
+      else if (localName.equals("cache-max-size"))
+      {
+         config.setMaxSize(getValue(localName, value));
+      }
+      else if (localName.equals("idle-timeout-seconds"))
+      {
+         config.setIdleTimeoutSeconds(getValue(localName, value));
+      }
+      else if (localName.equals("remove-timeout-seconds"))
+      {
+         config.setRemoveTimeoutSeconds(getValue(localName, value));
+      }
+      else if (localName.equals("cache-name"))
+      {
+         config.setName(getValue(localName, value));
+      }
+      else if (localName.equals("persistence-manager"))
+      {
+         config.setPersistenceManager(getValue(localName, value));
+      }
+      else if (localName.equals("replication-is-passivation"))
+      {
+         config.setReplicationIsPassivation(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(PoolConfig config, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("pool-class"))
+      {
+         config.setPoolClass(getValue(localName, value));
+      }
+      else if (localName.equals("pool-max-size"))
+      {
+         config.setMaxSize(getValue(localName, value));
+      }
+      else if (localName.equals("pool-timeout"))
+      {
+         config.setTimeout(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(Method method, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("method-name"))
+      {
+         method.setMethodName(getValue(localName, value));
+      }
+      else if (localName.equals("transaction-timeout"))
+      {
+         method.setTransactionTimeout(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(EjbJarDD dd, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("security-domain"))
+      {
+         dd.setSecurityDomain(getValue(localName, value));
+      }
+      else if (localName.equals("unauthenticated-principal"))
+      {
+         dd.setUnauthenticatedPrincipal(getValue(localName, value));
+      }
+      else if (localName.equals("jmx-name"))
+      {
+         dd.setJmxName(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(Producer producer, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("class"))
+      {
+         producer.setClassName(getValue(localName, value));
+      }
+      else if (localName.equals("connection-factory"))
+      {
+         producer.setConnectionFactory(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(Ejb3PortComponent portComp, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      // port-component (port-component-name, port-component-uri?, auth-method?,
+      if (localName.equals("port-component-name"))
+      {
+         portComp.setPortComponentName(value);
+      }
+      else if (localName.equals("port-component-uri"))
+      {
+         portComp.setPortComponentURI(value);
+      }
+      else if (localName.equals("transport-guarantee"))
+      {
+         portComp.setTransportGuarantee(value);
+      }
+      else if (localName.equals("auth-method"))
+      {
+         portComp.setAuthMethod(value);
+      }
+      else if (localName.equals("secure-wsdl-access"))
+      {
+         portComp.setSecureWSDLAccess(Boolean.valueOf(value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(Webservices webservices, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("context-root"))
+      {
+         webservices.setContextRoot(value);
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(WebserviceDescription desc, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("webservice-description-name"))
+      {
+         desc.setDescriptionName(value);
+      }
+      else if (localName.equals("config-name"))
+      {
+         desc.setConfigName(value);
+      }
+      else if (localName.equals("config-file"))
+      {
+         desc.setConfigFile(value);
+      }
+      else if (localName.equals("wsdl-publish-location"))
+      {
+         desc.setWsdlPublishLocation(value);
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(SecurityRoleMetaData srm, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("role-name"))
+      {
+         srm.setRoleName(getValue(localName, value));
+      }
+      else if (localName.equals("principal-name"))
+      {
+         srm.addPrincipalName(getValue(localName, value));
+      }
+   }
+
+   // may want to run StringPropertyReplacer on the whole descriptor at once
+   protected String getValue(String name, String value)
+   {
+      if (value.startsWith("${") && value.endsWith("}"))
+      {
+         String replacement = StringPropertyReplacer.replaceProperties(value);
+         if (replacement != null)
+            value = replacement;
+      }
+      return value;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/LifecycleCallback.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/LifecycleCallback.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/LifecycleCallback.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * The lifecycle-callback type specifies a method on a
+ * class to be called when a lifecycle event occurs.
+ * Note that each class may have only one lifecycle callback
+ * method for any given event and that the method may not
+ * be overloaded.
+ * 
+ * If the lifefycle-callback-class element is missing then
+ * the class defining the callback is assumed to be the
+ * component class in scope at the place in the descriptor
+ * in which the callback definition appears.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class LifecycleCallback
+{
+   private String lifecycleCallbackClass;
+   private String lifecycleCallbackMethod;
+   
+   public String getLifecycleCallbackClass()
+   {
+      return lifecycleCallbackClass;
+   }
+   
+   public void setLifecycleCallbackClass(String lifecycleCallbackClass)
+   {
+      this.lifecycleCallbackClass = lifecycleCallbackClass;
+   }
+   
+   public String getLifecycleCallbackMethod()
+   {
+      return lifecycleCallbackMethod;
+   }
+   
+   public void setLifecycleCallbackMethod(String lifecycleCallbackMethod)
+   {
+      this.lifecycleCallbackMethod = lifecycleCallbackMethod;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDestination.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDestination.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDestination.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import org.jboss.logging.Logger;
+
+
+/**
+ * Represents a <message-destination> element of the jboss.xml deployment descriptor for the
+ * 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class MessageDestination
+{
+   private static final Logger log = Logger.getLogger(MessageDestination.class);
+   
+   private String messageDestinationName;
+   
+   private String jndiName;
+   
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+
+   public String getMessageDestinationName()
+   {
+      return messageDestinationName;
+   }
+
+   public void setMessageDestinationName(String messageDestinationName)
+   {
+      this.messageDestinationName = messageDestinationName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[MessageDestination: ");
+      sb.append("messageDestinationName=").append(messageDestinationName);
+      sb.append(", jndiName=").append(jndiName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDrivenBean.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDrivenBean.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDrivenBean.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,236 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import javax.ejb.TransactionManagementType;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a message-driven element of the ejb-jar.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class MessageDrivenBean extends EnterpriseBean
+{
+   private static final Logger log = Logger.getLogger(MessageDrivenBean.class);
+
+   public static final String BEAN = "Bean";
+
+   public static final String CONTAINER = "Container";
+
+   // ejb-jar.xml
+   private String acknowledgeMode;
+
+   private String transactionType;
+   
+   private String messagingType;
+   
+   private String resourceAdaptorName;
+
+   private MessageDrivenDestination messageDrivenDestination;
+   private String messageDestinationLink;
+   
+   private ActivationConfig activationConfig;
+   private ActivationConfig defaultActivationConfig;
+   
+   private String destinationJndiName;
+   
+   private String mdbUser;
+   private String mdbPassword;
+   private String mdbSubscriptionId;
+
+   private Method aroundInvoke;
+   private Method postConstruct;
+   private Method postActivate;
+   private Method preDestroy;
+   private Method prePassivate;
+   
+   public ActivationConfig getDefaultActivationConfig()
+   {
+      return defaultActivationConfig;
+   }
+
+   public void setDefaultActivationConfig(ActivationConfig defaultActivationConfig)
+   {
+      this.defaultActivationConfig = defaultActivationConfig;
+   }
+   
+   public MessageDrivenDestination getMessageDrivenDestination()
+   {
+      return messageDrivenDestination;
+   }
+
+   public void setMessageDrivenDestination(MessageDrivenDestination messageDrivenDestination)
+   {
+      this.messageDrivenDestination = messageDrivenDestination;
+   }
+   
+   public String getMessageDestinationLink()
+   {
+      return messageDestinationLink;
+   }
+   
+   public void setMessageDestinationLink(String messageDestinationLink)
+   {
+      this.messageDestinationLink = messageDestinationLink;
+   }
+   
+   public ActivationConfig getActivationConfig()
+   {
+      return activationConfig;
+   }
+
+   public void setActivationConfig(ActivationConfig activationConfig)
+   {
+      this.activationConfig = activationConfig;
+   }
+   
+   public void setDestinationJndiName(String name)
+   {
+      destinationJndiName = name;
+   }
+   
+   public String getDestinationJndiName()
+   {
+      return destinationJndiName;
+   }
+
+   public String getAcknowledgeMode()
+   {
+      return acknowledgeMode;
+   }
+
+   public void setAcknowledgeMode(String acknowledgeMode)
+   {
+      this.acknowledgeMode = acknowledgeMode;
+   }
+   
+   public String getMessagingType()
+   {
+      return messagingType;
+   }
+
+   public void setMessagingType(String messagingType)
+   {
+      this.messagingType = messagingType;
+   }
+   
+   public String getResourceAdaptorName()
+   {
+      return resourceAdaptorName;
+   }
+
+   public void setResourceAdaptorName(String resourceAdaptorName)
+   {
+      this.resourceAdaptorName = resourceAdaptorName;
+   }
+
+   public String getTransactionType()
+   {
+      return transactionType;
+   }
+
+   public void setTransactionType(String transactionType)
+   {
+      if (transactionType.equals(BEAN))
+         tmType = TransactionManagementType.BEAN;
+      else if (transactionType.equals(CONTAINER))
+         tmType = TransactionManagementType.CONTAINER;
+      this.transactionType = transactionType;
+   }
+   
+   public String getMdbPassword()
+   {
+      return mdbPassword;
+   }
+
+   public void setMdbPassword(String mdbPassword)
+   {
+      this.mdbPassword = mdbPassword;
+   }
+
+   public String getMdbUser()
+   {
+      return mdbUser;
+   }
+
+   public void setMdbUser(String mdbUser)
+   {
+      this.mdbUser = mdbUser;
+   }
+   
+   public String getMdbSubscriptionId()
+   {
+      return mdbSubscriptionId;
+   }
+
+   public void setMdbSubscriptionId(String mdbSubscriptionId)
+   {
+      this.mdbSubscriptionId = mdbSubscriptionId;
+   }
+
+   public Method getAroundInvoke()
+   {
+      return aroundInvoke;
+   }
+
+   public void setAroundInvoke(Method aroundInvoke)
+   {
+      this.aroundInvoke = aroundInvoke;
+   }
+
+   public Method getPostConstruct()
+   {
+      return postConstruct;
+   }
+
+   public void setPostConstruct(Method postConstruct)
+   {
+      this.postConstruct = postConstruct;
+   }
+
+   public Method getPreDestroy()
+   {
+      return preDestroy;
+   }
+
+   public void setPreDestroy(Method preDestroy)
+   {
+      this.preDestroy = preDestroy;
+   }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[MessageDrivenBean:");
+      sb.append(super.toString());
+      sb.append(",");
+      sb.append("acknowledgeMode=").append(acknowledgeMode);
+      sb.append("destination=").append(messageDrivenDestination);
+      sb.append("messagingType=").append(messagingType);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDrivenDestination.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDrivenDestination.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageDrivenDestination.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a message-driven-destination element of the ejb-jar.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class MessageDrivenDestination
+{
+   private static final Logger log = Logger.getLogger(MessageDrivenDestination.class);
+
+   // ejb-jar.xml
+   private String destinationType;
+
+   private String subscriptionDurability;
+
+   public String getDestinationType()
+   {
+      return destinationType;
+   }
+
+   public void setDestinationType(String destinationType)
+   {
+      this.destinationType = destinationType;
+   }
+
+   public String getSubscriptionDurability()
+   {
+      return subscriptionDurability;
+   }
+
+   public void setSubscriptionDurability(String subscriptionDurability)
+   {
+      this.subscriptionDurability = subscriptionDurability;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append('[');
+      sb.append("destinationType=").append(destinationType);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageProperties.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageProperties.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MessageProperties.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class MessageProperties
+{
+   private List methods = new ArrayList();
+   private String delivery;
+   private String priority;
+   private String className;
+
+   public List getMethods()
+   {
+      return methods;
+   }
+   
+   public void addMethod(Method method)
+   {
+      methods.add(method);
+   }
+   
+   public String getDelivery()
+   {
+      return delivery;
+   }
+   
+   public void setDelivery(String delivery)
+   {
+      this.delivery = delivery;
+   }
+   
+   public String getClassName()
+   {
+      return className;
+   }
+   
+   public void setClassName(String className)
+   {
+      this.className = className;
+   }
+   
+   public String getPriority()
+   {
+      return priority;
+   }
+   
+   public void setPriority(String priority)
+   {
+      this.priority = priority;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("className=").append(className);
+      sb.append(", priority=").append(priority);
+      sb.append(", delivery=").append(delivery);
+      sb.append(", methods=").append(methods);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Method.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Method.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Method.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Represents an <method> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class Method
+{
+
+   private String ejbName = null;
+
+   private String methodName = null;
+   
+   private String transactionTimeout = null;
+
+   private List methodParams;
+
+   public String getTransactionTimeout()
+   {
+      return transactionTimeout;
+   }
+
+   public void setTransactionTimeout(String transactionTimeout)
+   {
+      this.transactionTimeout = transactionTimeout;
+   }
+   
+   public String getEjbName()
+   {
+      return ejbName;
+   }
+
+   public void setEjbName(String ejbName)
+   {
+      this.ejbName = ejbName;
+   }
+
+   public String getMethodName()
+   {
+      return methodName;
+   }
+
+   public void setMethodName(String methodName)
+   {
+      this.methodName = methodName;
+   }
+
+   public void setHasParameters()
+   {
+      methodParams = new ArrayList();
+   }
+   
+   public void addMethodParam(String methodParam)
+   {
+      methodParams.add(methodParam);
+   }
+
+   public List getMethodParams()
+   {
+      return methodParams;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbName=").append(ejbName);
+      sb.append(", methodName=").append(methodName);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MethodAttributes.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MethodAttributes.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MethodAttributes.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents an <method-attributes> element of the jboss.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class MethodAttributes
+{
+   private static final Logger log = Logger.getLogger(MethodAttributes.class);
+
+   private List<Method> methods = new ArrayList();
+
+   public List<Method> getMethods()
+   {
+      return methods;
+   }
+
+   public void addMethod(Method method)
+   {
+      methods.add(method);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("methods=").append(methods);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MethodPermission.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MethodPermission.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/MethodPermission.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents an <method-permission> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class MethodPermission
+{
+   private static final Logger log = Logger.getLogger(MethodPermission.class);
+
+   private List roleNames = new ArrayList();
+   private boolean isUnchecked = false;
+   private List<Method> methods = new ArrayList();
+
+   public boolean isUnchecked()
+   {
+      return isUnchecked;
+   }
+
+   public void setUnchecked(boolean isUnchecked)
+   {
+      this.isUnchecked = isUnchecked;
+   }
+
+   public List getRoleNames()
+   {
+      return roleNames;
+   }
+
+   public void addRoleName(String roleName)
+   {
+      roleNames.add(roleName);
+   }
+
+   public List<Method> getMethods()
+   {
+      return methods;
+   }
+
+   public void addMethod(Method method)
+   {
+      methods.add(method);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("roleNames=").append(roleNames);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/PoolConfig.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/PoolConfig.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/PoolConfig.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+
+/**
+ * Represents an <pool-config> element of the jboss.xml deployment descriptor
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class PoolConfig
+{
+   private String poolClass = null;
+   private String maxSize = null;
+   private String timeout = null;
+   
+   public String getPoolClass()
+   {
+      return poolClass;
+   }
+
+   public void setPoolClass(String poolClass)
+   {
+      this.poolClass = poolClass;
+   }
+
+   public String getMaxSize()
+   {
+      return maxSize;
+   }
+
+   public void setMaxSize(String maxSize)
+   {
+      this.maxSize = maxSize;
+   }
+   
+   public String getTimeout()
+   {
+      return timeout;
+   }
+
+   public void setTimeout(String timeout)
+   {
+      this.timeout = timeout;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("poolClass=").append(poolClass);
+      sb.append(", maxSize=").append(maxSize);
+      sb.append(", timeout=").append(timeout);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Producer.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Producer.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Producer.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a producer element of the jboss.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class Producer
+{
+   private static final Logger log = Logger.getLogger(Producer.class);
+
+   // jboss.xml
+   private String className;
+   private String connectionFactory;
+   private boolean local = false;
+   
+   public Producer(boolean local)
+   {
+      this.local = local;
+   }
+   
+   public boolean isLocal()
+   {
+      return local;
+   }
+
+   public String getClassName()
+   {
+      return className;
+   }
+
+   public void setClassName(String className)
+   {
+      this.className = className;
+   }
+   
+   public String getConnectionFactory()
+   {
+      return connectionFactory;
+   }
+
+   public void setConnectionFactory(String connectionFactory)
+   {
+      this.connectionFactory = connectionFactory;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append('[');
+      sb.append("className=").append(className);
+      sb.append(", connectionFactory=").append(connectionFactory);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Query.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Query.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Query.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * Represents an query element of the ejb-jar.xml deployment descriptor for the
+ * 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class Query
+{
+
+   private String ejbQl;
+
+   private QueryMethod queryMethod;
+
+   public String getEjbQl()
+   {
+      return ejbQl;
+   }
+
+   public void setEjbQl(String ejbQl)
+   {
+      this.ejbQl = ejbQl;
+   }
+
+   public QueryMethod getQueryMethod()
+   {
+      return queryMethod;
+   }
+
+   public void setQueryMethod(QueryMethod queryMethod)
+   {
+      this.queryMethod = queryMethod;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbQl=").append(ejbQl);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/QueryMethod.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/QueryMethod.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/QueryMethod.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.List;
+
+/**
+ * Represents an query-method element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class QueryMethod
+{
+
+   private String methodName;
+
+   private List methodParams;
+
+   public String getMethodName()
+   {
+      return methodName;
+   }
+
+   public void setMethodName(String methodName)
+   {
+      this.methodName = methodName;
+   }
+
+   public List getMethodParams()
+   {
+      return methodParams;
+   }
+
+   public void setMethodParams(List methodParams)
+   {
+      this.methodParams = methodParams;
+   }
+
+   public void addMethodParam(String methodParam)
+   {
+      methodParams.add(methodParam);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("methodName=").append(methodName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RelationshipRoleSource.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RelationshipRoleSource.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RelationshipRoleSource.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * Represents an ejb-relationship-role element of the ejb-jar.xml deployment
+ * descriptor for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class RelationshipRoleSource
+{
+
+   private String ejbName;
+
+   public String getEjbName()
+   {
+      return ejbName;
+   }
+
+   public void setEjbName(String ejbName)
+   {
+      this.ejbName = ejbName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbName=").append(ejbName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Relationships.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Relationships.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Relationships.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Represents <relationships> elements of the ejb-jar.xml deployment descriptor for the 1.4
+ * schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class Relationships
+{
+
+   private List ejbRelations = new ArrayList();
+
+   public List getEjbRelations()
+   {
+      return ejbRelations;
+   }
+
+   public void setEjbRelations(List ejbRelations)
+   {
+      this.ejbRelations = ejbRelations;
+   }
+
+   public void addEjbRelation(EjbRelation ejbRelation)
+   {
+      ejbRelations.add(ejbRelation);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbRelations=").append(ejbRelations);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoteBinding.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoteBinding.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoteBinding.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+
+/**
+ * Represents an <remote-binding> element of the jboss.xml deployment descriptor
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class RemoteBinding
+{
+   private String jndiName = null;
+   private String proxyFactory = null;
+   private String clientBindUrl = null;
+   private String interceptorStack = null;
+
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+   
+   public String getProxyFactory()
+   {
+      return proxyFactory;
+   }
+
+   public void setProxyFactory(String proxyFactory)
+   {
+      this.proxyFactory = proxyFactory;
+   }
+
+   public String getClientBindUrl()
+   {
+      return clientBindUrl;
+   }
+
+   public void setClientBindUrl(String clientBindUrl)
+   {
+      this.clientBindUrl = clientBindUrl;
+   }
+
+   public String getInterceptorStack()
+   {
+      return interceptorStack;
+   }
+
+   public void setInterceptorStack(String interceptorStack)
+   {
+      this.interceptorStack = interceptorStack;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("jndiName=").append(jndiName);
+      sb.append(", proxyFactory=").append(proxyFactory);
+      sb.append(", interceptorStack=").append(interceptorStack);
+      sb.append(", clientBindUrl=").append(clientBindUrl);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoveList.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoveList.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoveList.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents an <remove-list> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class RemoveList
+{
+   private static final Logger log = Logger.getLogger(RemoveList.class);
+
+   private List methods = new ArrayList();
+
+   public List getMethods()
+   {
+      return methods;
+   }
+
+   public void addMethod(Method method)
+   {
+      methods.add(method);
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("methods=").append(methods);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoveMethod.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoveMethod.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/RemoveMethod.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * Represents an <remove-list> element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class RemoveMethod
+{
+
+   private Method beanMethod;
+   private boolean retainIfException;
+
+   public Method getBeanMethod()
+   {
+      return beanMethod;
+   }
+
+   public void setBeanMethod(Method beanMethod)
+   {
+      this.beanMethod = beanMethod;
+   }
+
+   public boolean isRetainIfException()
+   {
+      return retainIfException;
+   }
+
+   public void setRetainIfException(boolean retainIfException)
+   {
+      this.retainIfException = retainIfException;
+   }
+
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("method=").append(beanMethod);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ResourceManager.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ResourceManager.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/ResourceManager.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+/**
+ * Represents a resource-manager element of the jboss.xml deployment descriptor for
+ * the 4.0 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class ResourceManager
+{
+   private String resourceName;
+   private String resourceJndiName;
+   
+   public String getResourceName()
+   {
+      return resourceName;
+   }
+   
+   public void setResourceName(String resourceName)
+   {
+      this.resourceName = resourceName;
+   }
+   
+   public String getResourceJndiName()
+   {
+      return resourceJndiName;
+   }
+   
+   public void setResourceJndiName(String resourceJndiName)
+   {
+      this.resourceJndiName = resourceJndiName;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/SecurityIdentity.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/SecurityIdentity.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/SecurityIdentity.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import org.jboss.metamodel.descriptor.RunAs;
+
+/**
+ * Represents a <security-identity> element of the ejb-jar.xml deployment descriptor for the
+ * 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61757 $</tt>
+ */
+public class SecurityIdentity
+{
+   private String id;
+
+   private boolean useCallerIdentity = false;
+
+   private RunAs runAs;
+
+   private String runAsPrincipal;
+
+   public String getId()
+   {
+      return id;
+   }
+
+   public void setId(String id)
+   {
+      this.id = id;
+   }
+
+   public boolean isUseCallerIdentity()
+   {
+      return useCallerIdentity;
+   }
+
+   public void setUseCallerIdentity(boolean useCallerIdentity)
+   {
+      this.useCallerIdentity = useCallerIdentity;
+   }
+
+   public RunAs getRunAs()
+   {
+      return runAs;
+   }
+
+   public void setRunAs(RunAs runAs)
+   {
+      this.runAs = runAs;
+   }
+
+   public String getRunAsPrincipal()
+   {
+      return runAsPrincipal;
+   }
+
+   public void setRunAsPrincipal(String runAsPrincipal)
+   {
+      this.runAsPrincipal = runAsPrincipal;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("runAsPrincipal=").append(runAsPrincipal);
+      sb.append(", runAs=").append(runAs);
+      sb.append(", useCallerIdentity=").append(useCallerIdentity);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Service.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Service.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Service.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 61136 $</tt>
+ */
+public class Service extends EnterpriseBean
+{
+   private static final Logger log = Logger.getLogger(Service.class);
+   
+   private String management = null;
+   private String objectName = null;
+   private String xmbean = null;
+   
+   public String getManagement()
+   {
+      return management;
+   }
+   
+   public void setManagement(String management)
+   {
+      this.management = management;
+   }
+   
+   public String getXMBean()
+   {
+      return xmbean;
+   }
+   
+   public void setXMBean(String xmbean)
+   {
+      this.xmbean = xmbean;
+   }
+   
+   public String getObjectName()
+   {
+      return objectName;
+   }
+   
+   public void setObjectName(String objectName)
+   {
+      this.objectName = objectName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[Service:");
+      sb.append(super.toString());
+      sb.append(", management=" + management);
+      sb.append(", objectName=" + objectName);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/SessionEnterpriseBean.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,204 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a Session EJB element of the ejb-jar.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 62273 $</tt>
+ */
+public class SessionEnterpriseBean extends EnterpriseBean
+{
+   private static final Logger log = Logger.getLogger(SessionEnterpriseBean.class);
+
+   public static final String STATELESS = "Stateless";
+
+   public static final String STATEFUL = "Stateful";
+
+   // ejb-jar.xml
+   private String sessionType = STATELESS;
+   private Method aroundInvoke;
+   private Method postConstruct;
+   private Method postActivate;
+   private Method preDestroy;
+   private Method prePassivate;
+   private List<RemoveMethod> removeMethods = new ArrayList<RemoveMethod>();
+   private List<InitMethod> initMethods = new ArrayList<InitMethod>();
+
+   private String clustered = null;
+   private ClusterConfig clusterConfig = null;
+   private CacheConfig cacheConfig = null;
+
+   private String concurrent = null;
+
+   public CacheConfig getCacheConfig()
+   {
+      return cacheConfig;
+   }
+
+   public void setCacheConfig(CacheConfig cacheConfig)
+   {
+      this.cacheConfig = cacheConfig;
+   }
+
+   public String getConcurrent()
+   {
+      return concurrent;
+   }
+
+   public void setConcurrent(String concurrent)
+   {
+      this.concurrent = concurrent;
+   }
+
+   public String getClustered()
+   {
+      return clustered;
+   }
+
+   public void setClustered(String clustered)
+   {
+      this.clustered = clustered;
+   }
+
+   public ClusterConfig getClusterConfig()
+   {
+      return clusterConfig;
+   }
+
+   public void setClusterConfig(ClusterConfig clusterConfig)
+   {
+      this.clusterConfig = clusterConfig;
+   }
+
+   public List<RemoveMethod> getRemoveMethods()
+   {
+      return removeMethods;
+   }
+
+   public void addRemoveMethod(RemoveMethod method)
+   {
+      removeMethods.add(method);
+   }
+
+   public List<InitMethod> getInitMethods()
+   {
+      return initMethods;
+   }
+
+   public void addInitMethod(InitMethod method)
+   {
+      initMethods.add(method);
+   }
+
+   public boolean isStateless()
+   {
+      return sessionType.equals(STATELESS);
+   }
+
+   public boolean isStateful()
+   {
+      return sessionType.equals(STATEFUL);
+   }
+
+   public String getSessionType()
+   {
+      return sessionType;
+   }
+
+   public void setSessionType(String sessionType)
+   {
+      this.sessionType = sessionType;
+   }
+
+   public Method getAroundInvoke()
+   {
+      return aroundInvoke;
+   }
+
+   public void setAroundInvoke(Method aroundInvoke)
+   {
+      this.aroundInvoke = aroundInvoke;
+   }
+
+   public Method getPostActivate()
+   {
+      if (sessionType.equals(STATELESS))
+         return null;
+      return postActivate;
+   }
+
+   public void setPostActivate(Method postActivate)
+   {
+      this.postActivate = postActivate;
+   }
+
+   public Method getPostConstruct()
+   {
+      return postConstruct;
+   }
+
+   public void setPostConstruct(Method postConstruct)
+   {
+      this.postConstruct = postConstruct;
+   }
+
+   public Method getPreDestroy()
+   {
+      return preDestroy;
+   }
+
+   public void setPreDestroy(Method preDestroy)
+   {
+      this.preDestroy = preDestroy;
+   }
+
+   public Method getPrePassivate()
+   {
+      if (sessionType.equals(STATELESS))
+         return null;
+      return prePassivate;
+   }
+
+   public void setPrePassivate(Method prePassivate)
+   {
+      this.prePassivate = prePassivate;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append('[');
+      sb.append(super.toString());
+      sb.append(",");
+      sb.append("sessionType=").append(sessionType);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/WebserviceDescription.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/WebserviceDescription.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/WebserviceDescription.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+// $Id: $
+
+public class WebserviceDescription
+{
+   private String descriptionName;
+   private String configName;
+   private String configFile;
+   private String wsdlPublishLocation;
+
+   public String getConfigFile()
+   {
+      return configFile;
+   }
+
+   public void setConfigFile(String configFile)
+   {
+      this.configFile = configFile;
+   }
+
+   public String getConfigName()
+   {
+      return configName;
+   }
+
+   public void setConfigName(String configName)
+   {
+      this.configName = configName;
+   }
+
+   public String getDescriptionName()
+   {
+      return descriptionName;
+   }
+
+   public void setDescriptionName(String descriptionName)
+   {
+      this.descriptionName = descriptionName;
+   }
+
+   public String getWsdlPublishLocation()
+   {
+      return wsdlPublishLocation;
+   }
+
+   public void setWsdlPublishLocation(String wsdlPublishLocation)
+   {
+      this.wsdlPublishLocation = wsdlPublishLocation;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Webservices.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Webservices.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/Webservices.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.metamodel;
+
+//$Id: $
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Webservices
+{
+   private String contextRoot;
+   private List<WebserviceDescription> webserviceDescriptions = new ArrayList<WebserviceDescription>();
+
+   public String getContextRoot()
+   {
+      return contextRoot;
+   }
+
+   public void setContextRoot(String contextRoot)
+   {
+      this.contextRoot = contextRoot;
+   }
+
+   public List<WebserviceDescription> getWebserviceDescriptions()
+   {
+      return webserviceDescriptions;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/XmlAnnotation.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/XmlAnnotation.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/ejb3/metamodel/XmlAnnotation.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,93 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.ejb3.metamodel;
+
+import java.util.Collection;
+import java.util.HashSet;
+
+import org.jboss.metamodel.descriptor.InjectionTarget;
+import org.jboss.metamodel.descriptor.NameValuePair;
+
+
+/**
+ * Represents an "annotation" element of the jboss.xml deployment descriptor
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public class XmlAnnotation
+{
+   private InjectionTarget injectionTarget = null;
+   private String annotationClass = null;
+   private String annotationImplementationClass = null;
+   private Collection<NameValuePair> properties = new HashSet<NameValuePair>();
+   
+   public Collection<NameValuePair> getProperties()
+   {
+      return properties;
+   }
+   
+   public void addProperty(NameValuePair property)
+   {
+      properties.add(property);
+   }
+
+   public String getAnnotationClass()
+   {
+      return annotationClass;
+   }
+
+   public void setAnnotationClass(String annotationClass)
+   {
+      this.annotationClass = annotationClass;
+   }
+   
+   public String getAnnotationImplementationClass()
+   {
+      return annotationImplementationClass;
+   }
+
+   public void setAnnotationImplementationClass(String annotationImplementationClass)
+   {
+      this.annotationImplementationClass = annotationImplementationClass;
+   }
+   
+   public InjectionTarget getInjectionTarget()
+   {
+      return injectionTarget;
+   }
+   
+   public void setInjectionTarget(InjectionTarget injectionTarget)
+   {
+      this.injectionTarget = injectionTarget;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("annotationClass=").append(annotationClass);
+      sb.append(", injectionTarget=").append(injectionTarget);
+      sb.append("]");
+      return sb.toString();
+   }
+
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/BaseEjbRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/BaseEjbRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/BaseEjbRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,76 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.metamodel.descriptor;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 65277 $
+ */
+public class BaseEjbRef extends Ref
+{
+   protected String ejbRefName;
+   protected String ejbRefType;
+   private String ejbLink;
+   protected String mappedName;
+
+   public String getMappedName()
+   {
+      return mappedName;
+   }
+   
+   public void setMappedName(String mappedName)
+   {
+      this.mappedName = mappedName;
+   }
+
+   public String getEjbRefName()
+   {
+      return ejbRefName;
+   }
+
+   public void setEjbRefName(String ejbRefName)
+   {
+      this.ejbRefName = ejbRefName;
+   }
+
+   public String getEjbRefType()
+   {
+      return ejbRefType;
+   }
+
+   public void setEjbRefType(String ejbRefType)
+   {
+      this.ejbRefType = ejbRefType;
+   }
+
+   public String getEjbLink()
+   {
+      return ejbLink;
+   }
+
+   public void setEjbLink(String ejbLink)
+   {
+      this.ejbLink = ejbLink;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/DDObjectFactory.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/DDObjectFactory.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/DDObjectFactory.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,492 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.metamodel.descriptor;
+
+import javax.persistence.PersistenceContextType;
+
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @author Thomas.Diesler at jboss.com
+ * @version <tt>$Revision: 66473 $</tt>
+ */
+public abstract class DDObjectFactory extends ServiceRefObjectFactory implements ObjectModelFactory
+{
+   public Object newChild(PersistenceUnitRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return newRefChild(ref, localName);
+   }
+
+   public Object newChild(PersistenceContextRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return newRefChild(ref, localName);
+   }
+
+   public Object newChild(EnvEntry ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      navigator.setTrimTextContent(false);
+      return newRefChild(ref, localName);
+   }
+
+   public Object newChild(EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return newRefChild(ref, localName);
+   }
+
+   public Object newChild(EjbLocalRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return newRefChild(ref, localName);
+   }
+
+   public Object newChild(ResourceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return newRefChild(ref, localName);
+   }
+
+   public Object newChild(ResourceEnvRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return newRefChild(ref, localName);
+   }
+
+   public Object newChild(MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return newRefChild(ref, localName);
+   }
+
+   public Object newChild(JndiRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return newRefChild(ref, localName);
+   }
+
+   public void addChild(PersistenceUnitRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void addChild(PersistenceContextRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void addChild(EnvEntry parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void addChild(EjbRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void addChild(EjbLocalRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void addChild(ResourceRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void addChild(ResourceEnvRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void addChild(MessageDestinationRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void addChild(JndiRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
+   {
+      parent.setInjectionTarget(target);
+   }
+
+   public void setValue(EjbLocalRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-ref-name"))
+      {
+         ref.setEjbRefName(getValue(localName, value));
+      }
+      else if (localName.equals("ejb-ref-type"))
+      {
+         ref.setEjbRefType(getValue(localName, value));
+      }
+      else if (localName.equals("local-home"))
+      {
+         ref.setLocalHome(getValue(localName, value));
+      }
+      else if (localName.equals("local"))
+      {
+         ref.setLocal(getValue(localName, value));
+      }
+      else if (localName.equals("ejb-link"))
+      {
+         ref.setEjbLink(getValue(localName, value));
+      }
+      else if (localName.equals("mapped-name") || localName.equals("local-jndi-name") || localName.equals("jndi-name"))
+      {
+         ref.setMappedName(getValue(localName, value));
+      }
+      else if (localName.equals("ignore-dependency"))
+      {
+         ref.setIgnoreDependency(true);
+      }
+   }
+
+   public void setValue(EjbRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("ejb-ref-name"))
+      {
+         ref.setEjbRefName(getValue(localName, value));
+      }
+      else if (localName.equals("ejb-ref-type"))
+      {
+         ref.setEjbRefType(getValue(localName, value));
+      }
+      else if (localName.equals("home"))
+      {
+         ref.setHome(getValue(localName, value));
+      }
+      else if (localName.equals("remote"))
+      {
+         ref.setRemote(getValue(localName, value));
+      }
+      else if (localName.equals("ejb-link"))
+      {
+         ref.setEjbLink(getValue(localName, value));
+      }
+      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
+      {
+         ref.setMappedName(getValue(localName, value));
+      }
+      else if (localName.equals("ignore-dependency"))
+      {
+         ref.setIgnoreDependency(true);
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("injection-target-class"))
+      {
+         target.setTargetClass(getValue(localName, value));
+      }
+      else if (localName.equals("injection-target-name"))
+      {
+         target.setTargetName(getValue(localName, value));
+      }
+   }
+
+   /**
+    * Called when a child element with simple content is read for DD.
+    */
+   public void setValue(MessageDestinationRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("description"))
+      {
+         ref.setDescription(getValue(localName, value));
+      }
+      else if (localName.equals("message-destination-ref-name"))
+      {
+         ref.setMessageDestinationRefName(getValue(localName, value));
+      }
+      else if (localName.equals("message-destination-type"))
+      {
+         ref.setMessageDestinationType(getValue(localName, value));
+      }
+      else if (localName.equals("message-destination-usage"))
+      {
+         ref.setMessageDestinationUsage(getValue(localName, value));
+      }
+      else if (localName.equals("message-destination-link"))
+      {
+         ref.setMessageDestinationLink(getValue(localName, value));
+      }
+      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
+      {
+         ref.setMappedName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(EnvEntry entry, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("description"))
+      {
+         entry.setDescription(getValue(localName, value));
+      }
+      else if (localName.equals("env-entry-name"))
+      {
+         entry.setEnvEntryName(getValue(localName, value));
+      }
+      else if (localName.equals("env-entry-type"))
+      {
+         entry.setEnvEntryType(getValue(localName, value));
+      }
+      else if (localName.equals("env-entry-value"))
+      {
+         entry.setEnvEntryValue(getValue(localName, value));
+      }
+   }
+
+   public void setValue(ResourceEnvRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("res-ref-name") || localName.equals("resource-env-ref-name"))
+      {
+         envRef.setResRefName(getValue(localName, value));
+      }
+      else if (localName.equals("res-type") || localName.equals("resource-env-ref-type"))
+      {
+         envRef.setResType(getValue(localName, value));
+      }
+      else if (localName.equals("res-auth"))
+      {
+         envRef.setResAuth(getValue(localName, value));
+      }
+      else if (localName.equals("res-sharing-scope"))
+      {
+         envRef.setResSharingScope(getValue(localName, value));
+      }
+      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
+      {
+         envRef.setMappedName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(ResourceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("res-ref-name") || localName.equals("resource-env-ref-name"))
+      {
+         ref.setResRefName(getValue(localName, value));
+      }
+      else if (localName.equals("res-type") || localName.equals("resource-env-ref-type"))
+      {
+         ref.setResType(getValue(localName, value));
+      }
+      else if (localName.equals("res-auth"))
+      {
+         ref.setResAuth(getValue(localName, value));
+      }
+      else if (localName.equals("res-sharing-scope"))
+      {
+         ref.setResSharingScope(getValue(localName, value));
+      }
+      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
+      {
+         ref.setMappedName(getValue(localName, value));
+         ref.setJndiName(getValue(localName, value));
+      }
+      else if (localName.equals("res-url"))
+      {
+         ref.setResUrl(getValue(localName, value));
+      }
+      else if (localName.equals("resource-name"))
+      {
+         ref.setResourceName(getValue(localName, value));
+         ref.setMappedName(getValue(localName, value));
+      }
+   }
+   
+   public void setValue(NameValuePair nvPair, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("name"))
+      {
+         nvPair.setName(value);
+      }
+      else if (localName.equals("value"))
+      {
+         nvPair.setValue(value);
+      }
+   }
+
+   public void setValue(SecurityRole role, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("role-name"))
+      {
+         role.setRoleName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(JndiRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("mapped-name"))
+      {
+         ref.setMappedName(getValue(localName, value));
+      }
+      else if (localName.equals("jndi-ref-name"))
+      {
+         ref.setJndiRefName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(RunAs runAs, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("role-name"))
+      {
+         runAs.setRoleName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(SecurityRoleRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("role-name"))
+      {
+         ref.setRoleName(getValue(localName, value));
+      }
+      else if (localName.equals("role-link"))
+      {
+         ref.setRoleLink(getValue(localName, value));
+      }
+   }
+
+   public void setValue(Listener listener, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("listener-class"))
+      {
+         listener.setListenerClass(getValue(localName, value));
+      }
+   }
+
+   public void setValue(MessageDestination destination, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("message-destination-name"))
+      {
+         destination.setMessageDestinationName(getValue(localName, value));
+      }
+      else if (localName.equals("mapped-name") || localName.equals("jndi-name"))
+      {
+         destination.setMappedName(getValue(localName, value));
+      }
+   }
+
+   public void setValue(PersistenceUnitRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("persistence-unit-ref-name"))
+      {
+         ref.setRefName(getValue(localName, value));
+      }
+      else if (localName.equals("persistence-unit-name"))
+      {
+         ref.setUnitName(getValue(localName, value));
+      }
+   }
+
+   protected Object newEnvRefGroupChild(String localName)
+   {
+      Object child = null;
+
+      if (localName.equals("ejb-local-ref"))
+      {
+         child = new EjbLocalRef();
+      }
+      else if (localName.equals("ejb-ref"))
+      {
+         child = new EjbRef();
+      }
+      else if (localName.equals("resource-ref"))
+      {
+         child = new ResourceRef();
+      }
+      else if (localName.equals("resource-env-ref"))
+      {
+         child = new ResourceEnvRef();
+      }
+      else if (localName.equals("env-entry"))
+      {
+         child = new EnvEntry();
+      }
+      else if (localName.equals("message-destination-ref"))
+      {
+         child = new MessageDestinationRef();
+      }
+      else if (localName.equals("service-ref"))
+      {
+         child = new ServiceRefDelegate().newServiceRefMetaData();
+      }      
+      else if (localName.equals("jndi-ref"))
+      {
+         child = new JndiRef();
+      }
+      else if (localName.equals("persistence-unit-ref"))
+      {
+         child = new PersistenceUnitRef();
+      }
+      else if (localName.equals("persistence-context-ref"))
+      {
+         child = new PersistenceContextRef();
+      }
+
+      return child;
+   }
+
+   protected Object newRefChild(Ref ref, String localName)
+   {
+      Object child = null;
+
+      if (localName.equals("ignore-dependency"))
+      {
+         ref.setIgnoreDependency(true);
+      }
+      else if (localName.equals("injection-target"))
+      {
+         InjectionTarget target = new InjectionTarget();
+         child = target;
+      }
+
+      return child;
+   }
+
+   public void setValue(PersistenceContextRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (localName.equals("persistence-context-ref-name"))
+      {
+         ref.setRefName(getValue(localName, value));
+      }
+      else if (localName.equals("persistence-unit-name"))
+      {
+         ref.setUnitName(getValue(localName, value));
+      }
+      else if (localName.equals("persistence-context-type"))
+      {
+         if (value.toLowerCase().equals("transaction"))
+         {
+            ref.setPersistenceContextType(PersistenceContextType.TRANSACTION);
+         }
+         else
+         {
+            ref.setPersistenceContextType(PersistenceContextType.EXTENDED);
+         }
+      }
+   }
+
+   protected String getValue(String name, String value)
+   {
+      return value;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EjbLocalRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EjbLocalRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EjbLocalRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,65 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+/**
+ * Represents an ejb-local-ref element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 46506 $</tt>
+ */
+public class EjbLocalRef extends BaseEjbRef
+{
+   private String localHome;
+
+   private String local;
+
+   public String getLocalHome()
+   {
+      return localHome;
+   }
+
+   public void setLocalHome(String localHome)
+   {
+      this.localHome = localHome;
+   }
+
+   public String getLocal()
+   {
+      return local;
+   }
+
+   public void setLocal(String local)
+   {
+      this.local = local;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbRefName=").append(ejbRefName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EjbRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EjbRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EjbRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,69 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+/**
+ * Represents an ejb-ref element of the ejb-jar.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 46506 $</tt>
+ */
+public class EjbRef extends BaseEjbRef
+{
+
+   private String home;
+   
+   private String remote;
+
+   public String getHome()
+   {
+      return home;
+   }
+
+   public void setHome(String home)
+   {
+      this.home = home;
+   }
+
+   public String getRemote()
+   {
+      return remote;
+   }
+
+   public void setRemote(String remote)
+   {
+      this.remote = remote;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("ejbRefName=").append(ejbRefName);
+      sb.append(", ejbRefType=").append(ejbRefType);
+      sb.append(", remote=").append(remote);
+      sb.append(", jndiName=").append(mappedName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EnvEntry.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EnvEntry.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EnvEntry.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,91 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+/**
+ * Represents an env-entry element of the ejb-jar.xml deployment descriptor for
+ * the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45240 $</tt>
+ */
+public class EnvEntry extends Ref
+{
+   private String description;
+
+   private String envEntryName;
+
+   private String envEntryType;
+
+   private String envEntryValue;
+
+   public String getDescription()
+   {
+      return description;
+   }
+
+   public void setDescription(String description)
+   {
+      this.description = description;
+   }
+
+   public String getEnvEntryName()
+   {
+      return envEntryName;
+   }
+
+   public void setEnvEntryName(String envEntryName)
+   {
+      this.envEntryName = envEntryName;
+   }
+
+   public String getEnvEntryType()
+   {
+      return envEntryType;
+   }
+
+   public void setEnvEntryType(String envEntryType)
+   {
+      this.envEntryType = envEntryType;
+   }
+
+   public String getEnvEntryValue()
+   {
+      return envEntryValue;
+   }
+
+   public void setEnvEntryValue(String envEntryValue)
+   {
+      this.envEntryValue = envEntryValue;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("envEntryName=").append(envEntryName);
+      sb.append(",envEntryType=").append(envEntryType);
+      sb.append(",envEntryValue=").append(envEntryValue);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,247 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.metamodel.descriptor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 65861 $</tt>
+ */
+public abstract class EnvironmentRefGroup
+{
+   private static final Logger log = Logger.getLogger(EnvironmentRefGroup.class);
+
+   protected HashMap<String, EjbLocalRef> ejbLocalRefs = new HashMap<String, EjbLocalRef>();
+   protected HashMap<String, EjbRef> ejbRefs = new HashMap<String, EjbRef>();
+   protected HashMap<String, EnvEntry> envEntries = new HashMap<String, EnvEntry>();
+   protected HashMap<String, ResourceEnvRef> resourceEnvRefs = new HashMap<String, ResourceEnvRef>();
+   protected HashMap<String, ResourceRef> resourceRefs = new HashMap<String, ResourceRef>();
+   protected HashMap<String, MessageDestinationRef> messageDestinationRefs = new HashMap<String, MessageDestinationRef>();
+   /** An index of MessageDestinationRef keyed by message-destination-link values */
+   protected HashMap<String, MessageDestinationRef> messageDestinationRefsByLink = new HashMap<String, MessageDestinationRef>();
+   protected HashMap<String, ServiceRefMetaData> serviceRefs = new LinkedHashMap<String, ServiceRefMetaData>();
+   protected HashMap<String, JndiRef> jndiRefs = new HashMap<String, JndiRef>();
+   protected List<PersistenceContextRef> persistenceContextRefs = new ArrayList<PersistenceContextRef>();
+   protected List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
+
+   public Collection<MessageDestinationRef> getMessageDestinationRefs()
+   {
+      return messageDestinationRefs.values();
+   }
+
+   public void addMessageDestinationRef(MessageDestinationRef ref)
+   {
+      log.debug("addMessageDestinationRef, "+ref);
+      messageDestinationRefs.put(ref.getMessageDestinationRefName(), ref);
+      String link = ref.getMessageDestinationLink();
+      if( link != null )
+      {
+         messageDestinationRefsByLink.put(link, ref);
+      }
+   }
+
+   public Collection<EjbLocalRef> getEjbLocalRefs()
+   {
+      return ejbLocalRefs.values();
+   }
+
+   public void addEjbLocalRef(EjbLocalRef ref)
+   {
+      ejbLocalRefs.put(ref.getEjbRefName(), ref);
+   }
+
+   public Collection<EjbRef> getEjbRefs()
+   {
+      return ejbRefs.values();
+   }
+
+   public void addEjbRef(EjbRef ref)
+   {
+      ejbRefs.put(ref.getEjbRefName(), ref);
+   }
+  
+   public Collection<EnvEntry> getEnvEntries()
+   {
+      return envEntries.values();
+   }
+
+   public void addEnvEntry(EnvEntry entry)
+   {
+      envEntries.put(entry.getEnvEntryName(), entry);
+   }
+
+   public Collection<ResourceEnvRef> getResourceEnvRefs()
+   {
+      return resourceEnvRefs.values();
+   }
+
+   public void addResourceEnvRef(ResourceEnvRef envRef)
+   {
+      resourceEnvRefs.put(envRef.getResRefName(), envRef);
+   }
+   
+   public Collection<ResourceRef> getResourceRefs()
+   {
+      return resourceRefs.values();
+   }
+
+   public void addResourceRef(ResourceRef ref)
+   {
+      resourceRefs.put(ref.getResRefName(), ref);
+   }
+   
+   public Collection<JndiRef> getJndiRefs()
+   {
+      return jndiRefs.values();
+   }
+
+   public void addJndiRef(JndiRef ref)
+   {
+      jndiRefs.put(ref.getJndiRefName(), ref);
+   }
+   
+   public Collection<ServiceRefMetaData> getServiceRefs()
+   {
+      return serviceRefs.values();
+   }
+
+   public void addServiceRef(ServiceRefMetaData ref)
+   {
+      serviceRefs.put(ref.getServiceRefName(), ref);
+   }
+   
+   public ServiceRefMetaData getServiceRef(String name)
+   {
+      return serviceRefs.get(name);
+   }
+
+   public void updateEjbRef(EjbRef updatedRef)
+   {
+      EjbRef ref = (EjbRef)ejbRefs.get(updatedRef.getEjbRefName());
+      if (ref != null)
+      {
+         ref.setMappedName(updatedRef.getMappedName());
+         ref.setIgnoreDependency(updatedRef.isIgnoreDependency());
+      }
+      else
+      {
+         ejbRefs.put(updatedRef.getEjbRefName(), updatedRef);
+      }
+   }
+
+   public void updateEjbLocalRef(EjbLocalRef updatedRef)
+   {
+      EjbLocalRef ref = (EjbLocalRef)ejbLocalRefs.get(updatedRef.getEjbRefName());
+      if (ref != null)
+      {
+         ref.setMappedName(updatedRef.getMappedName());
+         ref.setIgnoreDependency(updatedRef.isIgnoreDependency());
+      }
+      else
+      {
+         ejbLocalRefs.put(updatedRef.getEjbRefName(), updatedRef);
+      }
+   }
+   
+   public void updateResourceRef(ResourceRef updatedRef)
+   {
+      ResourceRef ref = (ResourceRef)resourceRefs.get(updatedRef.getResRefName());
+      if (ref != null)
+      {
+         ref.setMappedName(updatedRef.getMappedName());
+         ref.setResUrl(updatedRef.getResUrl());
+         ref.setResourceName(updatedRef.getResourceName());
+      }
+      else
+      {
+         resourceRefs.put(updatedRef.getResRefName(), updatedRef);
+      }
+   }
+   
+   public void updateResourceEnvRef(ResourceEnvRef updatedRef)
+   {
+      ResourceEnvRef ref = (ResourceEnvRef)resourceEnvRefs.get(updatedRef.getResRefName());
+      if (ref != null)
+      {
+         ref.setMappedName(updatedRef.getMappedName());
+      }
+      else
+      {
+         resourceEnvRefs.put(updatedRef.getResRefName(), updatedRef);
+      }
+   }
+   
+   public void updateMessageDestinationRef(MessageDestinationRef updatedRef)
+   {
+      log.debug("updateMessageDestinationRef, "+updatedRef);
+      MessageDestinationRef ref = (MessageDestinationRef)messageDestinationRefs.get(updatedRef.getMessageDestinationRefName());
+      if (ref != null)
+      {
+         ref.setMappedName(updatedRef.getMappedName());
+      }
+      else
+      {
+         messageDestinationRefs.put(updatedRef.getMessageDestinationRefName(), updatedRef);
+         ref = updatedRef;
+      }
+   }
+ 
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      return sb.toString();
+   }
+
+   public List<PersistenceContextRef> getPersistenceContextRefs()
+   {
+      return persistenceContextRefs;
+   }
+
+   public List<PersistenceUnitRef> getPersistenceUnitRefs()
+   {
+      return persistenceUnitRefs;
+   }
+
+   public void addPersistenceContextRef(PersistenceContextRef ref)
+   {
+      persistenceContextRefs.add(ref);
+   }
+
+   public void addPersistenceUnitRef(PersistenceUnitRef ref)
+   {
+      persistenceUnitRefs.add(ref);
+   }
+
+   public MessageDestinationRef getMessageDestinationRefForLink(String link)
+   {
+      MessageDestinationRef ref = messageDestinationRefsByLink.get(link);
+      return ref;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/InjectionTarget.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/InjectionTarget.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/InjectionTarget.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,64 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 45240 $
+ */
+public class InjectionTarget
+{
+   private String targetClass;
+   private String targetName;
+
+   public String getTargetClass()
+   {
+      return targetClass;
+   }
+
+   public void setTargetClass(String targetClass)
+   {
+      this.targetClass = targetClass;
+   }
+
+   public String getTargetName()
+   {
+      return targetName;
+   }
+
+   public void setTargetName(String targetName)
+   {
+      this.targetName = targetName;
+   }
+   
+   public String toString()
+   {
+      StringBuffer buffer = new StringBuffer(100);
+      buffer.append("[InjectionTarget:targetClass=" + targetClass);
+      buffer.append(", targetName=" + targetName);
+      buffer.append("]");
+      
+      return buffer.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/JndiRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/JndiRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/JndiRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,68 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a <jndi-ref> element of the jboss.xml deployment descriptor
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 75470 $</tt>
+ */
+public class JndiRef extends Ref
+{
+   private static final Logger log = Logger.getLogger(JndiRef.class);
+   
+   private String jndiRefName;
+   
+   private String mappedName;
+   
+   public String getJndiRefName()
+   {
+      return jndiRefName;
+   }
+
+   public void setJndiRefName(String jndiRefName)
+   {
+      this.jndiRefName = jndiRefName;
+   }
+
+   public String getMappedName()
+   {
+      return mappedName;
+   }
+
+   public void setMappedName(String mappedName)
+   {
+      this.mappedName = mappedName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[" + this.getClass().getName() + ": ");
+      sb.append("mappedName=").append(mappedName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/Listener.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/Listener.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/Listener.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.metamodel.descriptor;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a <listener> element of the deployment descriptor
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45409 $</tt>
+ */
+public class Listener
+{
+   private static final Logger log = Logger.getLogger(Listener.class);
+   
+   protected String clazz;
+   
+   public String getListenerClass()
+   {
+      return clazz;
+   }
+   
+   public void setListenerClass(String clazz)
+   {
+      this.clazz = clazz;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/MessageDestination.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/MessageDestination.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/MessageDestination.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,71 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+import org.jboss.logging.Logger;
+
+
+/**
+ * Represents a <message-destination> element of the web.xml deployment descriptor for the
+ * 2.5 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45409 $</tt>
+ */
+public class MessageDestination
+{
+   private static final Logger log = Logger.getLogger(MessageDestination.class);
+
+   private String messageDestinationName;
+
+   private String mappedName;
+
+   public String getMappedName()
+   {     
+      return mappedName;
+   }
+
+   public void setMappedName(String mappedName)
+   {
+      this.mappedName = mappedName;
+   }
+   
+   public String getMessageDestinationName()
+   {
+      return messageDestinationName;
+   }
+
+   public void setMessageDestinationName(String messageDestinationName)
+   {
+      this.messageDestinationName = messageDestinationName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("messageDestinationRefName=").append(messageDestinationName);
+      sb.append(", mappedName=").append(mappedName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/MessageDestinationRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/MessageDestinationRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/MessageDestinationRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,145 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+import org.jboss.logging.Logger;
+
+
+/**
+ * Represents a <message-destination-ref> element of the ejb-jar.xml deployment descriptor for the
+ * 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 56237 $</tt>
+ */
+public class MessageDestinationRef extends Ref
+{
+   private static final Logger log = Logger.getLogger(MessageDestinationRef.class);
+   
+   private String description;
+
+   private String messageDestinationRefName;
+
+   private String messageDestinationType;
+
+   private String messageDestinationUsage;
+
+   private String messageDestinationLink;
+
+   private String mappedName;
+   
+   private String jndiName;
+   
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+
+   public String getMappedName()
+   {     
+      return mappedName;
+   }
+
+   public void setMappedName(String mappedName)
+   {
+      this.mappedName = mappedName;
+   }
+
+   public String getDescription()
+   {
+      return description;
+   }
+
+   public void setDescription(String description)
+   {
+      this.description = description;
+   }
+
+   public String getMessageDestinationRefName()
+   {
+      return messageDestinationRefName;
+   }
+
+   public void setMessageDestinationRefName(String messageDestinationRefName)
+   {
+      this.messageDestinationRefName = messageDestinationRefName;
+   }
+
+   public String getMessageDestinationType()
+   {
+      return messageDestinationType;
+   }
+
+   public void setMessageDestinationType(String messageDestinationType)
+   {
+      this.messageDestinationType = messageDestinationType;
+   }
+
+   public String getMessageDestinationUsage()
+   {
+      return messageDestinationUsage;
+   }
+
+   public void setMessageDestinationUsage(String messageDestinationUsage)
+   {
+      this.messageDestinationUsage = messageDestinationUsage;
+   }
+
+   public String getMessageDestinationLink()
+   {
+      return messageDestinationLink;
+   }
+
+   public void setMessageDestinationLink(String messageDestinationLink)
+   {
+      this.messageDestinationLink = messageDestinationLink;
+   }
+   
+   public void merge(MessageDestinationRef ref)
+   {
+      if (ref.getJndiName() != null)
+      {
+         this.setJndiName(ref.getJndiName());
+         
+         setMappedName(ref.getJndiName());
+      }
+   }
+
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("messageDestinationRefName=").append(messageDestinationRefName);
+      sb.append(", messageDestinationType=").append(messageDestinationType);
+      sb.append(", messageDestinationLink=").append(messageDestinationLink);
+      sb.append(", messageDestinationUsage=").append(messageDestinationUsage);
+      sb.append(", mappedName=").append(mappedName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/NameValuePair.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/NameValuePair.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/NameValuePair.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,66 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45409 $</tt>
+ */
+public class NameValuePair
+{
+   private static final Logger log = Logger.getLogger(NameValuePair.class);
+
+   private String name;
+   private String value;
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   public String getValue()
+   {
+      return value;
+   }
+
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append('[');
+      sb.append("name=").append(name);
+      sb.append(", value=").append(value);
+      sb.append(']');
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/PersistenceContextRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/PersistenceContextRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/PersistenceContextRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,67 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.metamodel.descriptor;
+
+import javax.persistence.PersistenceContextType;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 75470 $
+ */
+public class PersistenceContextRef extends Ref
+{
+   private String refName;
+   private String unitName;
+   private PersistenceContextType persistenceContextType;
+
+   public String getRefName()
+   {
+      return refName;
+   }
+
+   public void setRefName(String refName)
+   {
+      this.refName = refName;
+   }
+
+   public String getUnitName()
+   {
+      return unitName;
+   }
+
+   public void setUnitName(String unitName)
+   {
+      this.unitName = unitName;
+   }
+
+   public PersistenceContextType getPersistenceContextType()
+   {
+      return persistenceContextType;
+   }
+
+   public void setPersistenceContextType(PersistenceContextType persistenceContextType)
+   {
+      this.persistenceContextType = persistenceContextType;
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/PersistenceUnitRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/PersistenceUnitRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/PersistenceUnitRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.metamodel.descriptor;
+
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 75470 $
+ */
+public class PersistenceUnitRef extends Ref
+{
+   private String refName;
+   private String unitName = "";
+
+   public String getRefName()
+   {
+      return refName;
+   }
+
+   public void setRefName(String refName)
+   {
+      this.refName = refName;
+   }
+
+   public String getUnitName()
+   {
+      return unitName;
+   }
+
+   public void setUnitName(String unitName)
+   {
+      this.unitName = unitName;
+   }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[" + this.getClass().getName() + ": ");
+      sb.append("refName=").append(refName);
+      sb.append(", unitName=").append(unitName);
+      sb.append(", unitName=").append(unitName);
+      sb.append(", " + super.toString());
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/Ref.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/Ref.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/Ref.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,61 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 58121 $</tt>
+ */
+public abstract class Ref
+{
+   protected InjectionTarget injectionTarget;
+   private boolean ignoreDependency;
+
+   public InjectionTarget getInjectionTarget()
+   {
+      return injectionTarget;
+   }
+
+   public void setInjectionTarget(InjectionTarget injectionTarget)
+   {
+      this.injectionTarget = injectionTarget;
+   }
+
+   public boolean isIgnoreDependency()
+   {
+      return ignoreDependency;
+   }
+
+   public void setIgnoreDependency(boolean ignoreDependency)
+   {
+      this.ignoreDependency = ignoreDependency;
+   }
+   
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append(", injectionTarget=").append(injectionTarget);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ResourceEnvRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ResourceEnvRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ResourceEnvRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,167 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a <resource-env-ref> element of the ejb-jar.xml deployment descriptor for the
+ * 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45240 $</tt>
+ */
+public class ResourceEnvRef extends Ref
+{
+   private static final Logger log = Logger.getLogger(ResourceEnvRef.class);
+   
+   private String resRefName;
+
+   private String resType;
+
+   private String resAuth;
+
+   private String resSharingScope;
+
+   private String mappedName;
+   
+   private String jndiName;
+   
+   private String resourceName;
+   
+   public String getResourceName()
+   {
+      return resourceName;
+   }
+
+   public void setResourceName(String resourceName)
+   {
+      this.resourceName = resourceName;
+   }
+   
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+      this.mappedName = jndiName;
+   }
+
+   public String getMappedName()
+   {
+      return mappedName;
+   }
+
+   public void setMappedName(String mappedName)
+   {
+      this.mappedName = mappedName;
+   }
+
+   public String getResRefName()
+   {
+      return resRefName;
+   }
+
+   public void setResRefName(String resRefName)
+   {
+      this.resRefName = resRefName;
+   }
+
+   public String getResType()
+   {
+      return resType;
+   }
+
+   public void setResType(String resType)
+   {
+      this.resType = resType;
+   }
+
+   public String getResAuth()
+   {
+      return resAuth;
+   }
+
+   public void setResAuth(String resAuth)
+   {
+      this.resAuth = resAuth;
+   }
+
+   public String getAuthorizationType()
+   {
+      return resAuth;
+   }
+
+   public String getResSharingScope()
+   {
+      return resSharingScope;
+   }
+
+   public void setResSharingScope(String resSharingScope)
+   {
+      this.resSharingScope = resSharingScope;
+   }
+
+   public boolean isShareable()
+   {
+      if (resSharingScope == null || resSharingScope.equals("Shareable"))
+         return true;
+      else
+         return false;
+   }
+   
+   public void merge(ResourceEnvRef ref)
+   {
+      if (ref.getJndiName() != null)
+      {
+         this.setJndiName(ref.getJndiName());
+         
+         setMappedName(ref.getJndiName());
+      }
+      
+      if (ref.getResourceName() != null)
+      {
+         this.setResourceName(ref.getResourceName());
+         
+         String mappedName = ref.getResourceName();
+         if (mappedName.startsWith("java:"))
+            this.setMappedName(ref.getResourceName());
+         else
+            this.setMappedName("java:" + ref.getResourceName());
+      }
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[ResourceEnvRef:");
+      sb.append("resRefName=").append(resRefName);
+      sb.append(",resType=").append(resType);
+      sb.append(",jndiName=").append(jndiName);
+      sb.append(",mappedName=").append(mappedName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ResourceRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ResourceRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ResourceRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,188 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a <resource-ref> element of the ejb-jar.xml deployment descriptor for the
+ * 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45249 $</tt>
+ */
+public class ResourceRef extends Ref
+{
+   private static final Logger log = Logger.getLogger(ResourceRef.class);
+   
+   private String resRefName;
+
+   private String resType;
+
+   private String resAuth;
+
+   private String resSharingScope;
+
+   private String mappedName;
+   
+   private String jndiName;
+   
+   private String resourceName;
+   
+   private String resUrl;
+   
+   public String getResUrl()
+   {
+      return resUrl;
+   }
+
+   public void setResUrl(String resUrl)
+   {
+      this.resUrl = resUrl;
+   }
+   
+   public String getResourceName()
+   {
+      return resourceName;
+   }
+
+   public void setResourceName(String resourceName)
+   {
+      this.resourceName = resourceName;
+   }
+   
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+
+   public String getMappedName()
+   {
+      return mappedName;
+   }
+
+   public void setMappedName(String mappedName)
+   {
+      this.mappedName = mappedName;
+   }
+
+   public String getResRefName()
+   {
+      return resRefName;
+   }
+
+   public void setResRefName(String resRefName)
+   {
+      this.resRefName = resRefName;
+   }
+
+   public String getResType()
+   {
+      return resType;
+   }
+
+   public void setResType(String resType)
+   {
+      this.resType = resType;
+   }
+
+   public String getResAuth()
+   {
+      return resAuth;
+   }
+
+   public void setResAuth(String resAuth)
+   {
+      this.resAuth = resAuth;
+   }
+
+   public String getAuthorizationType()
+   {
+      return resAuth;
+ /*     if (resAuth == null || resAuth.equals("Container"))
+         return AuthenticationType.CONTAINER;
+      else
+         return AuthenticationType.APPLICATION;*/
+   }
+
+   public String getResSharingScope()
+   {
+      return resSharingScope;
+   }
+
+   public void setResSharingScope(String resSharingScope)
+   {
+      this.resSharingScope = resSharingScope;
+   }
+
+   public boolean isShareable()
+   {
+      if (resSharingScope == null || resSharingScope.equals("Shareable"))
+         return true;
+      else
+         return false;
+   }
+   
+   public void merge(ResourceRef ref)
+   {
+      if (ref.getJndiName() != null)
+      {
+         this.setJndiName(ref.getJndiName());
+         
+         String mappedName = ref.getJndiName();
+         if (mappedName.startsWith("java:"))
+            this.setMappedName(ref.getJndiName());
+         else
+            this.setMappedName("java:" + ref.getJndiName());
+      }
+      
+      if (ref.getResourceName() != null)
+      {
+         this.setResourceName(ref.getResourceName());
+         
+         String mappedName = ref.getResourceName();
+         if (mappedName.startsWith("java:"))
+            this.setMappedName(ref.getResourceName());
+         else
+            this.setMappedName("java:" + ref.getResourceName());
+      }
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[" + this.getClass().getName() + ": ");
+      sb.append("resRefName=").append(resRefName);
+      sb.append(", jndiName=").append(jndiName);
+      sb.append(", resourceName=").append(resourceName);
+      sb.append(", resType=").append(resType);
+      sb.append(", mappedName=").append(mappedName);
+      sb.append(", injectionTarget=").append(injectionTarget);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/RunAs.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/RunAs.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/RunAs.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,56 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Represents a <run-as> element
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45409 $</tt>
+ */
+public class RunAs
+{
+   private static final Logger log = Logger.getLogger(RunAs.class);
+   
+   private String roleName;
+    
+   public String getRoleName()
+   {
+      return roleName;
+   }
+
+   public void setRoleName(String roleName)
+   {
+      this.roleName = roleName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[" + this.getClass().getName() + ": ");
+      sb.append("roleName=").append(roleName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/SecurityRole.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/SecurityRole.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/SecurityRole.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,54 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+
+/**
+ * Represents an security-role element of the ejb-jar.xml deployment descriptor
+ * for the 1.4 schema
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45417 $</tt>
+ */
+public class SecurityRole
+{
+   private String roleName = null;
+
+   public String getRoleName()
+   {
+      return roleName;
+   }
+
+   public void setRoleName(String roleName)
+   {
+      this.roleName = roleName;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("roleName=").append(roleName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/SecurityRoleRef.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/SecurityRoleRef.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/SecurityRoleRef.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,64 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, 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.metamodel.descriptor;
+
+
+/**
+ * Represents an <security-role-ref> 
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision: 45409 $</tt>
+ */
+public class SecurityRoleRef
+{
+   protected String roleName = null;
+   protected String roleLink = null;
+
+   public String getRoleName()
+   {
+      return roleName;
+   }
+
+   public void setRoleName(String roleName)
+   {
+      this.roleName = roleName;
+   }
+   
+   public String getRoleLink()
+   {
+      return roleLink;
+   }
+
+   public void setRoleLink(String roleLink)
+   {
+      this.roleLink = roleLink;
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("[");
+      sb.append("roleName=").append(roleName);
+      sb.append("]");
+      return sb.toString();
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ServiceRefDelegate.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ServiceRefDelegate.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ServiceRefDelegate.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,159 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.metamodel.descriptor;
+
+// $Id: ServiceRefDelegate.java 75470 2008-07-08 05:07:22Z ALRubinger $
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.serviceref.ServiceRefElement;
+import org.jboss.wsf.spi.serviceref.ServiceRefHandler;
+import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefMetaData;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+
+/**
+ * Factory for ServiceRefHandler
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2004
+ */
+ at Deprecated
+public class ServiceRefDelegate implements ServiceRefHandler
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(ServiceRefDelegate.class);
+
+   private static ServiceRefHandler delegate;
+
+   public ServiceRefDelegate()
+   {
+      if (delegate == null)
+      {
+         SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+         delegate = spiProvider.getSPI(ServiceRefHandlerFactory.class).getServiceRefHandler();
+      }
+
+      if (delegate == null)
+         log.warn("ServiceRefHandler not available");
+   }
+
+   public ServiceRefMetaData newServiceRefMetaData()
+   {
+      ServiceRefMetaData sref;
+      if (delegate != null)
+         sref = delegate.newServiceRefMetaData();
+      else
+         sref = new DummyServiceRef();
+      return sref;
+   }
+
+   public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      Object child = null;
+      if (delegate != null)
+         child = delegate.newChild(ref, navigator, namespaceURI, localName, attrs);
+      return child;
+   }
+
+   public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      if (delegate != null)
+         delegate.setValue(ref, navigator, namespaceURI, localName, value);
+   }
+
+   public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ClassLoader loader, ServiceRefMetaData sref) throws NamingException
+   {
+      if (delegate != null)
+         delegate.bindServiceRef(encCtx, encName, vfsRoot, loader, sref);
+   }
+
+   public static class DummyServiceRef extends ServiceRefMetaData
+   {
+      private String refName;
+
+
+      public List<String[]> getInjectionTargets()
+      {
+         return new ArrayList<String[]>();  
+      }
+
+      @Override
+      public void setServiceRefName(String name)
+      {
+         this.refName = name;
+      }
+
+      @Override
+      public String getServiceRefName()
+      {
+         return refName;
+      }
+
+      @Override
+      public Object getAnnotatedElement()
+      {
+         return null;
+      }
+
+      @Override
+      public void setAnnotatedElement(Object anElement)
+      {
+      }
+
+      @Override
+      public void importJBossXml(Element element)
+      {
+      }
+
+      @Override
+      public void importStandardXml(Element element)
+      {
+      }
+
+      @Override
+      public boolean isProcessed()
+      {
+         return false;
+      }
+
+      @Override
+      public void setProcessed(boolean flag)
+      {
+      }
+
+      @Override
+      public void merge(ServiceRefMetaData serviceRef)
+      {
+      }
+   }
+}

Added: projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ServiceRefObjectFactory.java
===================================================================
--- projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ServiceRefObjectFactory.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/main/java/org/jboss/metamodel/descriptor/ServiceRefObjectFactory.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.metamodel.descriptor;
+
+// $Id: ServiceRefObjectFactory.java 66473 2007-10-26 06:52:21Z thomas.diesler at jboss.com $
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.serviceref.ServiceRefElement;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+
+/**
+ * A object model factory for <service-ref>
+ * 
+ * @author Thomas.Diesler at jboss.com
+ */
+ at Deprecated
+public abstract class ServiceRefObjectFactory implements ObjectModelFactory
+{
+   // provide logging
+   private static Logger log = Logger.getLogger(ServiceRefObjectFactory.class);
+   
+
+   public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+   {
+      return new ServiceRefDelegate().newChild(ref, navigator, namespaceURI, localName, attrs);
+   }
+
+   public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+   {
+      new ServiceRefDelegate().setValue(ref, navigator, namespaceURI, localName, value);
+   }
+   
+   public static boolean isJ2EE14Descriptor(Element element)
+   {
+      // Verify J2EE-1.4
+      String nsURI = element.getOwnerDocument().getDocumentElement().getNamespaceURI();
+      boolean isValid = "http://java.sun.com/xml/ns/j2ee".equals(nsURI);
+
+      // Verify JBoss-4.0
+      DocumentType doctype = element.getOwnerDocument().getDoctype();
+      if (isValid == false && doctype != null)
+      {
+         String publicId = doctype.getPublicId();
+         isValid |= "-//JBoss//DTD JBOSS 4.0//EN".equals(publicId);
+         isValid |= "-//JBoss//DTD JBOSS 4.2//EN".equals(publicId);
+         isValid |= "-//JBoss//DTD Web Application 2.4//EN".equals(publicId);
+         isValid |= "-//JBoss//DTD Application Client 4.0//EN".equals(publicId);
+         isValid |= "-//JBoss//DTD Application Client 4.2//EN".equals(publicId);
+      }
+
+      if (isValid == false)
+      {
+         String dtstr = (doctype != null ? "[public=" + doctype.getPublicId() + ",system=" + doctype.getSystemId() + "]" : null);
+         log.debug("Skip <service-ref> for: nsURI=" + nsURI + ",doctype=" + dtstr);
+      }
+      return isValid;
+   }
+}

Added: projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/legacy0_1_7/EjbDeploymentSummaryTestCase.java
===================================================================
--- projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/legacy0_1_7/EjbDeploymentSummaryTestCase.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/legacy0_1_7/EjbDeploymentSummaryTestCase.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.metadata.test.ejb3.legacy0_1_7;
+
+import junit.framework.TestCase;
+
+import org.jboss.metadata.ejb.jboss.jndipolicy.spi.EjbDeploymentSummary;
+
+/**
+ * Emulate the ejb3-core 0.1.7 behavior with regards to EjbDeploymentSummary.
+ * See ProxyFactoryHelper#getDeploymentSummaryFromContainer.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class EjbDeploymentSummaryTestCase extends TestCase
+{
+   @SuppressWarnings("deprecation")
+   public void test1()
+   {
+      // Construct Deployment Summary
+      EjbDeploymentSummary summary = new EjbDeploymentSummary();
+      summary.setEjbName("EjbName");
+      summary.setService(true);
+      summary.setStateful(true);
+      summary.setDeploymentName("DeploymentName");
+      summary.setBeanClassName("BeanClassName");
+      summary.setDeploymentScopeBaseName("ScopeName");
+
+      assertEquals("EjbName", summary.getEjbName());
+      assertEquals(true, summary.isService());
+      assertEquals(true, summary.isStateful());
+      assertEquals("DeploymentName", summary.getDeploymentName());
+      assertEquals("BeanClassName", summary.getBeanClassName());
+      assertEquals("ScopeName", summary.getDeploymentScopeBaseName());
+   }
+}
\ No newline at end of file

Added: projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/simple/SimpleUnitTestCase.java
===================================================================
--- projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/simple/SimpleUnitTestCase.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/simple/SimpleUnitTestCase.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.metadata.test.ejb3.simple;
+
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.EjbJarDDObjectFactory;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 63872 $
+ */
+public class SimpleUnitTestCase extends TestCase
+{
+   public void test1() throws Exception
+   {
+      URL ddResource = getClass().getResource("ejb-jar.xml");
+      assertNotNull(ddResource);
+      EjbJarDD xml = EjbJarDDObjectFactory.parse(ddResource);
+      assertEquals("Simple", xml.getDisplayName());
+   }
+}

Added: projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/whitespace/WhitespaceUnitTestCase.java
===================================================================
--- projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/whitespace/WhitespaceUnitTestCase.java	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/test/java/org/jboss/metadata/test/ejb3/whitespace/WhitespaceUnitTestCase.java	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.metadata.test.ejb3.whitespace;
+
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.EjbJarDDObjectFactory;
+import org.jboss.ejb3.metamodel.EnterpriseBean;
+import org.jboss.ejb3.metamodel.SessionEnterpriseBean;
+import org.jboss.metamodel.descriptor.EnvEntry;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: 63873 $
+ */
+public class WhitespaceUnitTestCase extends TestCase
+{
+   public void test1() throws Exception
+   {
+      URL ddResource = getClass().getResource("ejb-jar.xml");
+      assertNotNull(ddResource);
+      EjbJarDD xml = EjbJarDDObjectFactory.parse(ddResource);
+      assertEquals("Whitespace", xml.getDisplayName());
+      assertEquals(1, xml.getEnterpriseBeans().getEnterpriseBeans().size());
+      EnterpriseBean bean = xml.getEnterpriseBeans().getEnterpriseBeans().iterator().next();
+      assertTrue(bean instanceof SessionEnterpriseBean);
+      assertEquals("WhitespaceBean", bean.getEjbName());
+      assertEquals(1, bean.getEnvEntries().size());
+      EnvEntry envEntry = bean.getEnvEntries().iterator().next();
+      assertEquals("whitespace", envEntry.getEnvEntryName());
+      assertEquals("java.lang.String", envEntry.getEnvEntryType());
+      assertEquals(" ", envEntry.getEnvEntryValue());
+   }
+}

Added: projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/simple/ejb-jar.xml
===================================================================
--- projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/simple/ejb-jar.xml	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/simple/ejb-jar.xml	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar
+        xmlns="http://java.sun.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+        version="3.0">
+   <description>Simple description</description>
+   <display-name>Simple</display-name>
+</ejb-jar>
\ No newline at end of file

Added: projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/whitespace/ejb-jar.xml
===================================================================
--- projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/whitespace/ejb-jar.xml	                        (rev 0)
+++ projects/metadata/ejb/trunk/src/test/resources/org/jboss/metadata/test/ejb3/whitespace/ejb-jar.xml	2009-06-26 09:28:53 UTC (rev 90625)
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<ejb-jar
+        xmlns="http://java.sun.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+        version="3.0">
+   <display-name>Whitespace</display-name>
+   <enterprise-beans>
+      <session>
+         <ejb-name>WhitespaceBean</ejb-name>
+         <env-entry>
+            <env-entry-name>whitespace</env-entry-name>
+            <env-entry-type>java.lang.String</env-entry-type>
+            <env-entry-value> </env-entry-value>
+         </env-entry>
+      </session>
+   </enterprise-beans>
+</ejb-jar>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list