svn commit: r757069 [3/3] - in /ofbiz/trunk/framework/service/src/org/ofbiz/service: ./ calendar/ config/ eca/ engine/ group/ jms/ job/ mail/ rmi/ rmi/socket/ssl/ semaphore/ test/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r757069 [3/3] - in /ofbiz/trunk/framework/service/src/org/ofbiz/service: ./ calendar/ config/ eca/ engine/ group/ jms/ job/ mail/ rmi/ rmi/socket/ssl/ semaphore/ test/

doogie-3
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupEngine.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupEngine.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupEngine.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -49,14 +49,14 @@
         if (groupModel == null) {
             throw new GenericServiceException("GroupModel was null; not a valid ServiceGroup!");
         }
-        
+
         return groupModel.run(dispatcher, localName, context);
     }
 
     /**
      * @see org.ofbiz.service.engine.GenericEngine#runSyncIgnore(java.lang.String, org.ofbiz.service.ModelService, java.util.Map)
      */
-    public void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException {        
+    public void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException {
         runSync(localName, modelService, context);
     }
 }

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -37,12 +37,12 @@
  * ServiceGroupReader.java
  */
 public class ServiceGroupReader {
-    
+
     public static final String module = ServiceGroupReader.class.getName();
 
     // using a cache is dangerous here because if someone clears it the groups won't work at all: public static UtilCache groupsCache = new UtilCache("service.ServiceGroups", 0, 0, false);
     public static Map<String, GroupModel> groupsCache = FastMap.newInstance();
-    
+
     public static void readConfig() {
         Element rootElement = null;
 
@@ -62,8 +62,8 @@
         for (ComponentConfig.ServiceResourceInfo componentResourceInfo: ComponentConfig.getAllServiceResourceInfos("group")) {
             addGroupDefinitions(componentResourceInfo.createResourceHandler());
         }
-    }    
-    
+    }
+
     public static void addGroupDefinitions(ResourceHandler handler) {
         Element rootElement = null;
 
@@ -77,7 +77,7 @@
 
         for (Element group: UtilXml.childElementList(rootElement, "group")) {
             String groupName = group.getAttribute("name");
-            groupsCache.put(groupName, new GroupModel(group));        
+            groupsCache.put(groupName, new GroupModel(group));
             numDefs++;
         }
         if (Debug.importantOn()) {

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/AbstractJmsListener.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/AbstractJmsListener.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/AbstractJmsListener.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/AbstractJmsListener.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -89,7 +89,7 @@
         }
 
         if (Debug.verboseOn()) Debug.logVerbose("Running service: " + serviceName, module);
-        
+
         Map<String, Object> result = null;
         if (context != null) {
             try {
@@ -102,14 +102,14 @@
     }
 
     /**
-     * Receives the MapMessage and processes the service.
+     * Receives the MapMessage and processes the service.
      * @see javax.jms.MessageListener#onMessage(Message)
      */
     public void onMessage(Message message) {
         MapMessage mapMessage = null;
 
         if (Debug.verboseOn()) Debug.logVerbose("JMS Message Received --> " + message, module);
-        
+
         if (message instanceof MapMessage) {
             mapMessage = (MapMessage) message;
         } else {
@@ -148,7 +148,7 @@
     }
 
     /**
-     *
+     *
      * @see org.ofbiz.service.jms.GenericMessageListener#isConnected()
      */
     public boolean isConnected() {

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/GenericMessageListener.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/GenericMessageListener.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/GenericMessageListener.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/GenericMessageListener.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -177,7 +177,7 @@
             throw new GenericServiceException("No listener found with that serverKey.");
         loadListener(serverKey, server);
     }
-        
+
     /**
      * Close all the JMS message listeners.
      * @throws GenericServiceException

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsQueueListener.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsQueueListener.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsQueueListener.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsQueueListener.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -138,24 +138,24 @@
         InitialContext jndi = null;
         TopicConnectionFactory factory = null;
         TopicConnection con = null;
-        
+
         try {
             jndi = JNDIContextFactory.getInitialContext(serverName);
             factory = (TopicConnectionFactory) jndi.lookup(jndiName);
         } catch (GeneralException ge) {
-            throw new GenericServiceException("Problems getting JNDI InitialContext.", ge.getNested());              
+            throw new GenericServiceException("Problems getting JNDI InitialContext.", ge.getNested());
         } catch (NamingException ne) {
-            JNDIContextFactory.clearInitialContext(serverName);          
+            JNDIContextFactory.clearInitialContext(serverName);
             try {
                 jndi = JNDIContextFactory.getInitialContext(serverName);
                 factory = (TopicConnectionFactory) jndi.lookup(jndiName);
             } catch (GeneralException ge2) {
-                throw new GenericServiceException("Problems getting JNDI InitialContext.", ge2.getNested());                  
+                throw new GenericServiceException("Problems getting JNDI InitialContext.", ge2.getNested());
             } catch (NamingException ne2) {
                 throw new GenericServiceException("JNDI lookup problems.", ne);
             }
         }
-        
+
         try {
             con = factory.createTopicConnection(userName, password);
 
@@ -176,7 +176,7 @@
             // close the connections
             publisher.close();
             session.close();
-            con.close();                        
+            con.close();
         } catch (NamingException ne) {
             throw new GenericServiceException("Problems with JNDI lookup.", ne);
         } catch (JMSException je) {
@@ -197,24 +197,24 @@
         InitialContext jndi = null;
         QueueConnectionFactory factory = null;
         QueueConnection con = null;
-        
+
         try {
             jndi = JNDIContextFactory.getInitialContext(serverName);
-            factory = (QueueConnectionFactory) jndi.lookup(jndiName);  
+            factory = (QueueConnectionFactory) jndi.lookup(jndiName);
         } catch (GeneralException ge) {
-            throw new GenericServiceException("Problems getting JNDI InitialContext.", ge.getNested());        
+            throw new GenericServiceException("Problems getting JNDI InitialContext.", ge.getNested());
         } catch (NamingException ne) {
-            JNDIContextFactory.clearInitialContext(serverName);          
+            JNDIContextFactory.clearInitialContext(serverName);
             try {
                 jndi = JNDIContextFactory.getInitialContext(serverName);
-                factory = (QueueConnectionFactory) jndi.lookup(jndiName);
+                factory = (QueueConnectionFactory) jndi.lookup(jndiName);
             } catch (GeneralException ge2) {
-                throw new GenericServiceException("Problems getting JNDI InitialContext.", ge2.getNested());            
+                throw new GenericServiceException("Problems getting JNDI InitialContext.", ge2.getNested());
             } catch (NamingException ne2) {
                 throw new GenericServiceException("JNDI lookup problem.", ne2);
-            }            
+            }
         }
-        
+
         try {
             con = factory.createQueueConnection(userName, password);
 
@@ -251,28 +251,28 @@
         String userName = server.getAttribute("username");
         String password = server.getAttribute("password");
         String clientId = server.getAttribute("client-id");
-        
+
         InitialContext jndi = null;
         XAQueueConnectionFactory factory = null;
-        XAQueueConnection con = null;        
-        
+        XAQueueConnection con = null;
+
         try {
             jndi = JNDIContextFactory.getInitialContext(serverName);
-            factory = (XAQueueConnectionFactory) jndi.lookup(jndiName);                        
+            factory = (XAQueueConnectionFactory) jndi.lookup(jndiName);
         } catch (GeneralException ge) {
             throw new GenericServiceException("Problems getting JNDI InitialContext.", ge.getNested());
         } catch (NamingException ne) {
-            JNDIContextFactory.clearInitialContext(serverName);
+            JNDIContextFactory.clearInitialContext(serverName);
             try {
                 jndi = JNDIContextFactory.getInitialContext(serverName);
                 factory = (XAQueueConnectionFactory) jndi.lookup(jndiName);
             } catch (GeneralException ge2) {
-                throw new GenericServiceException("Problems getting JNDI InitialContext.", ge2.getNested());                
+                throw new GenericServiceException("Problems getting JNDI InitialContext.", ge2.getNested());
             } catch (NamingException ne2) {
                 throw new GenericServiceException("JNDI lookup problems.", ne2);
             }
         }
-                        
+
         try {
             con = factory.createXAQueueConnection(userName, password);
 
@@ -307,9 +307,9 @@
             con.close();
         } catch (GenericTransactionException gte) {
             throw new GenericServiceException("Problems enlisting resource w/ transaction manager.", gte.getNested());
-        } catch (NamingException ne) {            
+        } catch (NamingException ne) {
             throw new GenericServiceException("Problems with JNDI lookup.", ne);
-        } catch (JMSException je) {          
+        } catch (JMSException je) {
             throw new GenericServiceException("JMS Internal Error.", je);
         }
         return ServiceUtil.returnSuccess();
@@ -350,7 +350,7 @@
     /**
      * @see org.ofbiz.service.engine.GenericEngine#runAsync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map, org.ofbiz.service.GenericRequester, boolean)
      */
-    public void runAsync(String localName, ModelService modelService, Map<String, Object> context, GenericRequester requester, boolean persist) throws GenericServiceException {        
+    public void runAsync(String localName, ModelService modelService, Map<String, Object> context, GenericRequester requester, boolean persist) throws GenericServiceException {
         Map<String, Object> result = run(modelService, context);
 
         requester.receiveResult(result);

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsTopicListener.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsTopicListener.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsTopicListener.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsTopicListener.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -84,7 +84,7 @@
                     TopicSubscriber subscriber = session.createSubscriber(topic);
                     subscriber.setMessageListener(this);
                     con.start();
-                    this.setConnected(true);                    
+                    this.setConnected(true);
                     if (Debug.infoOn()) Debug.logInfo("Listening to topic [" + topicName + "] on [" + jndiServer + "]...", module);
                 } else {
                     throw new GenericServiceException("Topic lookup failed.");

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/AbstractJob.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/AbstractJob.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/AbstractJob.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/AbstractJob.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -131,5 +131,5 @@
      */
     protected String getServiceName() throws InvalidJobException {
         return service;
-    }        
+    }
 }

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/InvalidJobException.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/InvalidJobException.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/InvalidJobException.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/InvalidJobException.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/Job.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/Job.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/Job.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/Job.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -143,7 +143,7 @@
             return 0;
         }
     }
-    
+
     public Long getThreadId() {
         if (this.thread != null) {
             return this.thread.getId();
@@ -228,7 +228,7 @@
                 }
             } else {
                 Debug.logInfo("Invoker [" + thread.getName() + "] received job [" + job.getJobName() + "] from poller [" + jp.toString() + "]", module);
-                
+
                 // setup the current job settings
                 this.currentJob = job;
                 this.statusCode = 1;

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -141,9 +141,9 @@
                         Debug.logError("Unable to poll for jobs; transaction was not started by this process", module);
                         return null;
                     }
-                    
+
                     List<Job> localPoll = FastList.newInstance();
-                    
+
                     // first update the jobs w/ this instance running information
                     delegator.storeByCondition("JobSandbox", updateFields, mainCondition);
 
@@ -169,7 +169,7 @@
                     } else {
                         pollDone = true;
                     }
-                    
+
                     // nothing should go wrong at this point, so add to the general list
                     poll.addAll(localPoll);
                 } catch (Throwable t) {
@@ -224,7 +224,7 @@
                             Timestamp now = UtilDateTime.nowTimestamp();
                             // only re-schedule if there is no new recurrences since last run
                             Debug.log("Scheduling Job : " + job, module);
-    
+
                             String pJobId = job.getString("parentJobId");
                             if (pJobId == null) {
                                 pJobId = job.getString("jobId");
@@ -237,17 +237,17 @@
                             newJob.set("startDateTime", null);
                             newJob.set("runByInstanceId", null);
                             delegator.createSetNextSeqId(newJob);
-    
+
                             // set the cancel time on the old job to the same as the re-schedule time
                             job.set("statusId", "SERVICE_CRASHED");
                             job.set("cancelDateTime", now);
                             delegator.store(job);
-                            
+
                             rescheduled++;
                         }
                     }
                 }
-    
+
                 if (Debug.infoOn()) Debug.logInfo("-- " + rescheduled + " jobs re-scheduled", module);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManagerException.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManagerException.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManagerException.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManagerException.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -22,7 +22,7 @@
  * Job Scheduler Exception
  */
 public class JobManagerException extends org.ofbiz.base.util.GeneralException {
-    
+
     /**
      * Creates new <code>JobManagerException</code> without detail message.
      */

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -187,7 +187,7 @@
      */
     public void queueNow(Job job) {
         //Debug.logInfo("[" + Thread.currentThread().getId() + "] Begin queueNow; holds run lock? " + Thread.holdsLock(run), module);
-        
+
         // NOTE DEJ20071201 MUST use a different object for the lock here because the "this" object is always held by the poller thread in the run method above (which sleeps and runs)
         synchronized (run) {
             run.add(job);
@@ -198,7 +198,7 @@
                 if (run.size() > pool.size() && pool.size() < maxThreads()) {
                     int calcSize = (run.size() / jobsPerThread()) - (pool.size());
                     int addSize = calcSize > maxThreads() ? maxThreads() : calcSize;
-    
+
                     for (int i = 0; i < addSize; i++) {
                         JobInvoker iv = new JobInvoker(this, invokerWaitTime());
                         pool.add(iv);

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -284,7 +284,7 @@
 
             // check the runAsUser
             if (!UtilValidate.isEmpty(jobObj.get("runAsUser"))) {
-                context.put("userLogin", ServiceUtil.getUserLogin(dctx, context, jobObj.getString("runAsUser")));                
+                context.put("userLogin", ServiceUtil.getUserLogin(dctx, context, jobObj.getString("runAsUser")));
             }
         } catch (GenericEntityException e) {
             Debug.logError(e, "PersistedServiceJob.getContext(): Entity Exception", module);

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -67,7 +67,7 @@
      *
      */
     public void init(String[] args, String configFile) throws ContainerException {
-        this.configFile = configFile;      
+        this.configFile = configFile;
         this.stores = new LinkedHashMap<Store, Session>();
         this.pollTimer = new Timer();
     }
@@ -84,7 +84,7 @@
         String dispatcherName = ContainerConfig.getPropertyValue(cfg, "dispatcher-name", "JavaMailDispatcher");
         String delegatorName = ContainerConfig.getPropertyValue(cfg, "delegator-name", "default");
         this.deleteMail = "true".equals(ContainerConfig.getPropertyValue(cfg, "delete-mail", "false"));
-        
+
         this.delegator = GenericDelegator.getGenericDelegator(delegatorName);
         this.dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, delegator);
         this.timerDelay = (long) ContainerConfig.getPropertyValue(cfg, "poll-delay", 300000);

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -60,7 +60,7 @@
     public void setMessage(MimeMessage message) {
         if (message != null) {
             // serialize the message
-            this.message = message;            
+            this.message = message;
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             try {
                 message.writeTo(baos);

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaAction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaAction.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaAction.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaAction.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaCondition.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaCondition.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaCondition.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaRule.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaRule.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaRule.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaRule.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -65,7 +65,7 @@
             Debug.logInfo("Service MCA [" + ruleName + "] is disabled; not running.", module);
             return;
         }
-        
+
         boolean allCondTrue = true;
         for (ServiceMcaCondition cond: conditions) {
             if (!cond.eval(dispatcher, messageWrapper, userLogin)) {

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaUtil.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaUtil.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaUtil.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/ExampleRemoteClient.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/ExampleRemoteClient.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/ExampleRemoteClient.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/ExampleRemoteClient.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -30,14 +30,14 @@
 import org.ofbiz.service.GenericServiceException;
 
 /** An example of how to remotely access the Service Engine's RemoteDispatcher.
- *
+ *
  * The following files from OFBiz need to be on the client's classpath:
  * cache.properties
  * debug.properties
  * jsse.properties
  * ofbiz-base.jar
  * ofbiz-service-rmi.jar (copied and renamed from "ofbiz/framework/service/build/lib/ofbiz-service-rmi.raj" from an OFBiz build)
- *
+ *
  * The following third-party libraries (can be found in OFBiz) also need to be on the client's classpath:
  * commons-collections.jar
  * javolution.jar

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcher.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcher.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcher.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcher.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -30,7 +30,7 @@
  * Generic Services Remote Dispatcher
  */
 public interface RemoteDispatcher extends Remote {
-    
+
     /**
      * Run the service synchronously and return the result.
      * @param serviceName Name of the service to run.
@@ -158,7 +158,7 @@
      * @throws RemoteException
      */
     public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime) throws GenericServiceException, RemoteException;
-                
+
     /**
      * Schedule a service to run asynchronously at a specific start time.
      * @param serviceName Name of the service to invoke.
@@ -171,7 +171,7 @@
      * @throws RemoteException
      */
     public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count) throws GenericServiceException, RemoteException;
-  
+
     /**
      * Schedule a service to run asynchronously at a specific start time.
      * @param serviceName Name of the service to invoke.
@@ -184,7 +184,7 @@
      * @throws RemoteException
      */
     public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws GenericServiceException, RemoteException;
-            
+
     /**
      * Schedule a service to run asynchronously at a specific start time.
      * @param serviceName Name of the service to invoke.

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -52,7 +52,7 @@
     public void init(String[] args, String configFile) {
         this.configFile = configFile;
     }
-    
+
     public boolean start() throws ContainerException {
         // get the container config
         ContainerConfig.Container cfg = ContainerConfig.getContainer("rmi-dispatcher", configFile);
@@ -160,7 +160,7 @@
             } catch (NamingException e) {
                 throw new ContainerException("Unable to lookup bound objects", e);
             }
-        }        
+        }
 
         return true;
     }

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceEngine.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceEngine.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceEngine.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -89,7 +89,7 @@
         if (alias == null) {
             throw new IOException("SSL certificate alias cannot be null; MUST be set for SSLServerSocketFactory!");
         }
-        
+
         javax.net.ssl.SSLServerSocketFactory factory = null;
         try {
             if (ks != null) {

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/semaphore/ServiceSemaphore.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/semaphore/ServiceSemaphore.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/semaphore/ServiceSemaphore.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/semaphore/ServiceSemaphore.java Sat Mar 21 23:23:25 2009
@@ -20,7 +20,7 @@
 /**
  * ServiceSemaphore
  */
-public class ServiceSemaphore {  
+public class ServiceSemaphore {
     // TODO: add something to make sure semaphores are cleaned up on failures and when the thread somehow goes away without cleaning it up
     // TODO: write service engine test cases to make sure semaphore both blocking and timing out (use config to set sleep and wait to low values so it times out quickly)
 
@@ -48,7 +48,7 @@
         if (mode == SEMAPHORE_MODE_NONE) return;
 
         lockTime = UtilDateTime.nowTimestamp();
-        
+
         if (this.checkLockNeedToWait()) {
             waitOrFail();
         }
@@ -60,7 +60,7 @@
         // remove the lock file
         dbWrite(lock, true);
     }
-    
+
     private void waitOrFail() throws SemaphoreWaitException, SemaphoreFailException {
         if (SEMAPHORE_MODE_FAIL == mode) {
             // fail
@@ -74,7 +74,7 @@
             while (wait < maxWaitCount) {
                 wait++;
                 try {
-                    Thread.sleep(sleep);              
+                    Thread.sleep(sleep);
                 } catch (InterruptedException e) {
                     Debug.logInfo(e, "Sleep interrupted: ServiceSemaphone.waitOrFail()", module);
                 }
@@ -113,7 +113,7 @@
 
             // use the special method below so we can reuse the unqiue tx functions
             dbWrite(semaphore, false);
-            
+
             // we own the lock, no waiting
             return false;
         } else {
@@ -129,7 +129,7 @@
 
         try {
             // prepare the suspended transaction
-            parent = TransactionUtil.suspend();            
+            parent = TransactionUtil.suspend();
             beganTx = TransactionUtil.begin();
             if (!beganTx) {
                 throw new SemaphoreFailException("Cannot obtain unique transaction for semaphore logging");
@@ -166,7 +166,7 @@
             }
         } catch (GenericTransactionException e) {
             Debug.logError(e, module);
-        } finally {            
+        } finally {
             if (parent != null) {
                 try {
                     TransactionUtil.resume(parent);

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -38,7 +38,7 @@
 public class ServiceEngineTestServices {
 
     public static final String module = ServiceEngineTestServices.class.getName();
-    
+
     public static Map<String, Object> testServiceDeadLockRetry(DispatchContext dctx, Map<String, ? extends Object> context) {
         LocalDispatcher dispatcher = dctx.getDispatcher();
         try {
@@ -63,10 +63,10 @@
             Debug.logError(e, errMsg, module);
             return ServiceUtil.returnError(errMsg);
         }
-        
+
         return ServiceUtil.returnSuccess();
     }
-    
+
     public static Map<String, Object> testServiceDeadLockRetryThreadA(DispatchContext dctx, Map<String, ? extends Object> context) {
         GenericDelegator delegator = dctx.getDelegator();
 
@@ -75,7 +75,7 @@
             GenericValue testingTypeA = delegator.findOne("TestingType", false, "testingTypeId", "SVCLRT_A");
             testingTypeA.set("description", "New description for SVCLRT_A");
             testingTypeA.store();
-            
+
             // wait at least long enough for the other method to have locked resource B
             Debug.logInfo("In testServiceDeadLockRetryThreadA just updated SVCLRT_A, beginning wait", module);
             UtilMisc.staticWait(100);
@@ -109,7 +109,7 @@
             GenericValue testingTypeB = delegator.findOne("TestingType", false, "testingTypeId", "SVCLRT_B");
             testingTypeB.set("description", "New description for SVCLRT_B");
             testingTypeB.store();
-            
+
             // wait at least long enough for the other method to have locked resource B
             Debug.logInfo("In testServiceDeadLockRetryThreadB just updated SVCLRT_B, beginning wait", module);
             UtilMisc.staticWait(100);
@@ -137,7 +137,7 @@
     }
 
     // ==================================================
-    
+
     public static Map<String, Object> testServiceLockWaitTimeoutRetry(DispatchContext dctx, Map<String, ? extends Object> context) {
         LocalDispatcher dispatcher = dctx.getDispatcher();
         try {
@@ -162,7 +162,7 @@
             Debug.logError(e, errMsg, module);
             return ServiceUtil.returnError(errMsg);
         }
-        
+
         return ServiceUtil.returnSuccess();
     }
     public static Map<String, Object> testServiceLockWaitTimeoutRetryGrabber(DispatchContext dctx, Map<String, ? extends Object> context) {
@@ -175,7 +175,7 @@
             testingType.store();
 
             Debug.logInfo("In testServiceLockWaitTimeoutRetryGrabber just updated SVCLWTRT, beginning wait", module);
-            
+
             // wait at least long enough for the other method to have locked resource wait time out
             // (tx timeout 6s on this the Grabber and 2s on the Waiter): wait 4 seconds because timeout on this
             UtilMisc.staticWait(4 * 1000);
@@ -197,14 +197,14 @@
         try {
             // wait for a small amount of time to make sure the grabber does it's thing first
             UtilMisc.staticWait(100);
-            
+
             Debug.logInfo("In testServiceLockWaitTimeoutRetryWaiter about to update SVCLWTRT, wait starts here", module);
-            
+
             // TRY grab entity SVCLWTRT by looking up and changing, should get a lock wait timeout exception because of the Grabber thread
             GenericValue testingType = delegator.findOne("TestingType", false, "testingTypeId", "SVCLWTRT");
             testingType.set("description", "New description for SVCLWTRT from Waiter service, this is the value that should be there.");
             testingType.store();
-            
+
             Debug.logInfo("In testServiceLockWaitTimeoutRetryWaiter successfully updated SVCLWTRT", module);
         } catch (GenericEntityException e) {
             String errMsg = "Entity Engine Exception running lock wait timeout test Waiter thread: " + e.toString();
@@ -220,19 +220,19 @@
     }
 
     // ==================================================
-    
+
     /**
      * NOTE that this is a funny case where the auto-retry in the service engine for the call to
      * testServiceLockWaitTimeoutRetryCantRecoverWaiter would NOT be able to recover because it would try again
-     * given the new transaction and all, but the lock for the waiting thread would still be there... so it will fail
+     * given the new transaction and all, but the lock for the waiting thread would still be there... so it will fail
      * repeatedly.
-     *
+     *
      * TODO: there's got to be some way to do this, but how?!? :(
-     *
-     * NOTE: maybe this will work: create a list that the service engine maintains of services it will run after the
+     *
+     * NOTE: maybe this will work: create a list that the service engine maintains of services it will run after the
      * current service run is complete, and AFTER it has committed or rolled back its transaction; if a service finds
      * it has a lock wait timeout, add itself to the list for its parent service (somehow...) and off we go!
-     *
+     *
      * @param dctx
      * @param context
      * @return
@@ -252,7 +252,7 @@
             if (ServiceUtil.isError(waiterResult)) {
                 return ServiceUtil.returnError("Error running testServiceLockWaitTimeoutRetryCantRecoverWaiter", null, null, waiterResult);
             }
-            
+
             Debug.logInfo("In testServiceLockWaitTimeoutRetryCantRecover (grabber) successfully finished running sub-service in own transaction", module);
         } catch (GenericServiceException e) {
             String errMsg = "Error running deadlock test services: " + e.toString();
@@ -262,7 +262,7 @@
             Debug.logError(e, errMsg, module);
             return ServiceUtil.returnError(errMsg);
         }
-        
+
         return ServiceUtil.returnSuccess();
     }
     public static Map<String, Object> testServiceLockWaitTimeoutRetryCantRecoverWaiter(DispatchContext dctx, Map<String, ? extends Object> context) {
@@ -275,7 +275,7 @@
             GenericValue testingType = delegator.findOne("TestingType", false, "testingTypeId", "SVCLWTRTCR");
             testingType.set("description", "New description for SVCLWTRTCR from Lock Wait Timeout Lock Waiter, this is the value that should be there.");
             testingType.store();
-            
+
             Debug.logInfo("In testServiceLockWaitTimeoutRetryCantRecoverWaiter successfully updated SVCLWTRTCR", module);
         } catch (GenericEntityException e) {
             String errMsg = "Entity Engine Exception running lock wait timeout test Waiter thread: " + e.toString();
@@ -285,9 +285,9 @@
 
         return ServiceUtil.returnSuccess();
     }
-    
+
     // ==================================================
-    
+
     public static Map<String, Object> testServiceOwnTxSubServiceAfterSetRollbackOnlyInParentErrorCatchWrapper(DispatchContext dctx, Map<String, ? extends Object> context) {
         LocalDispatcher dispatcher = dctx.getDispatcher();
         try {
@@ -299,7 +299,7 @@
             String errMsg = "This is the expected error running sub-service with own tx after the parent has set rollback only, logging and ignoring: " + e.toString();
             Debug.logError(e, errMsg, module);
         }
-        
+
         return ServiceUtil.returnSuccess();
     }
     public static Map<String, Object> testServiceOwnTxSubServiceAfterSetRollbackOnlyInParent(DispatchContext dctx, Map<String, ? extends Object> context) {
@@ -310,9 +310,9 @@
             GenericValue testingType = delegator.findOne("TestingType", false, "testingTypeId", "SVC_SRBO");
             testingType.set("description", "New description for SVC_SRBO; this should be reset on the rollback, if this is in the db then the test failed");
             testingType.store();
-            
+
             TransactionUtil.setRollbackOnly("Intentionally setting rollback only for testing purposes", null);
-            
+
             Map<String, Object> resultMap = dispatcher.runSync("testServiceOwnTxSubServiceAfterSetRollbackOnlyInParentSubService", null, 60, true);
             if (ServiceUtil.isError(resultMap)) {
                 return ServiceUtil.returnError("Error running sub-service in testServiceOwnTxSubServiceAfterSetRollbackOnlyInParent", null, null, resultMap);
@@ -322,17 +322,17 @@
             Debug.logError(e, errMsg, module);
             return ServiceUtil.returnError(errMsg);
         }
-        
+
         return ServiceUtil.returnSuccess();
-    }    
+    }
     public static Map<String, Object> testServiceOwnTxSubServiceAfterSetRollbackOnlyInParentSubService(DispatchContext dctx, Map<String, ? extends Object> context) {
         // this service doesn't actually have to do anything, the problem was in just pausing and resuming the transaciton with setRollbackOnly
         return ServiceUtil.returnSuccess();
     }
-    
-    
+
+
     // ==================================================
-    
+
     public static Map<String, Object> testServiceEcaGlobalEventExec(DispatchContext dctx, Map<String, ? extends Object> context) {
         LocalDispatcher dispatcher = dctx.getDispatcher();
         try {
@@ -343,7 +343,7 @@
             Debug.logError(e, errMsg, module);
             return ServiceUtil.returnError(errMsg);
         }
-        
+
         // this service doesn't actually have to do anything, just a placeholder for ECA rules, this one should commit
         return ServiceUtil.returnSuccess();
     }

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTests.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTests.java?rev=757069&r1=757068&r2=757069&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTests.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTests.java Sat Mar 21 23:23:25 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -48,6 +48,6 @@
 
     public void testBasicJavaInvocation() throws Exception {
         Map<String, Object> result = dispatcher.runSync("testScv", UtilMisc.toMap("message", "Unit Test"));
-        assertEquals("Service result success", ModelService.RESPOND_SUCCESS, result.get(ModelService.RESPONSE_MESSAGE));        
+        assertEquals("Service result success", ModelService.RESPOND_SUCCESS, result.get(ModelService.RESPONSE_MESSAGE));
     }
 }