User: starksm
Date: 01/06/12 21:42:42
Modified: src/main/org/jboss/ejb Container.java
Log:
Add a link from java:comp/env/security/security-domain to the configured
security domain if one exists
Revision Changes Path
1.44 +14 -4 jboss/src/main/org/jboss/ejb/Container.java
Index: Container.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/Container.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- Container.java 2001/06/10 20:50:31 1.43
+++ Container.java 2001/06/13 04:42:42 1.44
@@ -73,7 +73,7 @@
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
* @author [EMAIL PROTECTED]
- * @version $Revision: 1.43 $
+ * @version $Revision: 1.44 $
*/
public abstract class Container
{
@@ -418,7 +418,6 @@
// Since the BCL is already associated with this thread we can start using
the java: namespace directly
Context ctx = (Context) new InitialContext().lookup("java:comp");
Context envCtx = ctx.createSubcontext("env");
- Logger.debug("java:comp/env: "+envCtx);
// Bind environment properties
{
@@ -589,6 +588,19 @@
}
}
+ /* Create a java:comp/env/security/security-domain link to the container
+ or application security-domain if one exists so that access to the
+ security manager can be made without knowing the global jndi name.
+ */
+ String securityDomain =
metaData.getContainerConfiguration().getSecurityDomain();
+ if( securityDomain == null )
+ securityDomain = metaData.getApplicationMetaData().getSecurityDomain();
+ if( securityDomain != null )
+ {
+ Logger.debug("Binding securityDomain: "+securityDomain+ " to JDNI ENC
as: security-domain");
+ bind(envCtx, "security-domain", new LinkRef(securityDomain));
+ }
+
Logger.debug("End java:comp/env for EJB: "+beanMetaData.getEjbName());
} catch (NamingException e)
{
@@ -597,9 +609,7 @@
throw new DeploymentException("Could not set up environment", e);
}
-
}
-
/**
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development