mx4j/src/core/javax/management/remote/rmi RMIServerImpl.java,1.11,1.12

Simone Bordet <[email protected]>
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/core/javax/management/remote/rmi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11003/src/core/javax/management/remote/rmi

Modified Files:
	RMIServerImpl.java 
Log Message:
Avoid creating the connection inside a Subject.doAs(): it is probably not needed

Index: RMIServerImpl.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/remote/rmi/RMIServerImpl.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** RMIServerImpl.java	1 Mar 2004 18:08:53 -0000	1.11
--- RMIServerImpl.java	27 Aug 2004 22:24:49 -0000	1.12
***************
*** 12,23 ****
  import java.lang.ref.WeakReference;
  import java.rmi.Remote;
  import java.util.HashMap;
  import java.util.Iterator;
  import java.util.Map;
- import java.security.PrivilegedExceptionAction;
- import java.security.AccessController;
- import java.security.AccessControlContext;
- import java.security.PrivilegedAction;
- 
  import javax.management.MBeanServer;
  import javax.management.remote.JMXAuthenticator;
--- 12,21 ----
  import java.lang.ref.WeakReference;
  import java.rmi.Remote;
+ import java.security.AccessControlContext;
+ import java.security.AccessController;
+ import java.security.PrivilegedAction;
  import java.util.HashMap;
  import java.util.Iterator;
  import java.util.Map;
  import javax.management.MBeanServer;
  import javax.management.remote.JMXAuthenticator;
***************
*** 98,109 ****
        try
        {
!          // The authenticated subject must have the permission to create a new client connection
!          RMIConnection client = (RMIConnection)MX4JRemoteUtils.subjectInvoke(subject, null, getContext(), new PrivilegedExceptionAction()
!          {
!             public Object run() throws IOException
!             {
!                return makeClient(connectionId, subject);
!             }
!          });
  
           WeakReference weak = new WeakReference(client);
--- 96,100 ----
        try
        {
!          RMIConnection client = makeClient(connectionId, subject);
  
           WeakReference weak = new WeakReference(client);



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.