[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1453) ClientAOPStackLoader needs privileged block to get TCL

Anil Saldhana (JIRA) jira-events at lists.jboss.org
Fri Nov 14 13:45:46 EST 2008


    [ https://jira.jboss.org/jira/browse/JBMESSAGING-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12438506#action_12438506 ] 

Anil Saldhana commented on JBMESSAGING-1453:
--------------------------------------------

As you can the CtsBmpBean is trying to send a message.  Since you got the thread context CL in an unprivileged block, you are forcing CtsBmpBean to also be assigned getClassLoader permission.  Getting the TCL is not the concern of the test bean, it is a concern of ClientAOPStackLoader. Hence the getTCL block should go in a privileged block. The admin will assign permissions to the messaging jar.  But the user applications should not be assigned getClassLoader permission because messaging needs it.

> ClientAOPStackLoader needs privileged block to get TCL
> ------------------------------------------------------
>
>                 Key: JBMESSAGING-1453
>                 URL: https://jira.jboss.org/jira/browse/JBMESSAGING-1453
>             Project: JBoss Messaging
>          Issue Type: Sub-task
>            Reporter: Anil Saldhana
>            Assignee: Clebert Suconic
>
> ================================
> java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>         at java.security.AccessController.checkPermission(AccessController.java:427)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>         at java.lang.Thread.getContextClassLoader(Thread.java:1276)
>         at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:67)
>         at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
>         at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:101)
>         at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:95)
>         at org.jboss.test.cts.jms.MsgSender.init(MsgSender.java:62)
>         at org.jboss.test.cts.jms.MsgSender.sendMsg(MsgSender.java:94)
>         at org.jboss.test.cts.ejb.CtsBmpBean.sendMsg(CtsBmpBean.java:664)
>         at org.jboss.test.cts.ejb.CtsBmpBean.setEntityContext(CtsBmpBean.java:512)
> =====================================================
> You need a priv block in ClientAOPStackLoader where you get TCL

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list