You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2009/11/19 11:01:52 UTC
svn commit: r882092 [1/2] - in /geronimo/server/branches/2.2/plugins/tomcat:
geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/
geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/
geronimo-tomcat6/src/test/resources/deployables/ to...
Author: xuhaihong
Date: Thu Nov 19 10:00:43 2009
New Revision: 882092
URL: http://svn.apache.org/viewvc?rev=882092&view=rev
Log:
GERONIMO-4953 No way to set Tomcat native cluster on engine and host level
Added:
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ChannelType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterListenerType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/InterceptorType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ManagerType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MemberType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MembershipType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ReceiverType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/SenderType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/TransportType.java (with props)
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/test/resources/deployables/server-2.xml (with props)
Modified:
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ContextType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EjbType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EngineType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EnvironmentType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ExecutorType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/HostType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ListenerType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/LocalEjbType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/NamingResourcesType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ObjectFactory.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/RealmType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceEnvRefType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServiceRefType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServiceType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/TransactionType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ValveType.java
geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/TomcatServerGBeanTest.java
geronimo/server/branches/2.2/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
Added: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ChannelType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ChannelType.java?rev=882092&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ChannelType.java (added)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ChannelType.java Thu Nov 19 10:00:43 2009
@@ -0,0 +1,130 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.tomcat.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.catalina.tribes.Channel;
+import org.apache.catalina.tribes.ManagedChannel;
+import org.apache.catalina.tribes.group.GroupChannel;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ChannelType")
+public class ChannelType {
+
+ @XmlAttribute
+ protected String className = GroupChannel.class.getName();
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ @XmlElement(name = "Membership")
+ protected MembershipType membership;
+
+ @XmlElement(name = "Interceptor")
+ protected List<InterceptorType> interceptor;
+
+ @XmlElement(name = "Receiver")
+ protected ReceiverType receiver;
+
+ @XmlElement(name = "Sender")
+ protected SenderType sender;
+
+ public Channel getChannel(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ Channel channel = (Channel) recipe.create(cl);
+ for (InterceptorType interceptorType : getInterceptor()) {
+ channel.addInterceptor(interceptorType.getInterceptor(cl));
+ }
+ if (channel instanceof ManagedChannel) {
+ ManagedChannel managedChannel = (ManagedChannel) channel;
+ if (sender != null) {
+ managedChannel.setChannelSender(sender.getSender(cl));
+ }
+ if (receiver != null) {
+ managedChannel.setChannelReceiver(receiver.getReceiver(cl));
+ }
+ if (membership != null) {
+ managedChannel.setMembershipService(membership.getMembership(cl));
+ }
+ }
+ return channel;
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ public MembershipType getMembership() {
+ return membership;
+ }
+
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public ReceiverType getReceiver() {
+ return receiver;
+ }
+
+ public SenderType getSender() {
+ return sender;
+ }
+
+ public List<InterceptorType> getInterceptor() {
+ if (interceptor == null) {
+ interceptor = new ArrayList<InterceptorType>();
+ }
+ return interceptor;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public void setMembership(MembershipType membership) {
+ this.membership = membership;
+ }
+
+ public void setReceiver(ReceiverType receiver) {
+ this.receiver = receiver;
+ }
+
+ public void setSender(SenderType sender) {
+ this.sender = sender;
+ }
+}
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ChannelType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ChannelType.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ChannelType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterListenerType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterListenerType.java?rev=882092&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterListenerType.java (added)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterListenerType.java Thu Nov 19 10:00:43 2009
@@ -0,0 +1,73 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.tomcat.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.catalina.ha.ClusterListener;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ClusterListenerType")
+public class ClusterListenerType {
+
+ @XmlAttribute(required = true)
+ protected String className;
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public ClusterListener getLifecycleListener(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ ClusterListener listener = (ClusterListener) recipe.create(cl);
+ return listener;
+ }
+}
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterListenerType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterListenerType.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterListenerType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ClusterType.java Thu Nov 19 10:00:43 2009
@@ -1,17 +1,43 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+import org.apache.catalina.Cluster;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.Valve;
+import org.apache.catalina.ha.CatalinaCluster;
+import org.apache.catalina.ha.ClusterListener;
+import org.apache.catalina.ha.tcp.SimpleTcpCluster;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
/**
* <p>Java class for ClusterType complex type.
@@ -30,8 +56,107 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "ClusterType")
+@XmlType(name = "ClusterType", propOrder = { "manager", "channel", "valve", "listener", "clusterListener" })
public class ClusterType {
+ @XmlAttribute
+ protected String className = SimpleTcpCluster.class.getName();
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ @XmlElement(name = "Manager")
+ protected List<ManagerType> manager;
+ @XmlElement(name = "Channel")
+ protected ChannelType channel;
+
+ @XmlElement(name = "Valve")
+ protected List<ValveType> valve;
+
+ @XmlElement(name = "Listener")
+ protected List<ListenerType> listener;
+
+ @XmlElement(name = "ClusterListener")
+ protected List<ClusterListenerType> clusterListener;
+
+ public ChannelType getChannel() {
+ return channel;
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ public Cluster getCluster(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ Cluster cluster = (Cluster) recipe.create(cl);
+ for (ManagerType managerType : getManager()) {
+ cluster.registerManager(managerType.getManager(cl));
+ }
+ if (cluster instanceof CatalinaCluster) {
+ CatalinaCluster catalinaCluster = (CatalinaCluster) cluster;
+ //Channel
+ if (getChannel() != null) {
+ catalinaCluster.setChannel(getChannel().getChannel(cl));
+ }
+ //Valve
+ for (ValveType valveType : getValve()) {
+ Valve valve = valveType.getValve(cl);
+ catalinaCluster.addValve(valve);
+ }
+ //ClusterListener
+ for (ClusterListenerType clusterListenerType : getClusterListener()) {
+ ClusterListener clusterListener = clusterListenerType.getLifecycleListener(cl);
+ catalinaCluster.addClusterListener(clusterListener);
+ }
+ }
+ // LifecycleListener
+ if (cluster instanceof Lifecycle) {
+ Lifecycle lifecycle = (Lifecycle) cluster;
+ for (ListenerType listenerType : getListener()) {
+ lifecycle.addLifecycleListener(listenerType.getLifecycleListener(cl));
+ }
+ }
+ return cluster;
+ }
+
+ public List<ClusterListenerType> getClusterListener() {
+ return clusterListener;
+ }
+
+ public List<ListenerType> getListener() {
+ if (listener == null) {
+ listener = new ArrayList<ListenerType>();
+ }
+ return listener;
+ }
+
+ public List<ManagerType> getManager() {
+ if (manager == null) {
+ manager = new ArrayList<ManagerType>();
+ }
+ return manager;
+ }
+
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public List<ValveType> getValve() {
+ if (valve == null) {
+ valve = new ArrayList<ValveType>();
+ }
+ return valve;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
}
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java Thu Nov 19 10:00:43 2009
@@ -1,9 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.05 at 10:24:22 AM PDT
-//
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ContextType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ContextType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ContextType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ContextType.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EjbType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EjbType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EjbType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EjbType.java Thu Nov 19 10:00:43 2009
@@ -1,9 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EngineType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EngineType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EngineType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EngineType.java Thu Nov 19 10:00:43 2009
@@ -1,9 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.05 at 10:24:22 AM PDT
-//
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
@@ -72,7 +82,7 @@
@XmlElement(name = "Host")
protected List<HostType> host;
@XmlElement(name = "Cluster")
- protected List<ClusterType> cluster;
+ protected ClusterType cluster;
@XmlElement(name = "Listener")
protected List<ListenerType> listener;
@XmlAttribute
@@ -141,33 +151,8 @@
return this.host;
}
- /**
- * Gets the value of the cluster property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the cluster property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getCluster().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link ClusterType }
- *
- *
- */
- public List<ClusterType> getCluster() {
- if (cluster == null) {
- cluster = new ArrayList<ClusterType>();
- }
- return this.cluster;
+ public ClusterType getCluster() {
+ return cluster;
}
/**
@@ -368,6 +353,9 @@
engine.addChild(host);
}
//cluster
+ if (getCluster() != null) {
+ engine.setCluster(getCluster().getCluster(cl));
+ }
//listener
if (engine instanceof Lifecycle) {
Lifecycle lifecycle = (Lifecycle) engine;
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EnvironmentType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EnvironmentType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EnvironmentType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/EnvironmentType.java Thu Nov 19 10:00:43 2009
@@ -1,9 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ExecutorType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ExecutorType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ExecutorType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ExecutorType.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
@@ -28,7 +37,6 @@
import org.apache.geronimo.gbean.AbstractNameQuery;
import org.apache.geronimo.gbean.AbstractName;
-
/**
* <p>Java class for ExecutorType complex type.
*
@@ -52,6 +60,7 @@
@XmlAttribute
protected String className = StandardThreadExecutor.class.getName();
+
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
@@ -97,19 +106,17 @@
return otherAttributes;
}
-
public Executor getExecutor(ClassLoader cl, Kernel kernel) throws Exception {
Map<String, Object> properties = new HashMap<String, Object>();
-
- for (Map.Entry<QName, String> entry: otherAttributes.entrySet()) {
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
String name = entry.getKey().getLocalPart();
if (name.endsWith("-ref")) {
AbstractNameQuery query = new AbstractNameQuery(URI.create(entry.getValue()));
Set<AbstractName> names = kernel.listGBeans(query);
- if (names.size() != 1) throw new IllegalStateException("Unsatisfied reference for name " + name + " and reference to " + entry.getValue());
+ if (names.size() != 1)
+ throw new IllegalStateException("Unsatisfied reference for name " + name + " and reference to " + entry.getValue());
Object ref = kernel.getGBean(names.iterator().next());
properties.put(name.substring(0, name.length() - 4), ref);
-
} else {
properties.put(name, entry.getValue());
}
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/HostType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/HostType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/HostType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/HostType.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
@@ -21,6 +30,7 @@
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
+import org.apache.catalina.Cluster;
import org.apache.catalina.Host;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleListener;
@@ -31,7 +41,6 @@
import org.apache.xbean.recipe.ObjectRecipe;
import org.apache.xbean.recipe.Option;
-
/**
* <p>Java class for HostType complex type.
*
@@ -66,46 +75,54 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "HostType", propOrder = {
- "alias",
- "cluster",
- "listener",
- "realm",
- "valve",
- "context"
-})
+@XmlType(name = "HostType", propOrder = { "alias", "cluster", "listener", "realm", "valve", "context" })
public class HostType {
@XmlElement(name = "Alias")
protected List<String> alias;
+
@XmlElement(name = "Cluster")
protected ClusterType cluster;
+
@XmlElement(name = "Listener")
protected List<ListenerType> listener;
+
@XmlElement(name = "Realm")
protected RealmType realm;
+
@XmlElement(name = "Valve")
protected List<ValveType> valve;
+
@XmlElement(name = "Context")
protected List<ContextType> context;
+
@XmlAttribute
protected String className = StandardHost.class.getName();
+
@XmlAttribute
protected String name;
+
@XmlAttribute
protected String appBase;
+
@XmlAttribute
protected String hostConfigClass;
+
@XmlAttribute
protected Boolean unpackWARs;
+
@XmlAttribute
protected Boolean autoDeploy;
+
@XmlAttribute
protected Boolean deployOnStartup;
+
@XmlAttribute
protected Boolean xmlValidation;
+
@XmlAttribute
protected Boolean xmlNamespaceAware;
+
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
@@ -517,46 +534,41 @@
properties.put("deployOnStartup", isDeployOnStartup());
properties.put("xmlValidation", isXmlValidation());
properties.put("xmlNamespaceAware", isXmlNamespaceAware());
-
- //TODO cluster
-// if (getCluster() != null) {
-// ClusterType clusterType = getCluster();
-// Cluster cluster = clusterType.getCluster(cl);
-// properties.put("cluater", cluster);
-// }
+ if (getCluster() != null) {
+ ClusterType clusterType = getCluster();
+ Cluster cluster = clusterType.getCluster(cl);
+ properties.put("cluster", cluster);
+ }
if (getRealm() != null) {
Realm realm = getRealm().getRealm(cl);
properties.put("realm", realm);
}
- for (Map.Entry<QName, String> entry: otherAttributes.entrySet()) {
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
String name = entry.getKey().getLocalPart();
properties.put(name, entry.getValue());
}
ObjectRecipe recipe = new ObjectRecipe(className, properties);
recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
Host host = (Host) recipe.create(cl);
-
if (host instanceof Lifecycle) {
Lifecycle lifecycle = (Lifecycle) host;
- for (ListenerType listenerType: getListener()) {
+ for (ListenerType listenerType : getListener()) {
LifecycleListener listener = listenerType.getLifecycleListener(cl);
lifecycle.addLifecycleListener(listener);
}
}
//alias
- for (String alias: getAlias()) {
+ for (String alias : getAlias()) {
host.addAlias(alias);
}
-
//valve
if (host instanceof Pipeline) {
Pipeline pipeline = (Pipeline) host;
- for (ValveType valveType: getValve()) {
+ for (ValveType valveType : getValve()) {
Valve valve = valveType.getValve(cl);
pipeline.addValve(valve);
}
}
-
//context
//TODO contexts
return host;
Added: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/InterceptorType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/InterceptorType.java?rev=882092&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/InterceptorType.java (added)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/InterceptorType.java Thu Nov 19 10:00:43 2009
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.tomcat.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.catalina.tribes.ChannelInterceptor;
+import org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "InterceptorType")
+public class InterceptorType {
+
+ @XmlAttribute
+ protected String className;
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ @XmlElement(name = "Member")
+ protected List<MemberType> member;
+
+ public String getClassName() {
+ return className;
+ }
+
+ public ChannelInterceptor getInterceptor(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ ChannelInterceptor channelInterceptor = (ChannelInterceptor) recipe.create(cl);
+ //Special handle for staticMembershipInterceptor
+ if (channelInterceptor instanceof StaticMembershipInterceptor && getMember().size() > 0) {
+ StaticMembershipInterceptor staticMembershipInterceptor = (StaticMembershipInterceptor) channelInterceptor;
+ for (MemberType memberType : getMember()) {
+ staticMembershipInterceptor.addStaticMember(memberType.getMember(cl));
+ }
+ }
+ return channelInterceptor;
+ }
+
+ public List<MemberType> getMember() {
+ if (member == null) {
+ member = new ArrayList<MemberType>();
+ }
+ return member;
+ }
+
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+}
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/InterceptorType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/InterceptorType.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/InterceptorType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ListenerType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ListenerType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ListenerType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ListenerType.java Thu Nov 19 10:00:43 2009
@@ -1,30 +1,36 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
-import java.util.Map;
import java.util.HashMap;
+import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.namespace.QName;
import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.Executor;
import org.apache.xbean.recipe.ObjectRecipe;
import org.apache.xbean.recipe.Option;
-
/**
* <p>Java class for ListenerType complex type.
*
@@ -48,6 +54,7 @@
@XmlAttribute
protected String className;
+
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
@@ -95,8 +102,7 @@
public LifecycleListener getLifecycleListener(ClassLoader cl) throws Exception {
Map<String, Object> properties = new HashMap<String, Object>();
-
- for (Map.Entry<QName, String> entry: otherAttributes.entrySet()) {
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
String name = entry.getKey().getLocalPart();
properties.put(name, entry.getValue());
}
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/LocalEjbType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/LocalEjbType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/LocalEjbType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/LocalEjbType.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
@@ -12,7 +21,6 @@
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
-
/**
* <p>Java class for LocalEjbType complex type.
*
@@ -32,6 +40,4 @@
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LocalEjbType")
public class LocalEjbType {
-
-
}
Added: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ManagerType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ManagerType.java?rev=882092&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ManagerType.java (added)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ManagerType.java Thu Nov 19 10:00:43 2009
@@ -0,0 +1,82 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.tomcat.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.catalina.Manager;
+import org.apache.catalina.ha.session.DeltaManager;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ManagerType")
+public class ManagerType {
+
+ @XmlAttribute
+ protected String className = DeltaManager.class.getName();
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ public String getClassName() {
+ return className;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and
+ * the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute
+ * by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return
+ * always non-null
+ */
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public Manager getManager(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ Manager manager = (Manager) recipe.create(cl);
+ return manager;
+ }
+}
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ManagerType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ManagerType.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ManagerType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MemberType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MemberType.java?rev=882092&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MemberType.java (added)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MemberType.java Thu Nov 19 10:00:43 2009
@@ -0,0 +1,59 @@
+
+package org.apache.geronimo.tomcat.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.membership.StaticMember;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "MemberType")
+public class MemberType {
+
+ @XmlAttribute
+ protected String className = StaticMember.class.getName();
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ public String getClassName() {
+ return className;
+ }
+
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public Member getMember(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ /*
+ * Use specified constructor will make sure the host attribute to be set prior other attributes
+ * for the default static member implementation
+ */
+ if (className.equals(StaticMember.class.getName())) {
+ recipe.setConstructorArgNames(new String[] { "host", "port", "aliveTime" });
+ }
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ Member member = (Member) recipe.create(cl);
+ return member;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+}
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MemberType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MemberType.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MemberType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MembershipType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MembershipType.java?rev=882092&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MembershipType.java (added)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MembershipType.java Thu Nov 19 10:00:43 2009
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.tomcat.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.catalina.tribes.MembershipService;
+import org.apache.catalina.tribes.membership.McastService;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "MembershipType")
+public class MembershipType {
+
+ @XmlAttribute
+ protected String className = McastService.class.getName();
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ public String getClassName() {
+ return className;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public MembershipService getMembership(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ MembershipService membershipService = (MembershipService) recipe.create(cl);
+ return membershipService;
+ }
+}
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MembershipType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MembershipType.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/MembershipType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/NamingResourcesType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/NamingResourcesType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/NamingResourcesType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/NamingResourcesType.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
@@ -19,7 +28,6 @@
import org.apache.catalina.deploy.NamingResources;
import org.apache.catalina.deploy.ContextResource;
-
/**
* <p>Java class for NamingResourcesType complex type.
*
@@ -46,32 +54,28 @@
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "NamingResourcesType", propOrder = {
- "ejb",
- "environment",
- "localEjb",
- "resource",
- "resourceEnvRef",
- "serviceRef",
- "transaction"
-})
-@XmlSeeAlso({
- ContextType.class
-})
+@XmlType(name = "NamingResourcesType", propOrder = { "ejb", "environment", "localEjb", "resource", "resourceEnvRef", "serviceRef", "transaction" })
+@XmlSeeAlso( { ContextType.class })
public class NamingResourcesType {
@XmlElement(name = "Ejb")
protected List<EjbType> ejb;
+
@XmlElement(name = "Environment")
protected List<EnvironmentType> environment;
+
@XmlElement(name = "LocalEjb")
protected List<LocalEjbType> localEjb;
+
@XmlElement(name = "Resource")
protected List<ResourceType> resource;
+
@XmlElement(name = "ResourceEnvRef")
protected List<ResourceEnvRefType> resourceEnvRef;
+
@XmlElement(name = "ServiceRef")
protected List<ServiceRefType> serviceRef;
+
@XmlElement(name = "Transaction")
protected List<TransactionType> transaction;
@@ -279,7 +283,7 @@
}
public void merge(NamingResources namingResources, ClassLoader cl) {
- for (ResourceType resourceType: getResource()) {
+ for (ResourceType resourceType : getResource()) {
ContextResource contextResource = resourceType.getContextResource(cl);
namingResources.addResource(contextResource);
}
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ObjectFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ObjectFactory.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ObjectFactory.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ObjectFactory.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
@@ -13,7 +22,6 @@
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
-
/**
* This object contains factory methods for each
* Java content interface and Java element interface
@@ -192,6 +200,38 @@
return new ResourceType();
}
+ public ClusterListenerType createClusterListenerType() {
+ return new ClusterListenerType();
+ }
+
+ public InterceptorType createInterceptorType() {
+ return new InterceptorType();
+ }
+
+ public ManagerType createManagerType() {
+ return new ManagerType();
+ }
+
+ public MembershipType createMembershipType() {
+ return new MembershipType();
+ }
+
+ public MemberType createMemberType() {
+ return new MemberType();
+ }
+
+ public ReceiverType createReceiverType() {
+ return new ReceiverType();
+ }
+
+ public SenderType createSenderType() {
+ return new SenderType();
+ }
+
+ public TransportType createTransportType() {
+ return new TransportType();
+ }
+
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ServerType }{@code >}}
*
@@ -200,5 +240,4 @@
public JAXBElement<ServerType> createServer(ServerType value) {
return new JAXBElement<ServerType>(_Server_QNAME, ServerType.class, null, value);
}
-
}
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/RealmType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/RealmType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/RealmType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/RealmType.java Thu Nov 19 10:00:43 2009
@@ -1,26 +1,33 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
-import java.util.Map;
import java.util.HashMap;
+import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.namespace.QName;
import org.apache.catalina.Realm;
-import org.apache.catalina.Executor;
import org.apache.xbean.recipe.ObjectRecipe;
import org.apache.xbean.recipe.Option;
Added: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ReceiverType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ReceiverType.java?rev=882092&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ReceiverType.java (added)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ReceiverType.java Thu Nov 19 10:00:43 2009
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.tomcat.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.catalina.tribes.ChannelReceiver;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ReceiverType")
+public class ReceiverType {
+
+ @XmlAttribute
+ protected String className;
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ public String getClassName() {
+ return className;
+ }
+
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public ChannelReceiver getReceiver(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ ChannelReceiver channelReceiver = (ChannelReceiver) recipe.create(cl);
+ return channelReceiver;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+}
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ReceiverType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ReceiverType.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ReceiverType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceEnvRefType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceEnvRefType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceEnvRefType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceEnvRefType.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ResourceType.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;
Added: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/SenderType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/SenderType.java?rev=882092&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/SenderType.java (added)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/SenderType.java Thu Nov 19 10:00:43 2009
@@ -0,0 +1,84 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.tomcat.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.namespace.QName;
+
+import org.apache.catalina.tribes.ChannelSender;
+import org.apache.catalina.tribes.transport.ReplicationTransmitter;
+import org.apache.xbean.recipe.ObjectRecipe;
+import org.apache.xbean.recipe.Option;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SenderType")
+public class SenderType {
+
+ @XmlAttribute
+ protected String className = ReplicationTransmitter.class.getName();
+
+ @XmlAnyAttribute
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ @XmlElement(name = "Transport")
+ private TransportType transport;
+
+ public String getClassName() {
+ return className;
+ }
+
+ public Map<QName, String> getOtherAttributes() {
+ return otherAttributes;
+ }
+
+ public ChannelSender getSender(ClassLoader cl) throws Exception {
+ Map<String, Object> properties = new HashMap<String, Object>();
+ for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
+ String name = entry.getKey().getLocalPart();
+ properties.put(name, entry.getValue());
+ }
+ ObjectRecipe recipe = new ObjectRecipe(className, properties);
+ recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
+ ChannelSender channelSender = (ChannelSender) recipe.create(cl);
+ if (channelSender instanceof ReplicationTransmitter && transport != null) {
+ ReplicationTransmitter replicationTransmitter = (ReplicationTransmitter) channelSender;
+ replicationTransmitter.setTransport(transport.getTransport(cl));
+ }
+ return channelSender;
+ }
+
+ public TransportType getTransport() {
+ return transport;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public void setTransport(TransportType transport) {
+ this.transport = transport;
+ }
+}
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/SenderType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/SenderType.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/SenderType.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java?rev=882092&r1=882091&r2=882092&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java (original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ServerType.java Thu Nov 19 10:00:43 2009
@@ -1,10 +1,19 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.06.02 at 10:12:18 AM PDT
-//
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.geronimo.tomcat.model;