User: chirino
Date: 01/07/15 19:51:44
Modified: src/main/org/jbossmq Connection.java ConnectionToken.java
GenericConnectionFactory.java Mutex.java
SpyConnection.java SpyConnectionConsumer.java
SpyConnectionFactory.java SpyMessage.java
SpyMessageConsumer.java SpyQueueSession.java
SpySession.java SpyTemporaryQueue.java
SpyTemporaryTopic.java SpyTopicSession.java
SpyXAConnection.java SpyXAConnectionFactory.java
SpyXAResourceManager.java Subscription.java
Removed: src/main/org/jbossmq Log.java
Log:
Moved the rest of JBossMQ over to log4j logging.
- The jbossmq-client.jar now includes a log4j.properties which sets up the logging
subsystems on the client side. To chanage the logging levels, just place your
log4j.properties in the classpath betfore the jbossmq-client.jar
Revision Changes Path
1.2 +23 -22 jbossmq/src/main/org/jbossmq/Connection.java
Index: Connection.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/Connection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Connection.java 2001/07/11 02:23:24 1.1
+++ Connection.java 2001/07/16 02:51:44 1.2
@@ -43,7 +43,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class Connection implements java.io.Serializable, javax.jms.Connection {
//////////////////////////////////////////////////////////////
@@ -97,7 +97,7 @@
if (clientID != null)
throw new IllegalStateException("The connection has already a
clientID");
- Log.log("SetClientID(" + clientID + ")");
+ cat.debug("SetClientID(" + clientID + ")");
try {
serverIL.checkID(cID);
@@ -139,7 +139,7 @@
return;
modeStop = false;
- Log.log("Starting connection,
ClientID="+connectionToken.getClientID());
+ cat.debug("Starting connection,
ClientID="+connectionToken.getClientID());
try {
serverIL.setEnabled(connectionToken, true);
@@ -158,7 +158,7 @@
return;
modeStop = true;
- Log.log("Stoping connection, ClientID="+connectionToken.getClientID());
+ cat.debug("Stoping connection,
ClientID="+connectionToken.getClientID());
try {
serverIL.setEnabled(connectionToken, false);
@@ -174,7 +174,7 @@
if (closed)
return;
- Log.log("Closing sessions, ClientID="+connectionToken.getClientID());
+ cat.debug("Closing sessions, ClientID="+connectionToken.getClientID());
//notify his sessions
synchronized (createdSessions) {
@@ -184,9 +184,9 @@
}
}
- Log.log("Closed sessions");
+ cat.debug("Closed sessions");
- Log.log("Disconnecting from server");
+ cat.debug("Disconnecting from server");
//Notify the JMSServer that I am closing
try {
serverIL.connectionClosing(connectionToken);
@@ -194,7 +194,7 @@
throw new SpyJMSException("Cannot close properly the
connection", e);
}
stopILService();
- Log.log("Disconnected from server");
+ cat.debug("Disconnected from server");
closeExecutor();
@@ -208,7 +208,7 @@
if (closed)
throw new IllegalStateException("The connection is closed");
- Log.log("SpyConnection: deleteDestination(dest=" + dest.toString() +
")");
+ cat.debug("SpyConnection: deleteDestination(dest=" + dest.toString() +
")");
try {
@@ -329,7 +329,7 @@
req.subscriptionId = subscriptionCounter++;
req.dc = connectionToken;
- Log.log("Connection: addConsumer(dest=" + req.destination.toString() +
")");
+ cat.debug("Connection: addConsumer(dest=" + req.destination.toString()
+ ")");
try {
@@ -411,7 +411,7 @@
Subscription req = consumer.getSubscription();
- Log.log("Connection: removeSession(dest=" + req.destination + ")");
+ cat.debug("Connection: removeSession(dest=" + req.destination + ")");
try {
@@ -474,14 +474,14 @@
if( spyConnectionCounter == 0 ) {
((PooledExecutor)execeutor).shutdownAfterProcessingCurrentlyQueuedTasks();
execeutor = null;
- Log.log("Shutdown the Client Thread Pool");
+ cat.debug("Shutdown the Client Thread Pool");
}
}
synchronized private void openExecutor() {
if (spyConnectionCounter == 0) {
- Log.log("Starting the the Client Thread Pool");
+ cat.debug("Starting the the Client Thread Pool");
// Using a bounded buffer of 10 tasks, at least 4 threads (started only
// when needed due to incoming requests), but allowing
@@ -512,6 +512,7 @@
// The object that sets up the client IL
protected ClientILService clientILService ;
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(Connection.class);
//////////////////////////////////////////////////////////////
// Constructors
@@ -519,7 +520,7 @@
Connection(String userName, String password, GenericConnectionFactory
genericConnectionFactory) throws JMSException {
- Log.log("Connection Initializing");
+ cat.debug("Connection Initializing");
//Set the attributes
createdSessions = new HashSet();
@@ -529,11 +530,11 @@
modeStop = true;
// Connect to the server
- Log.log("Getting the serverIL");
+ cat.debug("Getting the serverIL");
this.genericConnectionFactory = genericConnectionFactory;
serverIL = genericConnectionFactory.createServerIL();
- Log.log("Authenticating");
+ cat.debug("Authenticating");
// Authenticate with the server
if( userName != null )
askForAnID( userName, password );
@@ -542,7 +543,7 @@
// Setup the ClientIL service so that the Server can
// push messages to us
- Log.log("Starting the clientIL service");
+ cat.debug("Starting the clientIL service");
startILService();
// Setup the XA Resource manager,
@@ -550,7 +551,7 @@
// Initialize the thread pool
openExecutor();
- Log.log("Connection establishment successful");
+ cat.debug("Connection establishment successful");
}
@@ -597,7 +598,7 @@
SpyConsumer consumer =
(SpyConsumer)subscriptions.get( requests[i].subscriptionId );
if( consumer == null ) {
send(
requests[i].message.getAcknowledgementRequest(false) );
- Log.log("WARNING: NACK issued due to
non existent subscription");
+ cat.debug("WARNING: NACK issued due to
non existent subscription");
continue;
}
@@ -610,7 +611,7 @@
LinkedList ll =
(LinkedList)destinationSubscriptions.get( requests[i].message.getJMSDestination() );
if( ll == null ) {
- Log.log("WARNING: Received message but
had no subscribers for it");
+ cat.debug("WARNING: Received message
but had no subscribers for it");
continue;
}
@@ -641,13 +642,13 @@
JMSException excep = new JMSException(reason);
excep.setLinkedException(e);
- Log.log(e);
+ cat.debug(e);
if (exceptionListener != null) {
synchronized (exceptionListener) {
exceptionListener.onException(excep);
}
} else {
- Log.error(excep);
+ cat.warn("JBossMQ Connection failure: ", excep);
}
}
@@ -669,7 +670,7 @@
serverIL.setConnectionToken(connectionToken);
} catch (Exception e) {
- Log.log(e);
+ cat.debug(e);
throw new SpyJMSException("Cannot start a the client IL
service", e);
}
}
1.2 +0 -0 jbossmq/src/main/org/jbossmq/ConnectionToken.java
Index: ConnectionToken.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/ConnectionToken.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConnectionToken.java 2001/07/11 02:23:24 1.1
+++ ConnectionToken.java 2001/07/16 02:51:44 1.2
@@ -23,7 +23,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class ConnectionToken
implements Serializable
1.2 +3 -1 jbossmq/src/main/org/jbossmq/GenericConnectionFactory.java
Index: GenericConnectionFactory.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/GenericConnectionFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GenericConnectionFactory.java 2001/07/11 02:23:24 1.1
+++ GenericConnectionFactory.java 2001/07/16 02:51:44 1.2
@@ -19,7 +19,7 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class GenericConnectionFactory implements java.io.Serializable {
@@ -85,8 +85,10 @@
return server.cloneServerIL();
} catch (Exception e) {
- Log.log(e);
+ cat.debug(e);
throw new SpyJMSException("Could not connect to the server",
e);
}
}
+
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(GenericConnectionFactory.class);
}
1.4 +0 -0 jbossmq/src/main/org/jbossmq/Mutex.java
Index: Mutex.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/Mutex.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Mutex.java 2001/07/11 02:23:24 1.3
+++ Mutex.java 2001/07/16 02:51:44 1.4
@@ -45,7 +45,7 @@
/**
* @author Norbert Lataille ([EMAIL PROTECTED])
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class Mutex
{
1.12 +0 -0 jbossmq/src/main/org/jbossmq/SpyConnection.java
Index: SpyConnection.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyConnection.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SpyConnection.java 2001/07/11 02:23:24 1.11
+++ SpyConnection.java 2001/07/16 02:51:44 1.12
@@ -32,7 +32,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
*/
public class SpyConnection
extends Connection
1.4 +6 -4 jbossmq/src/main/org/jbossmq/SpyConnectionConsumer.java
Index: SpyConnectionConsumer.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyConnectionConsumer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SpyConnectionConsumer.java 2001/07/11 02:23:24 1.3
+++ SpyConnectionConsumer.java 2001/07/16 02:51:44 1.4
@@ -19,7 +19,7 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class SpyConnectionConsumer implements javax.jms.ConnectionConsumer,
SpyConsumer {
@@ -41,7 +41,7 @@
public void addMessage(SpyMessage mes) throws JMSException {
- Log.log(""+this+"->addMessage(mes="+mes+")");
+ cat.debug(""+this+"->addMessage(mes="+mes+")");
queue.addLast(mes);
}
@@ -66,7 +66,7 @@
public void processMessages() throws JMSException {
- Log.log(""+this+"->processMessages()");
+ cat.debug(""+this+"->processMessages()");
synchronized (queue) {
Iterator iter = queue.iterator();
@@ -78,14 +78,14 @@
SpySession spySession = (SpySession)
serverSession.getSession();
if (spySession.sessionConsumer == null) {
- Log.log(""+this+" Session did not have a set
MessageListner");
+ cat.debug(""+this+" Session did not have a set
MessageListner");
throw new JMSException("Session did not have a
set MessageListner");
}
spySession.sessionConsumer.addMessage(message);
spySession.sessionConsumer.subscription = subscription;
- Log.log(""+this+" Starting the ServerSession.");
+ cat.debug(""+this+" Starting the ServerSession.");
serverSession.start();
}
@@ -102,6 +102,8 @@
}
+
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(SpyConnectionConsumer.class);
/**
* SpyConnectionConsumer constructor comment.
1.2 +8 -16 jbossmq/src/main/org/jbossmq/SpyConnectionFactory.java
Index: SpyConnectionFactory.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyConnectionFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SpyConnectionFactory.java 2001/07/11 02:23:24 1.1
+++ SpyConnectionFactory.java 2001/07/16 02:51:44 1.2
@@ -20,10 +20,10 @@
import java.io.Serializable;
import java.util.Properties;
-import org.jbossmq.Log;
+
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueConnection;
@@ -33,7 +33,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class SpyConnectionFactory
implements Serializable, TopicConnectionFactory, QueueConnectionFactory,
Referenceable {
@@ -52,8 +52,7 @@
} catch (JMSException e) {
throw e;
} catch (Exception e) {
- failureHandler(e,"createQueueConnection has failed !");
- return null;
+ throw new SpyJMSException("createQueueConnection has failed
!",e);
}
}
@@ -66,8 +65,7 @@
} catch (JMSException e) {
throw e;
} catch (Exception e) {
- failureHandler(e,"createQueueConnection has failed !");
- return null;
+ throw new SpyJMSException("createQueueConnection has failed
!",e);
}
}
@@ -81,14 +79,10 @@
new org.jbossmq.referenceable.ObjectRefAddr("DCF", factory),
"org.jbossmq.referenceable.SpyConnectionFactoryObjectFactory",
null);
}
-
- // Private ------------------------------------------------------
- private void failureHandler(Exception e,String reason) throws JMSException
- {
- Log.error(e);
- throw new JMSException(reason);
- }
+
+
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(SpyConnectionFactory.class);
// Constructor ---------------------------------------------------
@@ -106,8 +100,7 @@
} catch (JMSException e) {
throw e;
} catch (Exception e) {
- failureHandler(e,"createQueueConnection has failed !");
- return null;
+ throw new SpyJMSException("createQueueConnection has failed
!",e);
}
}
@@ -120,8 +113,7 @@
} catch (JMSException e) {
throw e;
} catch (Exception e) {
- failureHandler(e,"createQueueConnection has failed !");
- return null;
+ throw new SpyJMSException("createQueueConnection has failed
!",e);
}
}
}
1.7 +0 -0 jbossmq/src/main/org/jbossmq/SpyMessage.java
Index: SpyMessage.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyMessage.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SpyMessage.java 2001/07/11 02:23:24 1.6
+++ SpyMessage.java 2001/07/16 02:51:44 1.7
@@ -23,7 +23,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class SpyMessage
implements Serializable, Cloneable, Message, Comparable
1.7 +9 -7 jbossmq/src/main/org/jbossmq/SpyMessageConsumer.java
Index: SpyMessageConsumer.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyMessageConsumer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SpyMessageConsumer.java 2001/07/11 02:23:24 1.6
+++ SpyMessageConsumer.java 2001/07/16 02:51:44 1.7
@@ -26,7 +26,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class SpyMessageConsumer implements MessageConsumer, SpyConsumer {
@@ -101,9 +101,9 @@
if (mes != null)
return mes;
} else
- Log.notice("the connection is stopped
!");
+ cat.debug("the connection is stopped
!");
- Log.log("SpyMessageConsumer: receive in
messages.wait()");
+ cat.debug("SpyMessageConsumer: receive in
messages.wait()");
messages.wait();
}
} catch (InterruptedException e) {
@@ -149,7 +149,7 @@
}
} else
- Log.log("the connection is stopped !");
+ cat.debug("the connection is stopped
!");
long att = endTime -
System.currentTimeMillis();
if (att <= 0) {
@@ -225,7 +225,7 @@
if( closed ) {
if( mes.shouldAck ) {
- Log.log("WARNING: NACK issued. The message
consumer was closed.");
+ cat.debug("WARNING: NACK issued. The message
consumer was closed.");
session.connection.send(
mes.getAcknowledgementRequest(false) );
}
return;
@@ -236,7 +236,7 @@
messages.addLast(mes);
} else {
if( mes.shouldAck ) {
- Log.log("WARNING: NACK issued. The
subscription did not accept the message");
+ cat.debug("WARNING: NACK issued. The
subscription did not accept the message");
session.connection.send(
mes.getAcknowledgementRequest(false) );
}
}
@@ -257,7 +257,7 @@
Message mes = getMessage();
while (mes != null ) {
- Log.log("Got unrequested message, sending NACK
for: " + mes);
+ cat.debug("Got unrequested message, sending
NACK for: " + mes);
AcknowledgementRequest item = new
AcknowledgementRequest();
item.destination = mes.getJMSDestination();
item.messageID = mes.getJMSMessageID();
@@ -367,7 +367,7 @@
// Has the message expired?
if (message.isOutdated()) {
- Log.notice("SessionQueue: I dropped a message (timeout)");
+ cat.debug("SessionQueue: I dropped a message (timeout)");
if ( message.shouldAck )
message.doAcknowledge();
return null;
@@ -390,4 +390,6 @@
return message;
}
}
+
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(SpyMessageConsumer.class);
}
1.4 +0 -0 jbossmq/src/main/org/jbossmq/SpyQueueSession.java
Index: SpyQueueSession.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyQueueSession.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SpyQueueSession.java 2001/07/11 02:23:24 1.3
+++ SpyQueueSession.java 2001/07/16 02:51:44 1.4
@@ -29,7 +29,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class SpyQueueSession
extends SpySession
1.6 +9 -7 jbossmq/src/main/org/jbossmq/SpySession.java
Index: SpySession.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpySession.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SpySession.java 2001/07/11 02:23:24 1.5
+++ SpySession.java 2001/07/16 02:51:44 1.6
@@ -34,7 +34,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
abstract public class SpySession
implements Runnable, Session, XASession
@@ -167,7 +167,7 @@
{
synchronized (runLock) {
- Log.log("SpySession: run()");
+ cat.debug("SpySession: run()");
boolean done=false;
while (!done) {
@@ -203,8 +203,8 @@
}
} catch (JMSException e) {
- Log.log("Cannot receive a message from the
provider...");
- Log.error(e);
+ cat.debug("Cannot receive a message from the
provider...");
+ cat.error(e);
}
}
@@ -251,7 +251,7 @@
if (closed) throw new IllegalStateException("The session is closed");
if (!transacted) throw new IllegalStateException("The session is not
transacted");
- Log.log("Session: commit()");
+ cat.debug("Session: commit()");
//Don't deliver any more messages while commiting
synchronized (runLock) {
@@ -279,7 +279,7 @@
if (closed) throw new IllegalStateException("The session is closed");
if (!transacted) throw new IllegalStateException("The session is not
transacted");
- Log.log("Session: rollback()");
+ cat.debug("Session: rollback()");
// Stop message delivery
synchronized (runLock) {
@@ -304,7 +304,7 @@
if (closed) throw new IllegalStateException("The session is closed");
if (transacted) throw new IllegalStateException("The session is
transacted");
- Log.log("Session: recover()");
+ cat.debug("Session: recover()");
rollback();
@@ -313,7 +313,7 @@
public void deleteTemporaryDestination(SpyDestination dest) throws JMSException
{
- Log.log("SpySession: deleteDestination(dest="+dest.toString()+")");
+ cat.debug("SpySession: deleteDestination(dest="+dest.toString()+")");
synchronized (consumers) {
HashSet newMap=(HashSet)consumers.clone();
@@ -396,6 +396,8 @@
message.producerClientId = connection.getClientID();
return message;
}
+
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(SpySession.class);
// Constructor ---------------------------------------------------
1.4 +3 -2 jbossmq/src/main/org/jbossmq/SpyTemporaryQueue.java
Index: SpyTemporaryQueue.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyTemporaryQueue.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SpyTemporaryQueue.java 2001/07/11 02:23:24 1.3
+++ SpyTemporaryQueue.java 2001/07/16 02:51:44 1.4
@@ -15,7 +15,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class SpyTemporaryQueue
extends SpyQueue
@@ -34,11 +34,12 @@
try {
dc.clientIL.deleteTemporaryDestination(this);
} catch (Exception e) {
- Log.error(e);
- throw new JMSException("Cannot delete the TemporaryQueue");
+ throw new SpyJMSException("Cannot delete the TemporaryQueue",
e);
}
}
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(SpyTemporaryQueue.class);
+
// Constructor ---------------------------------------------------
public SpyTemporaryQueue(String queueName,ConnectionToken dc_)
1.4 +3 -2 jbossmq/src/main/org/jbossmq/SpyTemporaryTopic.java
Index: SpyTemporaryTopic.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyTemporaryTopic.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SpyTemporaryTopic.java 2001/07/11 02:23:24 1.3
+++ SpyTemporaryTopic.java 2001/07/16 02:51:44 1.4
@@ -15,7 +15,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class SpyTemporaryTopic
extends SpyTopic
@@ -34,10 +34,11 @@
try {
dc.clientIL.deleteTemporaryDestination(this);
} catch (Exception e) {
- Log.error(e);
- throw new JMSException("Cannot delete the TemporaryTopic");
+ throw new SpyJMSException("Cannot delete the
TemporaryTopic",e);
}
}
+
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(SpyTemporaryTopic.class);
// Constructor ---------------------------------------------------
1.4 +1 -1 jbossmq/src/main/org/jbossmq/SpyTopicSession.java
Index: SpyTopicSession.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyTopicSession.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SpyTopicSession.java 2001/07/11 02:23:24 1.3
+++ SpyTopicSession.java 2001/07/16 02:51:44 1.4
@@ -27,7 +27,7 @@
-import org.jbossmq.Log;
+
import org.jbossmq.selectors.Selector;
/**
@@ -36,7 +36,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class SpyTopicSession
extends SpySession
1.2 +0 -0 jbossmq/src/main/org/jbossmq/SpyXAConnection.java
Index: SpyXAConnection.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyXAConnection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SpyXAConnection.java 2001/07/11 02:23:24 1.1
+++ SpyXAConnection.java 2001/07/16 02:51:44 1.2
@@ -27,7 +27,7 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class SpyXAConnection
extends SpyConnection
1.2 +8 -16 jbossmq/src/main/org/jbossmq/SpyXAConnectionFactory.java
Index: SpyXAConnectionFactory.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyXAConnectionFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SpyXAConnectionFactory.java 2001/07/11 02:23:24 1.1
+++ SpyXAConnectionFactory.java 2001/07/16 02:51:44 1.2
@@ -21,10 +21,10 @@
import java.io.Serializable;
import java.util.Properties;
-import org.jbossmq.Log;
+
import javax.jms.TopicConnectionFactory;
import javax.jms.XATopicConnectionFactory;
import javax.jms.XATopicConnection;
@@ -35,7 +35,7 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class SpyXAConnectionFactory
implements Serializable, XATopicConnectionFactory, XAQueueConnectionFactory,
Referenceable {
@@ -57,13 +57,7 @@
return createXAQueueConnection(userName, password);
}
- //private
-
- private void failureHandler(Exception e,String reason) throws JMSException
- {
- Log.error(e);
- throw new JMSException(reason);
- }
+
/**
* createXAQueueConnection method comment.
@@ -74,8 +68,7 @@
} catch (JMSException e) {
throw e;
} catch (Exception e) {
- failureHandler(e,"createQueueConnection has failed !");
- return null;
+ throw new SpyJMSException("createQueueConnection has failed
!",e);
}
}
@@ -90,8 +83,7 @@
} catch (JMSException e) {
throw e;
} catch (Exception e) {
- failureHandler(e,"createQueueConnection has failed !");
- return null;
+ throw new SpyJMSException("createQueueConnection has failed
!",e);
}
}
@@ -106,6 +98,8 @@
"org.jbossmq.referenceable.SpyConnectionFactoryObjectFactory",
null);
}
+ static org.apache.log4j.Category cat =
org.apache.log4j.Category.getInstance(SpyXAConnectionFactory.class);
+
// Constructor ---------------------------------------------------
public SpyXAConnectionFactory( GenericConnectionFactory factory)
@@ -132,8 +126,7 @@
} catch (JMSException e) {
throw e;
} catch (Exception e) {
- failureHandler(e,"createQueueConnection has failed !");
- return null;
+ throw new SpyJMSException("createQueueConnection has failed
!",e);
}
}
@@ -145,8 +138,7 @@
} catch (JMSException e) {
throw e;
} catch (Exception e) {
- failureHandler(e,"createQueueConnection has failed !");
- return null;
+ throw new SpyJMSException("createQueueConnection has failed
!",e);
}
}
}
1.7 +0 -0 jbossmq/src/main/org/jbossmq/SpyXAResourceManager.java
Index: SpyXAResourceManager.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/SpyXAResourceManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SpyXAResourceManager.java 2001/07/11 02:23:24 1.6
+++ SpyXAResourceManager.java 2001/07/16 02:51:44 1.7
@@ -20,7 +20,7 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class SpyXAResourceManager implements java.io.Serializable {
1.4 +0 -0 jbossmq/src/main/org/jbossmq/Subscription.java
Index: Subscription.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jbossmq/Subscription.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Subscription.java 2001/07/11 02:23:24 1.3
+++ Subscription.java 2001/07/16 02:51:44 1.4
@@ -18,7 +18,7 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class Subscription
implements Serializable
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development