[jboss-cvs] JBossAS SVN: r66069 - in trunk/server/src: main/org/jboss/metadata and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 11 23:53:17 EDT 2007
Author: scott.stark at jboss.org
Date: 2007-10-11 23:53:17 -0400 (Thu, 11 Oct 2007)
New Revision: 66069
Added:
trunk/server/src/etc/deployers/metadata-beans.xml
trunk/server/src/main/org/jboss/metadata/EnvEntryBinder.java
Log:
JBAS-4506, checkin missing additions
Added: trunk/server/src/etc/deployers/metadata-beans.xml
===================================================================
--- trunk/server/src/etc/deployers/metadata-beans.xml (rev 0)
+++ trunk/server/src/etc/deployers/metadata-beans.xml 2007-10-12 03:53:17 UTC (rev 66069)
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ MetaData configuration
+ $Id$
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="SchemaResolverConfig"
+ class="org.jboss.xb.binding.sunday.unmarshalling.SchemaResolverConfig">
+
+ <!-- schemaLocation to JBossXBuilder binding classes -->
+ <property name="bindingClassesByLocations">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <!-- EarMetaData -->
+ <entry>
+ <key>application_1_2.dtd</key>
+ <value>org.jboss.metadata.ear.spec.Ear13DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>application_1_3.dtd</key>
+ <value>org.jboss.metadata.ear.spec.Ear13DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>application_1_4.xsd</key>
+ <value>org.jboss.metadata.ear.spec.Ear14MetaData</value>
+ </entry>
+ <entry>
+ <key>application_5_0.xsd</key>
+ <value>org.jboss.metadata.ear.spec.Ear50MetaData</value>
+ </entry>
+ <!-- JBossAppMetaData -->
+ <entry>
+ <key>jboss-app_3_0.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_3_2.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_4_0.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_4_2.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_5_0.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_5_0.xsd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50AppMetaData</value>
+ </entry>
+
+ <!-- EjbJarMetaData -->
+ <entry>
+ <key>ejb-jar_2_0.dtd</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar20MetaData</value>
+ </entry>
+ <entry>
+ <key>ejb-jar_2_1.xsd</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar21MetaData</value>
+ </entry>
+ <entry>
+ <key>ejb-jar_3_0.xsd</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar30MetaData</value>
+ </entry>
+ <!-- WebMetaData -->
+ <entry>
+ <key>web-app_2_2.dtd</key>
+ <value>org.jboss.metadata.web.spec.Web23MetaData</value>
+ </entry>
+ <entry>
+ <key>web-app_2_3.dtd</key>
+ <value>org.jboss.metadata.web.spec.Web23MetaData</value>
+ </entry>
+ <entry>
+ <key>web-app_2_4.xsd</key>
+ <value>org.jboss.metadata.web.spec.Web24MetaData</value>
+ </entry>
+ <entry>
+ <key>web-app_2_5.xsd</key>
+ <value>org.jboss.metadata.web.spec.Web25MetaData</value>
+ </entry>
+ <!-- JBossWebMetaData -->
+ <entry>
+ <key>jboss-web_3_2.dtd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>boss-web_4_0.dtd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-web_5_0.dtd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-web_5_0.xsd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50WebMetaData</value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+</deployment>
Property changes on: trunk/server/src/etc/deployers/metadata-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
Added: trunk/server/src/main/org/jboss/metadata/EnvEntryBinder.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/EnvEntryBinder.java (rev 0)
+++ trunk/server/src/main/org/jboss/metadata/EnvEntryBinder.java 2007-10-12 03:53:17 UTC (rev 66069)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.metadata;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.util.naming.Util;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public class EnvEntryBinder
+{
+ public static void bindEnvEntry(Context ctx, EnvEntryMetaData entry)
+ throws ClassNotFoundException, NamingException
+ {
+ ClassLoader loader = EnvEntryMetaData.class.getClassLoader();
+ Class type = loader.loadClass(entry.getType());
+ if (type == String.class)
+ {
+ Util.bind(ctx, entry.getName(), entry.getValue());
+ }
+ else if (type == Integer.class)
+ {
+ Util.bind(ctx, entry.getName(), new Integer(entry.getValue()));
+ }
+ else if (type == Long.class)
+ {
+ Util.bind(ctx, entry.getName(), new Long(entry.getValue()));
+ }
+ else if (type == Double.class)
+ {
+ Util.bind(ctx, entry.getName(), new Double(entry.getValue()));
+ }
+ else if (type == Float.class)
+ {
+ Util.bind(ctx, entry.getName(), new Float(entry.getValue()));
+ }
+ else if (type == Byte.class)
+ {
+ Util.bind(ctx, entry.getName(), new Byte(entry.getValue()));
+ }
+ else if (type == Character.class)
+ {
+ Object value = null;
+ String input = entry.getValue();
+ if (input == null || input.length() == 0)
+ {
+ value = new Character((char) 0);
+ }
+ else
+ {
+ value = new Character(input.charAt(0));
+ }
+ Util.bind(ctx, entry.getName(), value);
+ }
+ else if (type == Short.class)
+ {
+ Util.bind(ctx, entry.getName(), new Short(entry.getValue()));
+ }
+ else if (type == Boolean.class)
+ {
+ Util.bind(ctx, entry.getName(), new Boolean(entry.getValue()));
+ }
+ else
+ {
+ // Default to a String type
+ Util.bind(ctx, entry.getName(), entry.getValue());
+ }
+ }
+
+}
Property changes on: trunk/server/src/main/org/jboss/metadata/EnvEntryBinder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ native
More information about the jboss-cvs-commits
mailing list