[jbpm-commits] JBoss JBPM SVN: r3340 - in jbpm3/trunk/modules: integration and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Dec 11 10:12:24 EST 2008


Author: thomas.diesler at jboss.com
Date: 2008-12-11 10:12:23 -0500 (Thu, 11 Dec 2008)
New Revision: 3340

Modified:
   jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java
   jbpm3/trunk/modules/integration/deploy.sh
Log:
Harcoded references should use the global JNDI names

Modified: jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java	2008-12-11 13:48:36 UTC (rev 3339)
+++ jbpm3/trunk/modules/enterprise/src/main/java/org/jbpm/msg/jms/JmsMessageServiceFactory.java	2008-12-11 15:12:23 UTC (rev 3340)
@@ -54,80 +54,100 @@
  * @author Tom Baeyens
  * @author Alejandro Guizar
  */
-public class JmsMessageServiceFactory implements ServiceFactory {
+public class JmsMessageServiceFactory implements ServiceFactory
+{
+  private static final long serialVersionUID = 1L;
 
-  private static final long serialVersionUID = 1L;
-  
-  String connectionFactoryJndiName = "java:comp/env/jms/JbpmConnectionFactory";
-  String destinationJndiName = "java:comp/env/jms/JobQueue";
-  String commandDestinationJndiName = "java:comp/env/jms/CommandQueue";
+  String connectionFactoryJndiName = "java:JmsXA";
+  String destinationJndiName = "java:queue/JbpmJobQueue";
+  String commandDestinationJndiName = "java:queue/JbpmCommandQueue";
   boolean isCommitEnabled = false;
 
   private ConnectionFactory connectionFactory;
   private Destination destination;
   private Destination commandDestination;
 
-  public ConnectionFactory getConnectionFactory() {
-    if (connectionFactory == null) {
-      try {
-        connectionFactory = (ConnectionFactory) lookup(connectionFactoryJndiName);
+  public ConnectionFactory getConnectionFactory()
+  {
+    if (connectionFactory == null)
+    {
+      try
+      {
+        connectionFactory = (ConnectionFactory)lookup(connectionFactoryJndiName);
       }
-      catch (NamingException e) {
+      catch (NamingException e)
+      {
         throw new JbpmException("could not retrieve message connection factory", e);
       }
     }
     return connectionFactory;
   }
 
-  public Destination getDestination() {
-    if (destination == null) {
-      try {
-        destination = (Destination) lookup(destinationJndiName);
+  public Destination getDestination()
+  {
+    if (destination == null)
+    {
+      try
+      {
+        destination = (Destination)lookup(destinationJndiName);
       }
-      catch (NamingException e) {
+      catch (NamingException e)
+      {
         throw new JbpmException("could not retrieve job destination", e);
       }
     }
     return destination;
   }
 
-  public Destination getCommandDestination() {
-    if (commandDestination == null) {
-      try {
-        commandDestination = (Destination) lookup(commandDestinationJndiName);
+  public Destination getCommandDestination()
+  {
+    if (commandDestination == null)
+    {
+      try
+      {
+        commandDestination = (Destination)lookup(commandDestinationJndiName);
       }
-      catch (NamingException e) {
+      catch (NamingException e)
+      {
         throw new JbpmException("could not retrieve command destination", e);
       }
     }
     return commandDestination;
   }
 
-  public boolean isCommitEnabled() {
+  public boolean isCommitEnabled()
+  {
     return isCommitEnabled;
   }
 
-  private static Object lookup(String name) throws NamingException {
+  private static Object lookup(String name) throws NamingException
+  {
     Context initial = new InitialContext();
-    try {
+    try
+    {
       return initial.lookup(name);
     }
-    finally {
+    finally
+    {
       initial.close();
     }
   }
 
-  public Service openService() {
-    try {
+  public Service openService()
+  {
+    try
+    {
       Connection connection = getConnectionFactory().createConnection();
       return new JmsMessageService(connection, getDestination(), isCommitEnabled);
-    } 
-    catch (JMSException e) {
+    }
+    catch (JMSException e)
+    {
       throw new JbpmException("couldn't open message session", e);
-    }    
+    }
   }
 
-  public void close() {
+  public void close()
+  {
     connectionFactory = null;
     destination = null;
     commandDestination = null;

Modified: jbpm3/trunk/modules/integration/deploy.sh
===================================================================
--- jbpm3/trunk/modules/integration/deploy.sh	2008-12-11 13:48:36 UTC (rev 3339)
+++ jbpm3/trunk/modules/integration/deploy.sh	2008-12-11 15:12:23 UTC (rev 3340)
@@ -3,4 +3,4 @@
 mvn -o install
 
 rm $JBOSS422/server/default/deploy/jbpm/jbpm-integration.beans/jbpm-integration-spec*.jar
-cp target/bpm-spec-integration-jbpm3-3.3.1-SNAPSHOT.jar $JBOSS422/server/default/deploy/jbpm/jbpm-integration.beans
+cp target/jbpm-integration-spec-3.3.1-SNAPSHOT.jar $JBOSS422/server/default/deploy/jbpm/jbpm-integration.beans




More information about the jbpm-commits mailing list