mx4j/src/tools/mx4j/tools/remote/soap SOAPConnection.java,1.3,1.4 ServerSOAPConnection.java,1.4,1.5 ServerInvoker.java,1.5,1.6
[email protected] Tue, 02 Mar 2004 06:01:36 -0800
Newsgroups
gmane.comp.java.mx4j.cvs
Message-ID
<[email protected] >
Update of /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/soap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32118/tools/mx4j/tools/remote/soap
Modified Files:
SOAPConnection.java ServerSOAPConnection.java
ServerInvoker.java
Log Message:
Implemented the semantic of cancellation of listeners in case of JMXConnector.close()
Index: SOAPConnection.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/soap/SOAPConnection.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SOAPConnection.java 28 Sep 2003 12:08:31 -0000 1.3
--- SOAPConnection.java 2 Mar 2004 14:01:34 -0000 1.4
***************
*** 38,41 ****
--- 38,43 ----
public String connect(Object credentials) throws IOException, SecurityException;
+ public void close() throws IOException;
+
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature, Subject delegate)
throws ReflectionException,
Index: ServerSOAPConnection.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/soap/ServerSOAPConnection.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ServerSOAPConnection.java 28 Sep 2003 12:08:31 -0000 1.4
--- ServerSOAPConnection.java 2 Mar 2004 14:01:34 -0000 1.5
***************
*** 11,15 ****
import java.io.IOException;
import java.util.Set;
-
import javax.management.Attribute;
import javax.management.AttributeList;
--- 11,14 ----
***************
*** 30,34 ****
import javax.security.auth.Subject;
! import mx4j.tools.remote.Connection;
/**
--- 29,33 ----
import javax.security.auth.Subject;
! import mx4j.tools.remote.AbstractConnection;
/**
***************
*** 36,49 ****
* @version $Revision$
*/
! class ServerSOAPConnection implements Connection, SOAPConnection
{
- private String connectionId;
- private SOAPConnectionManager connectionManager;
private final SOAPConnection target;
ServerSOAPConnection(String connectionId, SOAPConnectionManager manager, SOAPConnection target)
{
! this.connectionId = connectionId;
! this.connectionManager = manager;
this.target = target;
}
--- 35,45 ----
* @version $Revision$
*/
! class ServerSOAPConnection extends AbstractConnection implements SOAPConnection
{
private final SOAPConnection target;
ServerSOAPConnection(String connectionId, SOAPConnectionManager manager, SOAPConnection target)
{
! super(connectionId, manager);
this.target = target;
}
***************
*** 56,65 ****
public void close() throws IOException
{
! connectionManager.closeConnection(this);
! }
!
! public String getConnectionId() throws IOException
! {
! return connectionId;
}
--- 52,57 ----
public void close() throws IOException
{
! target.close();
! super.close();
}
Index: ServerInvoker.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/soap/ServerInvoker.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ServerInvoker.java 24 Feb 2004 14:47:39 -0000 1.5
--- ServerInvoker.java 2 Mar 2004 14:01:34 -0000 1.6
***************
*** 61,64 ****
--- 61,83 ----
}
+ public void close() throws IOException
+ {
+ NotificationTuple[] tuples = notificationHandler.close();
+ for (int i = 0; i < tuples.length; ++i)
+ {
+ NotificationTuple tuple = tuples[i];
+ try
+ {
+ server.removeNotificationListener(tuple.getObjectName(), tuple.getNotificationListener(), tuple.getNotificationFilter(), tuple.getHandback());
+ }
+ catch (InstanceNotFoundException ignored)
+ {
+ }
+ catch (ListenerNotFoundException ignored)
+ {
+ }
+ }
+ }
+
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature, Subject delegate)
throws ReflectionException,
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click