User: starksm
Date: 01/04/17 23:04:28
Modified: src/main/org/jboss/metadata Tag: Branch_2_2
ApplicationMetaData.java
Log:
Add a org.jboss.metadata.ApplicationMetaData.assumeJavaPrefix property that
defaults to true which restores the 2.2 behavior requiring all res-jndi-name
value to begin with java:/
Revision Changes Path
No revision
No revision
1.13.2.2 +16 -2 jboss/src/main/org/jboss/metadata/ApplicationMetaData.java
Index: ApplicationMetaData.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metadata/ApplicationMetaData.java,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -u -r1.13.2.1 -r1.13.2.2
--- ApplicationMetaData.java 2001/04/17 19:36:37 1.13.2.1
+++ ApplicationMetaData.java 2001/04/18 06:04:28 1.13.2.2
@@ -18,8 +18,8 @@
import org.w3c.dom.NodeList;
import org.jboss.ejb.DeploymentException;
+import org.jboss.logging.Logger;
-
/**
* <description>
*
@@ -27,7 +27,8 @@
* @see <related>
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
* @author Peter Antman ([EMAIL PROTECTED])
- * @version $Revision: 1.13.2.1 $
+ * @author [EMAIL PROTECTED]
+ * @version $Revision: 1.13.2.2 $
*/
public class ApplicationMetaData extends MetaData {
// Constants -----------------------------------------------------
@@ -336,6 +337,19 @@
String url = getElementContent(getOptionalChild(resourceManager,
"res-url"));
+ // Check java:/ prefix behavior
+ String prop =
System.getProperty("org.jboss.metadata.ApplicationMetaData.assumeJavaPrefix", "true");
+ boolean assumeJavaPrefix = Boolean.valueOf(prop).booleanValue();
+ if( assumeJavaPrefix == true && jndi != null )
+ {
+ // Require that all value begin with java:/
+ if( jndi.startsWith("java:/") == false )
+ {
+ Logger.warning("res-jndi-name("+jndi+")does not start with
java:/ and assumeJavaPrefix is true");
+ jndi = "java:/" + jndi;
+ }
+ }
+
if (jndi != null && url == null) {
resources.put(resName, jndi);
} else if (jndi == null && url != null) {
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development