-
1. Re: Getting the Security-Domain
adrian.brock Feb 24, 2004 6:14 AM (in response to anbenham)URL url = Thread.currentThread().getContextClassLoader().findResource("META-INF/jboss.xml");
and parse the xml yourself?
Regards,
Adrian -
2. Re: Getting the Security-Domain
anbenham Feb 24, 2004 6:19 AM (in response to anbenham)Hi,
it´s not really a smart way. Thanx anyway.
Is it possible to get the instance of the securitymanager.
it has a mthod named getSecurityDomain?
Yours
anis -
3. Re: Getting the Security-Domain
adrian.brock Feb 24, 2004 6:26 AM (in response to anbenham)Yes, through JMX.
You can also look it up in jndi
java:/jaas/MySecurityDomain
Regards,
Adrian -
4. Re: Getting the Security-Domain
adrian.brock Feb 24, 2004 6:30 AM (in response to anbenham)You could just add the security domain as an env-entry
if you make sure the two configurations are in sink.
Regards,
Adrian -
5. Re: Getting the Security-Domain
juha Feb 24, 2004 6:31 AM (in response to anbenham)IIRC, the container MBean exposes accessor to the BeanMetaData, might be less work to get it through JMX.
Of course, "application" could mean any component in J2EE framework. I don't know if there's an association from the thread to the security manager directly. -
6. Re: Getting the Security-Domain
adrian.brock Feb 24, 2004 6:39 AM (in response to anbenham)It is not exposed by the Container MBean, but you can get the Container
object from the MBeanRegistry.
It is done in this testcase:
http://cvs.sourceforge.net/viewcvs.py/jboss/jbosstest/src/main/org/jboss/test/cmp2/commerce/LimitOffsetTest.java?rev=1.3&view=auto
Regards,
Adrian