You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by da...@apache.org on 2007/09/28 04:25:33 UTC
svn commit: r580195 [2/2] - in /openejb/trunk/openejb3/container:
openejb-core/src/main/java/org/apache/openejb/config/
openejb-jee/src/main/java/org/apache/openejb/jee/
openejb-jee/src/test/resources/
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java?rev=580195&r1=580194&r2=580195&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/WebApp.java Thu Sep 27 19:25:31 2007
@@ -29,6 +29,8 @@
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.ArrayList;
import java.util.List;
+import java.util.Collection;
+import java.util.Map;
@XmlRootElement(name = "web-app")
@XmlAccessorType(XmlAccessType.FIELD)
@@ -103,23 +105,23 @@
protected List<LocaleEncodingMappingList> localeEncodingMappingList;
@XmlElement(name = "env-entry", required = true)
- protected List<EnvEntry> envEntry;
+ protected KeyedCollection<String,EnvEntry> envEntry;
@XmlElement(name = "ejb-ref", required = true)
- protected List<EjbRef> ejbRef;
+ protected KeyedCollection<String,EjbRef> ejbRef;
@XmlElement(name = "ejb-local-ref", required = true)
- protected List<EjbLocalRef> ejbLocalRef;
+ protected KeyedCollection<String,EjbLocalRef> ejbLocalRef;
@XmlElement(name = "service-ref", required = true)
- protected List<ServiceRef> serviceRef;
+ protected KeyedCollection<String,ServiceRef> serviceRef;
@XmlElement(name = "resource-ref", required = true)
- protected List<ResourceRef> resourceRef;
+ protected KeyedCollection<String,ResourceRef> resourceRef;
@XmlElement(name = "resource-env-ref", required = true)
- protected List<ResourceEnvRef> resourceEnvRef;
+ protected KeyedCollection<String,ResourceEnvRef> resourceEnvRef;
@XmlElement(name = "message-destination-ref", required = true)
- protected List<MessageDestinationRef> messageDestinationRef;
+ protected KeyedCollection<String,MessageDestinationRef> messageDestinationRef;
@XmlElement(name = "persistence-context-ref", required = true)
- protected List<PersistenceContextRef> persistenceContextRef;
+ protected KeyedCollection<String,PersistenceContextRef> persistenceContextRef;
@XmlElement(name = "persistence-unit-ref", required = true)
- protected List<PersistenceUnitRef> persistenceUnitRef;
+ protected KeyedCollection<String,PersistenceUnitRef> persistenceUnitRef;
@XmlElement(name = "post-construct", required = true)
protected List<LifecycleCallback> postConstruct;
@XmlElement(name = "pre-destroy", required = true)
@@ -290,67 +292,130 @@
return this.localeEncodingMappingList;
}
- public List<EnvEntry> getEnvEntry() {
+ public Collection<EnvEntry> getEnvEntry() {
if (envEntry == null) {
- envEntry = new ArrayList<EnvEntry>();
+ envEntry = new KeyedCollection<String,EnvEntry>();
}
return this.envEntry;
}
- public List<EjbRef> getEjbRef() {
+ public Map<String,EnvEntry> getEnvEntryMap() {
+ if (envEntry == null) {
+ envEntry = new KeyedCollection<String,EnvEntry>();
+ }
+ return this.envEntry.toMap();
+ }
+
+ public Collection<EjbRef> getEjbRef() {
if (ejbRef == null) {
- ejbRef = new ArrayList<EjbRef>();
+ ejbRef = new KeyedCollection<String,EjbRef>();
}
return this.ejbRef;
}
- public List<EjbLocalRef> getEjbLocalRef() {
+ public Map<String,EjbRef> getEjbRefMap() {
+ if (ejbRef == null) {
+ ejbRef = new KeyedCollection<String,EjbRef>();
+ }
+ return this.ejbRef.toMap();
+ }
+
+ public Collection<EjbLocalRef> getEjbLocalRef() {
if (ejbLocalRef == null) {
- ejbLocalRef = new ArrayList<EjbLocalRef>();
+ ejbLocalRef = new KeyedCollection<String,EjbLocalRef>();
}
return this.ejbLocalRef;
}
- public List<ServiceRef> getServiceRef() {
+ public Map<String,EjbLocalRef> getEjbLocalRefMap() {
+ if (ejbLocalRef == null) {
+ ejbLocalRef = new KeyedCollection<String,EjbLocalRef>();
+ }
+ return this.ejbLocalRef.toMap();
+ }
+
+ public Collection<ServiceRef> getServiceRef() {
if (serviceRef == null) {
- serviceRef = new ArrayList<ServiceRef>();
+ serviceRef = new KeyedCollection<String,ServiceRef>();
}
return this.serviceRef;
}
- public List<ResourceRef> getResourceRef() {
+ public Map<String,ServiceRef> getServiceRefMap() {
+ if (serviceRef == null) {
+ serviceRef = new KeyedCollection<String,ServiceRef>();
+ }
+ return this.serviceRef.toMap();
+ }
+
+ public Collection<ResourceRef> getResourceRef() {
if (resourceRef == null) {
- resourceRef = new ArrayList<ResourceRef>();
+ resourceRef = new KeyedCollection<String,ResourceRef>();
}
return this.resourceRef;
}
- public List<ResourceEnvRef> getResourceEnvRef() {
+ public Map<String,ResourceRef> getResourceRefMap() {
+ if (resourceRef == null) {
+ resourceRef = new KeyedCollection<String,ResourceRef>();
+ }
+ return this.resourceRef.toMap();
+ }
+
+ public Collection<ResourceEnvRef> getResourceEnvRef() {
if (resourceEnvRef == null) {
- resourceEnvRef = new ArrayList<ResourceEnvRef>();
+ resourceEnvRef = new KeyedCollection<String,ResourceEnvRef>();
}
return this.resourceEnvRef;
}
- public List<MessageDestinationRef> getMessageDestinationRef() {
+ public Map<String,ResourceEnvRef> getResourceEnvRefMap() {
+ if (resourceEnvRef == null) {
+ resourceEnvRef = new KeyedCollection<String,ResourceEnvRef>();
+ }
+ return this.resourceEnvRef.toMap();
+ }
+
+ public Collection<MessageDestinationRef> getMessageDestinationRef() {
if (messageDestinationRef == null) {
- messageDestinationRef = new ArrayList<MessageDestinationRef>();
+ messageDestinationRef = new KeyedCollection<String,MessageDestinationRef>();
}
return this.messageDestinationRef;
}
- public List<PersistenceContextRef> getPersistenceContextRef() {
+ public Map<String,MessageDestinationRef> getMessageDestinationRefMap() {
+ if (messageDestinationRef == null) {
+ messageDestinationRef = new KeyedCollection<String,MessageDestinationRef>();
+ }
+ return this.messageDestinationRef.toMap();
+ }
+
+ public Collection<PersistenceContextRef> getPersistenceContextRef() {
if (persistenceContextRef == null) {
- persistenceContextRef = new ArrayList<PersistenceContextRef>();
+ persistenceContextRef = new KeyedCollection<String,PersistenceContextRef>();
}
return this.persistenceContextRef;
}
- public List<PersistenceUnitRef> getPersistenceUnitRef() {
+ public Map<String,PersistenceContextRef> getPersistenceContextRefMap() {
+ if (persistenceContextRef == null) {
+ persistenceContextRef = new KeyedCollection<String,PersistenceContextRef>();
+ }
+ return this.persistenceContextRef.toMap();
+ }
+
+ public Collection<PersistenceUnitRef> getPersistenceUnitRef() {
if (persistenceUnitRef == null) {
- persistenceUnitRef = new ArrayList<PersistenceUnitRef>();
+ persistenceUnitRef = new KeyedCollection<String,PersistenceUnitRef>();
}
return this.persistenceUnitRef;
+ }
+
+ public Map<String,PersistenceUnitRef> getPersistenceUnitRefMap() {
+ if (persistenceUnitRef == null) {
+ persistenceUnitRef = new KeyedCollection<String,PersistenceUnitRef>();
+ }
+ return this.persistenceUnitRef.toMap();
}
public List<LifecycleCallback> getPostConstruct() {
Modified: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/ejb-jar-example1.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/ejb-jar-example1.xml?rev=580195&r1=580194&r2=580195&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/ejb-jar-example1.xml (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/ejb-jar-example1.xml Thu Sep 27 19:25:31 2007
@@ -144,14 +144,14 @@
</ejb-local-ref>
<service-ref>
<description>String</description>
- <display-name>token</display-name>
+ <display-name>token1</display-name>
<icon>
- <small-icon>token</small-icon>
- <large-icon>token</large-icon>
+ <small-icon>token1</small-icon>
+ <large-icon>token1</large-icon>
</icon>
- <service-ref-name>token</service-ref-name>
- <service-interface>token</service-interface>
- <service-ref-type>token</service-ref-type>
+ <service-ref-name>token1</service-ref-name>
+ <service-interface>token1</service-interface>
+ <service-ref-type>token1</service-ref-type>
<wsdl-file>http://www.altova.com</wsdl-file>
<jaxrpc-mapping-file>token</jaxrpc-mapping-file>
<service-qname>q:name</service-qname>
@@ -186,14 +186,14 @@
</service-ref>
<service-ref>
<description>String</description>
- <display-name>token</display-name>
+ <display-name>token2</display-name>
<icon>
- <small-icon>token</small-icon>
- <large-icon>token</large-icon>
+ <small-icon>token2</small-icon>
+ <large-icon>token2</large-icon>
</icon>
- <service-ref-name>token</service-ref-name>
- <service-interface>token</service-interface>
- <service-ref-type>token</service-ref-type>
+ <service-ref-name>token2</service-ref-name>
+ <service-interface>token2</service-interface>
+ <service-ref-type>token2</service-ref-type>
<wsdl-file>http://www.altova.com</wsdl-file>
<jaxrpc-mapping-file>token</jaxrpc-mapping-file>
<service-qname>q:name</service-qname>