|
From: <jbo...@li...> - 2006-06-18 16:41:29
|
Author: unibrew
Date: 2006-06-18 12:41:26 -0400 (Sun, 18 Jun 2006)
New Revision: 4775
Modified:
labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/DownloadCountersDB.java
Log:
Replacing MDB executions with SSB.
Modified: labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/DownloadCountersDB.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/DownloadCountersDB.java 2006-06-16 13:51:01 UTC (rev 4774)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/DownloadCountersDB.java 2006-06-18 16:41:26 UTC (rev 4775)
@@ -123,32 +123,36 @@
downloadCounters.get(link).increment();
try
{
- //CountersServiceInterface countersService =
- // (CountersServiceInterface) ctx.lookup(CountersServiceInterface.jndiName);
- //countersService.incrementCounter(link);
+ CountersServiceInterface countersService =
+ (CountersServiceInterface) ctx.lookup(CountersServiceInterface.jndiName);
+ countersService.incrementCounter(link);
+ // MDB CODE COMMENTED OUT BECAUSE OF MDB ISSUES
// This code sends message to counters' MDB with message
// containing filepath of which counter has to be increased
- QueueSession sess = null;
- Queue queue = null;
- queue = (Queue) ctx.lookup("queue/jblab_counters");
- QueueConnectionFactory factory =
- (QueueConnectionFactory) ctx.lookup("java:/ConnectionFactory");
- sess =factory.createQueueConnection().createQueueSession(false,
- QueueSession.AUTO_ACKNOWLEDGE);
- if (sess != null)
- {
- TextMessage msg = sess.createTextMessage(link);
- sess.createSender(queue).send(msg);
- }
+ //QueueSession sess = null;
+ //Queue queue = null;
+ //queue = (Queue) ctx.lookup("queue/jblab_counters");
+ //QueueConnectionFactory factory =
+ // (QueueConnectionFactory) ctx.lookup("java:/ConnectionFactory");
+ //sess =factory.createQueueConnection().createQueueSession(false,
+ // QueueSession.AUTO_ACKNOWLEDGE);
+ //if (sess != null)
+ //{
+ // TextMessage msg = sess.createTextMessage(link);
+ // sess.createSender(queue).send(msg);
+ //}
}
catch (NamingException e)
{
getLogger().error("CountersService was not found while incrementing counter.",e);
}
- catch (JMSException e)
- {
- getLogger().error("Problem while using JMS to send increment command to MDB.",e);
+ //catch (JMSException e)
+ //{
+ // getLogger().error("Problem while using JMS to send increment command to MDB.",e);
+ //}
+ catch (Exception e) {
+ getLogger().error("CountersService problem while incrementing counter.",e);
}
}
}
|