Author: jmesnil
Date: 2009-12-09 15:35:20 -0500 (Wed, 09 Dec 2009)
New Revision: 8653
Modified:
trunk/examples/jms/client-kickoff/src/org/hornetq/jms/example/ClientKickoffExample.java
trunk/examples/jms/jmx/src/org/hornetq/jms/example/JMXExample.java
trunk/examples/jms/message-counters/src/org/hornetq/jms/example/MessageCounterExample.java
Log:
added explicit cast to MBeanServerInvocationHandler.newProxyInstance() calls
* required for Java 5 compatibility
Modified:
trunk/examples/jms/client-kickoff/src/org/hornetq/jms/example/ClientKickoffExample.java
===================================================================
---
trunk/examples/jms/client-kickoff/src/org/hornetq/jms/example/ClientKickoffExample.java 2009-12-09
20:31:09 UTC (rev 8652)
+++
trunk/examples/jms/client-kickoff/src/org/hornetq/jms/example/ClientKickoffExample.java 2009-12-09
20:35:20 UTC (rev 8653)
@@ -78,7 +78,7 @@
ObjectName on = ObjectNameBuilder.DEFAULT.getHornetQServerObjectName();
JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMX_URL),
new HashMap<String, String>());
MBeanServerConnection mbsc = connector.getMBeanServerConnection();
- HornetQServerControl serverControl =
MBeanServerInvocationHandler.newProxyInstance(mbsc,
+ HornetQServerControl serverControl =
(HornetQServerControl)MBeanServerInvocationHandler.newProxyInstance(mbsc,
on,
HornetQServerControl.class,
false);
Modified: trunk/examples/jms/jmx/src/org/hornetq/jms/example/JMXExample.java
===================================================================
--- trunk/examples/jms/jmx/src/org/hornetq/jms/example/JMXExample.java 2009-12-09 20:31:09
UTC (rev 8652)
+++ trunk/examples/jms/jmx/src/org/hornetq/jms/example/JMXExample.java 2009-12-09 20:35:20
UTC (rev 8653)
@@ -90,7 +90,7 @@
MBeanServerConnection mbsc = connector.getMBeanServerConnection();
// Step 12. Create a JMSQueueControl proxy to manage the queue on the server
- JMSQueueControl queueControl =
MBeanServerInvocationHandler.newProxyInstance(mbsc,
+ JMSQueueControl queueControl =
(JMSQueueControl)MBeanServerInvocationHandler.newProxyInstance(mbsc,
on,
JMSQueueControl.class,
false);
Modified:
trunk/examples/jms/message-counters/src/org/hornetq/jms/example/MessageCounterExample.java
===================================================================
---
trunk/examples/jms/message-counters/src/org/hornetq/jms/example/MessageCounterExample.java 2009-12-09
20:31:09 UTC (rev 8652)
+++
trunk/examples/jms/message-counters/src/org/hornetq/jms/example/MessageCounterExample.java 2009-12-09
20:35:20 UTC (rev 8653)
@@ -84,7 +84,7 @@
ObjectName on =
ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queue.getQueueName());
JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMX_URL),
new HashMap());
MBeanServerConnection mbsc = connector.getMBeanServerConnection();
- JMSQueueControl queueControl =
MBeanServerInvocationHandler.newProxyInstance(mbsc,
+ JMSQueueControl queueControl =
(JMSQueueControl)MBeanServerInvocationHandler.newProxyInstance(mbsc,
on,
JMSQueueControl.class,
false);
Show replies by date