[jboss-svn-commits] JBL Code SVN: r13697 - in labs/jbossesb/trunk/product: rosetta/src/org/jboss/soa/esb/message/format and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Jul 21 05:19:33 EDT 2007


Author: mark.little at jboss.com
Date: 2007-07-21 05:19:33 -0400 (Sat, 21 Jul 2007)
New Revision: 13697

Modified:
   labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java
Log:
http://jira.jboss.com/jira/browse/JBESB-741

Modified: labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java	2007-07-21 05:19:44 UTC (rev 13696)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/message/format/MessageType.java	2007-07-21 09:19:33 UTC (rev 13697)
@@ -2,6 +2,8 @@
 
 import java.net.URI;
 
+import org.jboss.soa.esb.common.ModulePropertyManager;
+
 /*
  * JBoss, Home of Professional Open Source
  * Copyright 2006, JBoss Inc., and others contributors as indicated 
@@ -24,39 +26,53 @@
  */
 
 /**
- * You get a message of a specific type when you need it. Obviously that type may not be
- * suitable for the service (hopefully you've got that contractual information a priori, but
- * maybe not) and in which case some translation/transformation may be necessary.
+ * You get a message of a specific type when you need it. Obviously that type
+ * may not be suitable for the service (hopefully you've got that contractual
+ * information a priori, but maybe not) and in which case some
+ * translation/transformation may be necessary.
  * 
  * @author Mark Little
- *
+ * 
  */
 
 public abstract class MessageType
 {
-	/*
-	 * DO NOT reorder this list. New types may be added as required.
-	 */
-	
-	public static URI JBOSS_XML = null;
-	public static URI JAVA_SERIALIZED = null;
+    public static final String DEFAULT_URI = "org.jboss.soa.esb.message.default.uri";
 
-	public static URI DEFAULT_TYPE = null;
-	
-	static
+    public static final String SERIALIZED_URI = "urn:jboss/esb/message/type/JAVA_SERIALIZED";
+
+    public static final String XML_URI = "urn:jboss/esb/message/type/JBOSS_XML";
+
+    /*
+         * DO NOT reorder this list. New types may be added as required.
+         */
+
+    public static URI JBOSS_XML = null;
+
+    public static URI JAVA_SERIALIZED = null;
+
+    public static URI DEFAULT_TYPE = null;
+
+    static
+    {
+	try
 	{
-		try
-		{
-			JBOSS_XML = new URI("urn:jboss/esb/message/type/JBOSS_XML");
-			JAVA_SERIALIZED = new URI("urn:jboss/esb/message/type/JAVA_SERIALIZED");
-			
-			DEFAULT_TYPE = JBOSS_XML;
-		}
-		catch (Exception ex)
-		{
-			throw new ExceptionInInitializerError(ex.toString());
-		}
+	    JBOSS_XML = new URI(XML_URI);
+	    JAVA_SERIALIZED = new URI(SERIALIZED_URI);
 
+	    String defaultURI = ModulePropertyManager.getPropertyManager(
+		    ModulePropertyManager.CORE_MODULE).getProperty(DEFAULT_URI);
+
+	    if (defaultURI != null)
+		DEFAULT_TYPE = new URI(defaultURI);
+	    else
+		DEFAULT_TYPE = JBOSS_XML;
 	}
-	
+	catch (Exception ex)
+	{
+	    throw new ExceptionInInitializerError(ex.toString());
+	}
+
+    }
+
 }




More information about the jboss-svn-commits mailing list