Author: dblevins
Date: Thu May 31 11:45:13 2007
New Revision: 543210

URL: http://svn.apache.org/viewvc?view=rev&rev=543210
Log:
Do not collapse the strings of an env-entry-value

Added:
    
incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/StringAdapter.java
Modified:
    
incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EnvEntry.java

Modified: 
incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EnvEntry.java
URL: 
http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EnvEntry.java?view=diff&rev=543210&r1=543209&r2=543210
==============================================================================
--- 
incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EnvEntry.java
 (original)
+++ 
incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/EnvEntry.java
 Thu May 31 11:45:13 2007
@@ -69,8 +69,11 @@
     protected String envEntryName;
     @XmlElement(name = "env-entry-type")
     protected String envEntryType;
+
+    @XmlJavaTypeAdapter(StringAdapter.class)
     @XmlElement(name = "env-entry-value")
     protected String envEntryValue;
+
     @XmlElement(name = "mapped-name")
     protected String mappedName;
     @XmlElement(name = "injection-target", required = true)

Added: 
incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/StringAdapter.java
URL: 
http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/StringAdapter.java?view=auto&rev=543210
==============================================================================
--- 
incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/StringAdapter.java
 (added)
+++ 
incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/StringAdapter.java
 Thu May 31 11:45:13 2007
@@ -0,0 +1,32 @@
+/**
+ * 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.openejb.jee;
+
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class StringAdapter extends 
javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String, 
java.lang.String> {
+    public String unmarshal(String s) throws Exception {
+        return s;
+    }
+
+    public String marshal(String s) throws Exception {
+        return s;
+    }
+}


Reply via email to