Revision: 539
http://svn.sourceforge.net/adempiere/?rev=539&view=rev
Author: olivensteins
Date: 2006-10-20 02:11:46 -0700 (Fri, 20 Oct 2006)
Log Message:
-----------
Rebranding part 1
Modified Paths:
--------------
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Allocation.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Bank.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Cash.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocTax.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Allocation.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Bank.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Cash.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_GLJournal.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_InOut.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Inventory.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Invoice.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_MatchInv.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_MatchPO.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Movement.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Order.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Payment.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Production.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_ProjectIssue.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Requisition.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Fact.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/FactLine.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Matcher.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/ProductInfo.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapConnectionHandler.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapMessage.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapProcessor.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapProcessorModel.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapResult.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AcctProcessor.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AlertProcessor.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/EMailProcessor.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/RequestProcessor.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/Scheduler.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/WorkflowProcessor.java
Added Paths:
-----------
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServerGroup.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServerMgr.java
Removed Paths:
-------------
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServer.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerGroup.java
branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerMgr.java
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Allocation.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Allocation.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Allocation.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Bank.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Bank.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Bank.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Cash.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Cash.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocLine_Cash.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocTax.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocTax.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/DocTax.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Allocation.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Allocation.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Allocation.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Bank.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Bank.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Bank.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Cash.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Cash.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Cash.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_GLJournal.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_GLJournal.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_GLJournal.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_InOut.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_InOut.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_InOut.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Inventory.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Inventory.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Inventory.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Invoice.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Invoice.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Invoice.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_MatchInv.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_MatchInv.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_MatchInv.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_MatchPO.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_MatchPO.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_MatchPO.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Movement.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Movement.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Movement.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Order.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Order.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Order.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Payment.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Payment.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Payment.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Production.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Production.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Production.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_ProjectIssue.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_ProjectIssue.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_ProjectIssue.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Requisition.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Requisition.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Doc_Requisition.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Fact.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Fact.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Fact.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/FactLine.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/FactLine.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/FactLine.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Matcher.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Matcher.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/Matcher.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/ProductInfo.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/ProductInfo.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/acct/ProductInfo.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapConnectionHandler.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapConnectionHandler.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapConnectionHandler.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution
+ * Product: Adempiere ERP & CRM Smart Business Solution
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved.
* This program is free software; you can redistribute it and/or modify it
* under the terms version 2 of the GNU General Public License as published
@@ -10,8 +10,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- * You may reach us at: ComPiere, Inc. - http://www.compiere.org/license.html
- * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
+ * You may reach us at: ComPiere, Inc. - http://www.adempiere.org/license.html
+ * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
*****************************************************************************/
package org.compiere.ldap;
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapMessage.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapMessage.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapMessage.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution
+ * Product: Adempiere ERP & CRM Smart Business Solution
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved.
* This program is free software; you can redistribute it and/or modify it
* under the terms version 2 of the GNU General Public License as published
@@ -10,8 +10,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- * You may reach us at: ComPiere, Inc. - http://www.compiere.org/license.html
- * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
+ * You may reach us at: ComPiere, Inc. - http://www.adempiere.org/license.html
+ * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
*****************************************************************************/
package org.compiere.ldap;
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapProcessor.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapProcessor.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapProcessor.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution
+ * Product: Adempiere ERP & CRM Smart Business Solution
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved.
* This program is free software; you can redistribute it and/or modify it
* under the terms version 2 of the GNU General Public License as published
@@ -10,8 +10,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- * You may reach us at: ComPiere, Inc. - http://www.compiere.org/license.html
- * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
+ * You may reach us at: ComPiere, Inc. - http://www.adempiere.org/license.html
+ * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
*****************************************************************************/
package org.compiere.ldap;
@@ -32,7 +32,7 @@
* @author Jorg Janke
* @version $Id: LdapProcessor.java,v 1.1 2006/10/09 00:23:16 jjanke Exp $
*/
-public class LdapProcessor extends CompiereServer
+public class LdapProcessor extends AdempiereServer
{
/**
* Ldap Processor (Server)
@@ -133,7 +133,7 @@
*/
public static void main(String[] args)
{
- Compiere.startup(true);
+ Adempiere.startup(true);
new LdapProcessor(new LdapProcessorModel(new Properties())).doWork();
} // main
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapProcessorModel.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapProcessorModel.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapProcessorModel.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution
+ * Product: Adempiere ERP & CRM Smart Business Solution
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved.
* This program is free software; you can redistribute it and/or modify it
* under the terms version 2 of the GNU General Public License as published
@@ -10,8 +10,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- * You may reach us at: ComPiere, Inc. - http://www.compiere.org/license.html
- * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
+ * You may reach us at: ComPiere, Inc. - http://www.adempiere.org/license.html
+ * 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
*****************************************************************************/
package org.compiere.ldap;
@@ -25,7 +25,7 @@
* @author Jorg Janke
* @version $Id: LdapProcessorModel.java,v 1.1 2006/10/09 00:23:16 jjanke Exp $
*/
-public class LdapProcessorModel implements CompiereProcessor
+public class LdapProcessorModel implements AdempiereProcessor
{
/**
* Ldap Processor Model
@@ -65,7 +65,7 @@
/**************************************************************************
* getAD_Client_ID
- * @see org.compiere.model.CompiereProcessor#getAD_Client_ID()
+ * @see org.compiere.model.AdempiereProcessor#getAD_Client_ID()
* @return 0
*/
public int getAD_Client_ID()
@@ -74,16 +74,16 @@
}
/**
* getName
- * @see org.compiere.model.CompiereProcessor#getName()
+ * @see org.compiere.model.AdempiereProcessor#getName()
* @return name
*/
public String getName()
{
- return "Compiere LDAP Server";
+ return "Adempiere LDAP Server";
}
/**
* getDescription
- * @see org.compiere.model.CompiereProcessor#getDescription()
+ * @see org.compiere.model.AdempiereProcessor#getDescription()
* @return -
*/
public String getDescription()
@@ -100,7 +100,7 @@
}
/**
* GetFrequencyType
- * @see org.compiere.model.CompiereProcessor#getFrequencyType()
+ * @see org.compiere.model.AdempiereProcessor#getFrequencyType()
* @return min
*/
public String getFrequencyType()
@@ -109,7 +109,7 @@
}
/**
* getFrequency
- * @see org.compiere.model.CompiereProcessor#getFrequency()
+ * @see org.compiere.model.AdempiereProcessor#getFrequency()
* @return 1
*/
public int getFrequency()
@@ -151,8 +151,8 @@
return true;
}
- public CompiereProcessorLog[] getLogs()
+ public AdempiereProcessorLog[] getLogs()
{
- return new CompiereProcessorLog[0];
+ return new AdempiereProcessorLog[0];
}
}
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapResult.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapResult.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/ldap/LdapResult.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution
+ * Product: Adempiere ERP & CRM Smart Business Solution
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved.
* This program is free software; you can redistribute it and/or modify it
* under the terms version 2 of the GNU General Public License as published
@@ -10,7 +10,7 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- * You may reach us at: ComPiere, Inc. - http://www.compiere.org/license.html
+ * You may reach us at: ComPiere, Inc. - http://www.adempiere.org/license.html
* 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@...
*****************************************************************************/
package org.compiere.ldap;
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AcctProcessor.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AcctProcessor.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AcctProcessor.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
@@ -29,7 +29,7 @@
* @author Jorg Janke
* @version $Id: AcctProcessor.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
*/
-public class AcctProcessor extends CompiereServer
+public class AcctProcessor extends AdempiereServer
{
/**
* Accounting Processor
Copied: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java (from rev 517, branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServer.java)
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java (rev 0)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -0,0 +1,388 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. This program is distributed in the hope *
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
+ * See the GNU General Public License for more details. *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@... or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.server;
+
+import java.sql.*;
+import java.util.*;
+import java.util.logging.*;
+import org.compiere.ldap.*;
+import org.compiere.model.*;
+import org.compiere.util.*;
+import org.compiere.wf.*;
+
+/**
+ * Adempiere Server Base
+ *
+ * @author Jorg Janke
+ * @version $Id: AdempiereServer.java,v 1.3 2006/10/09 00:23:26 jjanke Exp $
+ */
+public abstract class AdempiereServer extends Thread
+{
+ /**
+ * Create New Server Thead
+ * @param model model
+ * @return server tread or null
+ */
+ public static AdempiereServer create (AdempiereProcessor model)
+ {
+ if (model instanceof MRequestProcessor)
+ return new RequestProcessor ((MRequestProcessor)model);
+ if (model instanceof MWorkflowProcessor)
+ return new WorkflowProcessor ((MWorkflowProcessor)model);
+ if (model instanceof MAcctProcessor)
+ return new AcctProcessor ((MAcctProcessor)model);
+ if (model instanceof MAlertProcessor)
+ return new AlertProcessor ((MAlertProcessor)model);
+ if (model instanceof MScheduler)
+ return new Scheduler ((MScheduler)model);
+ if (model instanceof LdapProcessorModel)
+ return new LdapProcessor((LdapProcessorModel)model);
+ //
+ throw new IllegalArgumentException("Unknown Processor");
+ } // create
+
+
+ /**************************************************************************
+ * Server Base Class
+ * @param model model
+ * @param initialNap delay time running in sec
+ */
+ protected AdempiereServer (AdempiereProcessor model, int initialNap)
+ {
+ super (AdempiereServerGroup.get(), null, model.getName(), 0);
+ p_model = model;
+ m_ctx = new Properties(model.getCtx());
+ if (p_system == null)
+ p_system = MSystem.get(m_ctx);
+ p_client = MClient.get(m_ctx);
+ Env.setContext(m_ctx, "#AD_Client_ID", p_client.getAD_Client_ID());
+ m_initialNap = initialNap;
+ // log.info(model.getName() + " - " + getThreadGroup());
+ } // ServerBase
+
+ /** The Processor Model */
+ protected AdempiereProcessor p_model;
+ /** Initial nap is seconds */
+ private int m_initialNap = 0;
+
+ /** Miliseconds to sleep - 10 Min default */
+ private long m_sleepMS = 600000;
+ /** Sleeping */
+ private volatile boolean m_sleeping = false;
+ /** Server start time */
+ private long m_start = 0;
+ /** Number of Work executions */
+ protected int p_runCount = 0;
+ /** Tine start of work */
+ protected long p_startWork = 0;
+ /** Number MS of last Run */
+ private long m_runLastMS = 0;
+ /** Number of MS total */
+ private long m_runTotalMS = 0;
+ /** When to run next */
+ private long m_nextWork = 0;
+
+ /** Logger */
+ protected CLogger log = CLogger.getCLogger(getClass());
+ /** Context */
+ private Properties m_ctx = null;
+ /** System */
+ protected static MSystem p_system = null;
+ /** Client */
+ protected MClient p_client = null;
+
+ /**
+ * Get Server Context
+ * @return context
+ */
+ public Properties getCtx()
+ {
+ return m_ctx;
+ } // getCtx
+
+ /**
+ * @return Returns the sleepMS.
+ */
+ public long getSleepMS ()
+ {
+ return m_sleepMS;
+ } // getSleepMS
+
+
+ /**
+ * Sleep for set time
+ * @return true if not interrupted
+ */
+ public boolean sleep()
+ {
+ if (isInterrupted())
+ {
+ log.info (getName() + ": interrupted");
+ return false;
+ }
+ log.fine(getName() + ": sleeping " + TimeUtil.formatElapsed(m_sleepMS));
+ m_sleeping = true;
+ try
+ {
+ sleep (m_sleepMS);
+ }
+ catch (InterruptedException e)
+ {
+ log.info (getName() + ": interrupted");
+ m_sleeping = false;
+ return false;
+ }
+ m_sleeping = false;
+ return true;
+ } // sleep
+
+ /**
+ * Run Now
+ */
+ public void runNow()
+ {
+ log.info(getName());
+ p_startWork = System.currentTimeMillis();
+ doWork();
+ long now = System.currentTimeMillis();
+ // ---------------
+
+ p_runCount++;
+ m_runLastMS = now - p_startWork;
+ m_runTotalMS += m_runLastMS;
+ //
+ p_model.setDateLastRun(new Timestamp(now));
+ p_model.save();
+ //
+ log.fine(getName() + ": " + getStatistics());
+ } // runNow
+
+ /**************************************************************************
+ * Run async
+ */
+ public void run ()
+ {
+ try
+ {
+ log.fine(getName() + ": pre-nap - " + m_initialNap);
+ sleep (m_initialNap * 1000);
+ }
+ catch (InterruptedException e)
+ {
+ log.log(Level.SEVERE, getName() + ": pre-nap interrupted", e);
+ return;
+ }
+
+ m_start = System.currentTimeMillis();
+ while (true)
+ {
+ if (m_nextWork == 0)
+ {
+ Timestamp dateNextRun = getDateNextRun(true);
+ if (dateNextRun != null)
+ m_nextWork = dateNextRun.getTime();
+ }
+ long now = System.currentTimeMillis();
+ if (m_nextWork > now)
+ {
+ m_sleepMS = m_nextWork - now;
+ if (!sleep ())
+ break;
+ }
+ if (isInterrupted())
+ {
+ log.info (getName() + ": interrupted");
+ break;
+ }
+
+ // ---------------
+ p_startWork = System.currentTimeMillis();
+ doWork();
+ now = System.currentTimeMillis();
+ // ---------------
+
+ p_runCount++;
+ m_runLastMS = now - p_startWork;
+ m_runTotalMS += m_runLastMS;
+ //
+ m_sleepMS = calculateSleep();
+ m_nextWork = now + m_sleepMS;
+ //
+ p_model.setDateLastRun(new Timestamp(now));
+ p_model.setDateNextRun(new Timestamp(m_nextWork));
+ p_model.save();
+ //
+ log.fine(getName() + ": " + getStatistics());
+ if (!sleep())
+ break;
+ }
+ m_start = 0;
+ } // run
+
+ /**
+ * Get Run Statistics
+ * @return Statistic info
+ */
+ public String getStatistics()
+ {
+ return "Run #" + p_runCount
+ + " - Last=" + TimeUtil.formatElapsed(m_runLastMS)
+ + " - Total=" + TimeUtil.formatElapsed(m_runTotalMS)
+ + " - Next " + TimeUtil.formatElapsed(m_nextWork - System.currentTimeMillis());
+ } // getStatistics
+
+ /**
+ * Do the actual Work
+ */
+ protected abstract void doWork();
+
+ /**
+ * Get Server Info
+ * @return info
+ */
+ public abstract String getServerInfo();
+
+ /**
+ * Get Unique ID
+ * @return Unique ID
+ */
+ public String getServerID()
+ {
+ return p_model.getServerID();
+ } // getServerID
+
+ /**
+ * Get the date Next run
+ * @param requery requery database
+ * @return date next run
+ */
+ public Timestamp getDateNextRun (boolean requery)
+ {
+ return p_model.getDateNextRun(requery);
+ } // getDateNextRun
+
+ /**
+ * Get the date Last run
+ * @return date lext run
+ */
+ public Timestamp getDateLastRun ()
+ {
+ return p_model.getDateLastRun();
+ } // getDateLastRun
+
+ /**
+ * Get Description
+ * @return Description
+ */
+ public String getDescription()
+ {
+ return p_model.getDescription();
+ } // getDescription
+
+ /**
+ * Get Model
+ * @return Model
+ */
+ public AdempiereProcessor getModel()
+ {
+ return p_model;
+ } // getModel
+
+ /**
+ * Calculate Sleep ms
+ * @return miliseconds
+ */
+ private long calculateSleep ()
+ {
+ String frequencyType = p_model.getFrequencyType();
+ int frequency = p_model.getFrequency();
+ if (frequency < 1)
+ frequency = 1;
+ //
+ long typeSec = 600; // 10 minutes
+ if (frequencyType == null)
+ typeSec = 300; // 5 minutes
+ else if (X_R_RequestProcessor.FREQUENCYTYPE_Minute.equals(frequencyType))
+ typeSec = 60;
+ else if (X_R_RequestProcessor.FREQUENCYTYPE_Hour.equals(frequencyType))
+ typeSec = 3600;
+ else if (X_R_RequestProcessor.FREQUENCYTYPE_Day.equals(frequencyType))
+ typeSec = 86400;
+ //
+ return typeSec * 1000 * frequency; // ms
+ } // calculateSleep
+
+ /**
+ * Is Sleeping
+ * @return sleeping
+ */
+ public boolean isSleeping()
+ {
+ return m_sleeping;
+ } // isSleeping
+
+ /**
+ * String Representation
+ * @return info
+ */
+ public String toString ()
+ {
+ StringBuffer sb = new StringBuffer (getName())
+ .append (",Prio=").append(getPriority())
+ .append (",").append (getThreadGroup())
+ .append (",Alive=").append(isAlive())
+ .append (",Sleeping=").append(m_sleeping)
+ .append (",Last=").append(getDateLastRun());
+ if (m_sleeping)
+ sb.append (",Next=").append(getDateNextRun(false));
+ return sb.toString ();
+ } // toString
+
+ /**
+ * Get Seconds Alive
+ * @return seconds alive
+ */
+ public int getSecondsAlive()
+ {
+ if (m_start == 0)
+ return 0;
+ long now = System.currentTimeMillis();
+ long ms = (now-m_start) / 1000;
+ return (int)ms;
+ } // getSecondsAlive
+
+ /**
+ * Get Start Time
+ * @return start time
+ */
+ public Timestamp getStartTime()
+ {
+ if (m_start == 0)
+ return null;
+ return new Timestamp (m_start);
+ } // getStartTime
+
+ /**
+ * Get Processor Logs
+ * @return logs
+ */
+ public AdempiereProcessorLog[] getLogs()
+ {
+ return p_model.getLogs();
+ } // getLogs
+
+} // AdempiereServer
Copied: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServerGroup.java (from rev 517, branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerGroup.java)
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServerGroup.java (rev 0)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServerGroup.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. This program is distributed in the hope *
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
+ * See the GNU General Public License for more details. *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@... or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.server;
+
+import org.compiere.util.*;
+
+/**
+ * Adempiere Server Group
+ *
+ * @author Jorg Janke
+ * @version $Id: AdempiereServerGroup.java,v 1.2 2006/07/30 00:53:33 jjanke Exp $
+ */
+public class AdempiereServerGroup extends ThreadGroup
+{
+ /**
+ * Get Adempiere Server Group
+ * @return Server Group
+ */
+ public static AdempiereServerGroup get()
+ {
+ if (s_group == null || s_group.isDestroyed())
+ s_group = new AdempiereServerGroup();
+ return s_group;
+ } // get
+
+ /** Group */
+ private static AdempiereServerGroup s_group = null;
+
+ /**
+ * AdempiereServerGroup
+ */
+ private AdempiereServerGroup ()
+ {
+ super ("AdempiereServers");
+ setDaemon(true);
+ setMaxPriority(Thread.MAX_PRIORITY);
+ log.info(getName() + " - Parent=" + getParent());
+ } // AdempiereServerGroup
+
+ /** Logger */
+ protected CLogger log = CLogger.getCLogger(getClass());
+
+ /**
+ * Uncaught Exception
+ * @param t thread
+ * @param e exception
+ */
+ public void uncaughtException (Thread t, Throwable e)
+ {
+ log.info ("uncaughtException = " + e.toString());
+ super.uncaughtException (t, e);
+ } // uncaughtException
+
+ /**
+ * String Representation
+ * @return name
+ */
+ public String toString ()
+ {
+ return getName();
+ } // toString
+
+ /**
+ * Dump Info
+ */
+ public void dump ()
+ {
+ log.fine(getName() + (isDestroyed() ? " (destroyed)" : ""));
+ log.fine("- Parent=" + getParent());
+ Thread[] list = new Thread[activeCount()];
+ log.fine("- Count=" + enumerate(list, true));
+ for (int i = 0; i < list.length; i++)
+ log.fine("-- " + list[i]);
+ } // dump
+
+} // AdempiereServerGroup
Copied: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServerMgr.java (from rev 517, branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerMgr.java)
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServerMgr.java (rev 0)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AdempiereServerMgr.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -0,0 +1,532 @@
+/******************************************************************************
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. This program is distributed in the hope *
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
+ * See the GNU General Public License for more details. *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via info@... or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.server;
+
+import java.sql.*;
+import java.util.*;
+import java.util.logging.*;
+import org.compiere.*;
+import org.compiere.ldap.*;
+import org.compiere.model.*;
+import org.compiere.util.*;
+import org.compiere.wf.*;
+
+/**
+ * Adempiere Server Manager
+ *
+ * @author Jorg Janke
+ * @version $Id: AdempiereServerMgr.java,v 1.4 2006/10/09 00:23:26 jjanke Exp $
+ */
+public class AdempiereServerMgr
+{
+ /**
+ * Get Adempiere Server Manager
+ * @return mgr
+ */
+ public static AdempiereServerMgr get()
+ {
+ if (m_serverMgr == null)
+ {
+ // for faster subsequent calls
+ m_serverMgr = new AdempiereServerMgr();
+ m_serverMgr.startServers();
+ m_serverMgr.log.info(m_serverMgr.toString());
+ }
+ return m_serverMgr;
+ } // get
+
+ /** Singleton */
+ private static AdempiereServerMgr m_serverMgr = null;
+ /** Logger */
+ protected CLogger log = CLogger.getCLogger(getClass());
+
+ /**************************************************************************
+ * Adempiere Server Manager
+ */
+ private AdempiereServerMgr ()
+ {
+ super();
+ startEnvironment();
+ // m_serverMgr.startServers();
+ } // AdempiereServerMgr
+
+ /** The Servers */
+ private ArrayList<AdempiereServer> m_servers = new ArrayList<AdempiereServer>();
+ /** Context */
+ private Properties m_ctx = Env.getCtx();
+ /** Start */
+ private Timestamp m_start = new Timestamp(System.currentTimeMillis());
+
+ /**
+ * Start Environment
+ * @return true if started
+ */
+ private boolean startEnvironment()
+ {
+ Adempiere.startup(false);
+ log.info("");
+
+ // Set Session
+ MSession session = MSession.get(getCtx(), true);
+ session.setWebStoreSession(false);
+ session.setWebSession("Server");
+ session.save();
+ //
+ return true;
+ } // startEnvironment
+
+ /**
+ * Start Environment
+ * @return true if started
+ */
+ private boolean startServers()
+ {
+ log.info("");
+ int noServers = 0;
+ // Accounting
+ MAcctProcessor[] acctModels = MAcctProcessor.getActive(m_ctx);
+ for (int i = 0; i < acctModels.length; i++)
+ {
+ MAcctProcessor pModel = acctModels[i];
+ AdempiereServer server = AdempiereServer.create(pModel);
+ server.start();
+ server.setPriority(Thread.NORM_PRIORITY-2);
+ m_servers.add(server);
+ }
+ // Request
+ MRequestProcessor[] requestModels = MRequestProcessor.getActive(m_ctx);
+ for (int i = 0; i < requestModels.length; i++)
+ {
+ MRequestProcessor pModel = requestModels[i];
+ AdempiereServer server = AdempiereServer.create(pModel);
+ server.start();
+ server.setPriority(Thread.NORM_PRIORITY-2);
+ m_servers.add(server);
+ }
+ // Workflow
+ MWorkflowProcessor[] workflowModels = MWorkflowProcessor.getActive(m_ctx);
+ for (int i = 0; i < workflowModels.length; i++)
+ {
+ MWorkflowProcessor pModel = workflowModels[i];
+ AdempiereServer server = AdempiereServer.create(pModel);
+ server.start();
+ server.setPriority(Thread.NORM_PRIORITY-2);
+ m_servers.add(server);
+ }
+ // Alert
+ MAlertProcessor[] alertModels = MAlertProcessor.getActive(m_ctx);
+ for (int i = 0; i < alertModels.length; i++)
+ {
+ MAlertProcessor pModel = alertModels[i];
+ AdempiereServer server = AdempiereServer.create(pModel);
+ server.start();
+ server.setPriority(Thread.NORM_PRIORITY-2);
+ m_servers.add(server);
+ }
+ // Scheduler
+ MScheduler[] schedulerModels = MScheduler.getActive(m_ctx);
+ for (int i = 0; i < schedulerModels.length; i++)
+ {
+ MScheduler pModel = schedulerModels[i];
+ AdempiereServer server = AdempiereServer.create(pModel);
+ server.start();
+ server.setPriority(Thread.NORM_PRIORITY-2);
+ m_servers.add(server);
+ }
+ // LDAP
+ LdapProcessorModel lp = new LdapProcessorModel(m_ctx);
+ AdempiereServer server = AdempiereServer.create(lp);
+ server.start();
+ server.setPriority(Thread.NORM_PRIORITY-2);
+ m_servers.add(server);
+
+
+ log.fine("#" + noServers);
+ return startAll();
+ } // startEnvironment
+
+ /**
+ * Get Server Context
+ * @return ctx
+ */
+ public Properties getCtx()
+ {
+ return m_ctx;
+ } // getCtx
+
+ /**
+ * Start all servers
+ * @return true if started
+ */
+ public boolean startAll()
+ {
+ log.info ("");
+ AdempiereServer[] servers = getInActive();
+ for (int i = 0; i < servers.length; i++)
+ {
+ AdempiereServer server = servers[i];
+ try
+ {
+ if (server.isAlive())
+ continue;
+ // Wait until dead
+ if (server.isInterrupted())
+ {
+ int maxWait = 10; // 10 iterations = 1 sec
+ while (server.isAlive())
+ {
+ if (maxWait-- == 0)
+ {
+ log.severe ("Wait timeout for interruped " + server);
+ break;
+ }
+ try
+ {
+ Thread.sleep(100); // 1/10 sec
+ }
+ catch (InterruptedException e)
+ {
+ log.log(Level.SEVERE, "While sleeping", e);
+ }
+ }
+ }
+ // Do start
+ if (!server.isAlive())
+ {
+ // replace
+ server = AdempiereServer.create (server.getModel());
+ if (server == null)
+ m_servers.remove(i);
+ else
+ m_servers.set(i, server);
+ server.start();
+ server.setPriority(Thread.NORM_PRIORITY-2);
+ }
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "Server: " + server, e);
+ }
+ } // for all servers
+
+ // Final Check
+ int noRunning = 0;
+ int noStopped = 0;
+ for (int i = 0; i < servers.length; i++)
+ {
+ AdempiereServer server = servers[i];
+ try
+ {
+ if (server.isAlive())
+ {
+ log.info("Alive: " + server);
+ noRunning++;
+ }
+ else
+ {
+ log.warning("Dead: " + server);
+ noStopped++;
+ }
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "(checking) - " + server, e);
+ noStopped++;
+ }
+ }
+ log.fine("Running=" + noRunning + ", Stopped=" + noStopped);
+ AdempiereServerGroup.get().dump();
+ return noStopped == 0;
+ } // startAll
+
+ /**
+ * Start Server if not started yet
+ * @param serverID server ID
+ * @return true if started
+ */
+ public boolean start (String serverID)
+ {
+ AdempiereServer server = getServer(serverID);
+ if (server == null)
+ return false;
+ if (server.isAlive())
+ return true;
+
+ try
+ {
+ // replace
+ int index = m_servers.indexOf(server);
+ server = AdempiereServer.create (server.getModel());
+ if (server == null)
+ m_servers.remove(index);
+ else
+ m_servers.set(index, server);
+ server.start();
+ server.setPriority(Thread.NORM_PRIORITY-2);
+ Thread.yield();
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "Server=" + serverID, e);
+ return false;
+ }
+ log.info(server.toString());
+ AdempiereServerGroup.get().dump();
+ if (server == null)
+ return false;
+ return server.isAlive();
+ } // startIt
+
+ /**
+ * Stop all Servers
+ * @return true if stopped
+ */
+ public boolean stopAll()
+ {
+ log.info ("");
+ AdempiereServer[] servers = getActive();
+ // Interrupt
+ for (int i = 0; i < servers.length; i++)
+ {
+ AdempiereServer server = servers[i];
+ try
+ {
+ if (server.isAlive() && !server.isInterrupted())
+ {
+ server.setPriority(Thread.MAX_PRIORITY-1);
+ server.interrupt();
+ }
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "(interrupting) - " + server, e);
+ }
+ } // for all servers
+ Thread.yield();
+
+ // Wait for death
+ for (int i = 0; i < servers.length; i++)
+ {
+ AdempiereServer server = servers[i];
+ try
+ {
+ int maxWait = 10; // 10 iterations = 1 sec
+ while (server.isAlive())
+ {
+ if (maxWait-- == 0)
+ {
+ log.severe ("Wait timeout for interruped " + server);
+ break;
+ }
+ Thread.sleep(100); // 1/10
+ }
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "(waiting) - " + server, e);
+ }
+ } // for all servers
+
+ // Final Check
+ int noRunning = 0;
+ int noStopped = 0;
+ for (int i = 0; i < servers.length; i++)
+ {
+ AdempiereServer server = servers[i];
+ try
+ {
+ if (server.isAlive())
+ {
+ log.warning ("Alive: " + server);
+ noRunning++;
+ }
+ else
+ {
+ log.info ("Stopped: " + server);
+ noStopped++;
+ }
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "(checking) - " + server, e);
+ noRunning++;
+ }
+ }
+ log.fine("Running=" + noRunning + ", Stopped=" + noStopped);
+ AdempiereServerGroup.get().dump();
+ return noRunning == 0;
+ } // stopAll
+
+ /**
+ * Stop Server if not stopped
+ * @param serverID server ID
+ * @return true if interrupted
+ */
+ public boolean stop (String serverID)
+ {
+ AdempiereServer server = getServer(serverID);
+ if (server == null)
+ return false;
+ if (!server.isAlive())
+ return true;
+
+ try
+ {
+ server.interrupt();
+ Thread.sleep(10); // 1/100 sec
+ }
+ catch (Exception e)
+ {
+ log.log(Level.SEVERE, "stop", e);
+ return false;
+ }
+ log.info(server.toString());
+ AdempiereServerGroup.get().dump();
+ return !server.isAlive();
+ } // stop
+
+
+ /**
+ * Destroy
+ */
+ public void destroy ()
+ {
+ log.info ("");
+ stopAll();
+ m_servers.clear();
+ } // destroy
+
+ /**
+ * Get Active Servers
+ * @return array of active servers
+ */
+ protected AdempiereServer[] getActive()
+ {
+ ArrayList<AdempiereServer> list = new ArrayList<AdempiereServer>();
+ for (int i = 0; i < m_servers.size(); i++)
+ {
+ AdempiereServer server = (AdempiereServer)m_servers.get(i);
+ if (server != null && server.isAlive() && !server.isInterrupted())
+ list.add (server);
+ }
+ AdempiereServer[] retValue = new AdempiereServer[list.size ()];
+ list.toArray (retValue);
+ return retValue;
+ } // getActive
+
+ /**
+ * Get InActive Servers
+ * @return array of inactive servers
+ */
+ protected AdempiereServer[] getInActive()
+ {
+ ArrayList<AdempiereServer> list = new ArrayList<AdempiereServer>();
+ for (int i = 0; i < m_servers.size(); i++)
+ {
+ AdempiereServer server = (AdempiereServer)m_servers.get(i);
+ if (server != null && (!server.isAlive() || !server.isInterrupted()))
+ list.add (server);
+ }
+ AdempiereServer[] retValue = new AdempiereServer[list.size()];
+ list.toArray (retValue);
+ return retValue;
+ } // getInActive
+
+ /**
+ * Get all Servers
+ * @return array of servers
+ */
+ public AdempiereServer[] getAll()
+ {
+ AdempiereServer[] retValue = new AdempiereServer[m_servers.size()];
+ m_servers.toArray (retValue);
+ return retValue;
+ } // getAll
+
+ /**
+ * Get Server with ID
+ * @param serverID server id
+ * @return server or null
+ */
+ public AdempiereServer getServer (String serverID)
+ {
+ if (serverID == null)
+ return null;
+ for (int i = 0; i < m_servers.size(); i++)
+ {
+ AdempiereServer server = (AdempiereServer)m_servers.get(i);
+ if (serverID.equals(server.getServerID()))
+ return server;
+ }
+ return null;
+ } // getServer
+
+ /**
+ * String Representation
+ * @return info
+ */
+ public String toString ()
+ {
+ StringBuffer sb = new StringBuffer ("AdempiereServerMgr[");
+ sb.append("Servers=").append(m_servers.size())
+ .append(",ContextSize=").append(m_ctx.size())
+ .append(",Started=").append(m_start)
+ .append ("]");
+ return sb.toString ();
+ } // toString
+
+ /**
+ * Get Description
+ * @return description
+ */
+ public String getDescription()
+ {
+ return "$Revision: 1.4 $";
+ } // getDescription
+
+ /**
+ * Get Number Servers
+ * @return no of servers
+ */
+ public String getServerCount()
+ {
+ int noRunning = 0;
+ int noStopped = 0;
+ for (int i = 0; i < m_servers.size(); i++)
+ {
+ AdempiereServer server = (AdempiereServer)m_servers.get(i);
+ if (server.isAlive())
+ noRunning++;
+ else
+ noStopped++;
+ }
+ String info = String.valueOf(m_servers.size())
+ + " - Running=" + noRunning
+ + " - Stopped=" + noStopped;
+ return info;
+ } // getServerCount
+
+ /**
+ * Get start date
+ * @return start date
+ */
+ public Timestamp getStartTime()
+ {
+ return m_start;
+ } // getStartTime
+
+} // AdempiereServerMgr
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AlertProcessor.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AlertProcessor.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/AlertProcessor.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
@@ -29,7 +29,7 @@
* @author Jorg Janke
* @version $Id: AlertProcessor.java,v 1.4 2006/07/30 00:53:33 jjanke Exp $
*/
-public class AlertProcessor extends CompiereServer
+public class AlertProcessor extends AdempiereServer
{
/**
* Alert Processor
@@ -312,7 +312,7 @@
*/
public static void main (String[] args)
{
- Compiere.startup(true);
+ Adempiere.startup(true);
MAlertProcessor model = new MAlertProcessor (Env.getCtx(), 100, null);
AlertProcessor ap = new AlertProcessor(model);
ap.start();
Deleted: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServer.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServer.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServer.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,388 +0,0 @@
-/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
- * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- * For the text or an alternative of this public license, you may reach us *
- * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
- * or via info@... or http://www.compiere.org/license.html *
- *****************************************************************************/
-package org.compiere.server;
-
-import java.sql.*;
-import java.util.*;
-import java.util.logging.*;
-import org.compiere.ldap.*;
-import org.compiere.model.*;
-import org.compiere.util.*;
-import org.compiere.wf.*;
-
-/**
- * Compiere Server Base
- *
- * @author Jorg Janke
- * @version $Id: CompiereServer.java,v 1.3 2006/10/09 00:23:26 jjanke Exp $
- */
-public abstract class CompiereServer extends Thread
-{
- /**
- * Create New Server Thead
- * @param model model
- * @return server tread or null
- */
- public static CompiereServer create (CompiereProcessor model)
- {
- if (model instanceof MRequestProcessor)
- return new RequestProcessor ((MRequestProcessor)model);
- if (model instanceof MWorkflowProcessor)
- return new WorkflowProcessor ((MWorkflowProcessor)model);
- if (model instanceof MAcctProcessor)
- return new AcctProcessor ((MAcctProcessor)model);
- if (model instanceof MAlertProcessor)
- return new AlertProcessor ((MAlertProcessor)model);
- if (model instanceof MScheduler)
- return new Scheduler ((MScheduler)model);
- if (model instanceof LdapProcessorModel)
- return new LdapProcessor((LdapProcessorModel)model);
- //
- throw new IllegalArgumentException("Unknown Processor");
- } // create
-
-
- /**************************************************************************
- * Server Base Class
- * @param model model
- * @param initialNap delay time running in sec
- */
- protected CompiereServer (CompiereProcessor model, int initialNap)
- {
- super (CompiereServerGroup.get(), null, model.getName(), 0);
- p_model = model;
- m_ctx = new Properties(model.getCtx());
- if (p_system == null)
- p_system = MSystem.get(m_ctx);
- p_client = MClient.get(m_ctx);
- Env.setContext(m_ctx, "#AD_Client_ID", p_client.getAD_Client_ID());
- m_initialNap = initialNap;
- // log.info(model.getName() + " - " + getThreadGroup());
- } // ServerBase
-
- /** The Processor Model */
- protected CompiereProcessor p_model;
- /** Initial nap is seconds */
- private int m_initialNap = 0;
-
- /** Miliseconds to sleep - 10 Min default */
- private long m_sleepMS = 600000;
- /** Sleeping */
- private volatile boolean m_sleeping = false;
- /** Server start time */
- private long m_start = 0;
- /** Number of Work executions */
- protected int p_runCount = 0;
- /** Tine start of work */
- protected long p_startWork = 0;
- /** Number MS of last Run */
- private long m_runLastMS = 0;
- /** Number of MS total */
- private long m_runTotalMS = 0;
- /** When to run next */
- private long m_nextWork = 0;
-
- /** Logger */
- protected CLogger log = CLogger.getCLogger(getClass());
- /** Context */
- private Properties m_ctx = null;
- /** System */
- protected static MSystem p_system = null;
- /** Client */
- protected MClient p_client = null;
-
- /**
- * Get Server Context
- * @return context
- */
- public Properties getCtx()
- {
- return m_ctx;
- } // getCtx
-
- /**
- * @return Returns the sleepMS.
- */
- public long getSleepMS ()
- {
- return m_sleepMS;
- } // getSleepMS
-
-
- /**
- * Sleep for set time
- * @return true if not interrupted
- */
- public boolean sleep()
- {
- if (isInterrupted())
- {
- log.info (getName() + ": interrupted");
- return false;
- }
- log.fine(getName() + ": sleeping " + TimeUtil.formatElapsed(m_sleepMS));
- m_sleeping = true;
- try
- {
- sleep (m_sleepMS);
- }
- catch (InterruptedException e)
- {
- log.info (getName() + ": interrupted");
- m_sleeping = false;
- return false;
- }
- m_sleeping = false;
- return true;
- } // sleep
-
- /**
- * Run Now
- */
- public void runNow()
- {
- log.info(getName());
- p_startWork = System.currentTimeMillis();
- doWork();
- long now = System.currentTimeMillis();
- // ---------------
-
- p_runCount++;
- m_runLastMS = now - p_startWork;
- m_runTotalMS += m_runLastMS;
- //
- p_model.setDateLastRun(new Timestamp(now));
- p_model.save();
- //
- log.fine(getName() + ": " + getStatistics());
- } // runNow
-
- /**************************************************************************
- * Run async
- */
- public void run ()
- {
- try
- {
- log.fine(getName() + ": pre-nap - " + m_initialNap);
- sleep (m_initialNap * 1000);
- }
- catch (InterruptedException e)
- {
- log.log(Level.SEVERE, getName() + ": pre-nap interrupted", e);
- return;
- }
-
- m_start = System.currentTimeMillis();
- while (true)
- {
- if (m_nextWork == 0)
- {
- Timestamp dateNextRun = getDateNextRun(true);
- if (dateNextRun != null)
- m_nextWork = dateNextRun.getTime();
- }
- long now = System.currentTimeMillis();
- if (m_nextWork > now)
- {
- m_sleepMS = m_nextWork - now;
- if (!sleep ())
- break;
- }
- if (isInterrupted())
- {
- log.info (getName() + ": interrupted");
- break;
- }
-
- // ---------------
- p_startWork = System.currentTimeMillis();
- doWork();
- now = System.currentTimeMillis();
- // ---------------
-
- p_runCount++;
- m_runLastMS = now - p_startWork;
- m_runTotalMS += m_runLastMS;
- //
- m_sleepMS = calculateSleep();
- m_nextWork = now + m_sleepMS;
- //
- p_model.setDateLastRun(new Timestamp(now));
- p_model.setDateNextRun(new Timestamp(m_nextWork));
- p_model.save();
- //
- log.fine(getName() + ": " + getStatistics());
- if (!sleep())
- break;
- }
- m_start = 0;
- } // run
-
- /**
- * Get Run Statistics
- * @return Statistic info
- */
- public String getStatistics()
- {
- return "Run #" + p_runCount
- + " - Last=" + TimeUtil.formatElapsed(m_runLastMS)
- + " - Total=" + TimeUtil.formatElapsed(m_runTotalMS)
- + " - Next " + TimeUtil.formatElapsed(m_nextWork - System.currentTimeMillis());
- } // getStatistics
-
- /**
- * Do the actual Work
- */
- protected abstract void doWork();
-
- /**
- * Get Server Info
- * @return info
- */
- public abstract String getServerInfo();
-
- /**
- * Get Unique ID
- * @return Unique ID
- */
- public String getServerID()
- {
- return p_model.getServerID();
- } // getServerID
-
- /**
- * Get the date Next run
- * @param requery requery database
- * @return date next run
- */
- public Timestamp getDateNextRun (boolean requery)
- {
- return p_model.getDateNextRun(requery);
- } // getDateNextRun
-
- /**
- * Get the date Last run
- * @return date lext run
- */
- public Timestamp getDateLastRun ()
- {
- return p_model.getDateLastRun();
- } // getDateLastRun
-
- /**
- * Get Description
- * @return Description
- */
- public String getDescription()
- {
- return p_model.getDescription();
- } // getDescription
-
- /**
- * Get Model
- * @return Model
- */
- public CompiereProcessor getModel()
- {
- return p_model;
- } // getModel
-
- /**
- * Calculate Sleep ms
- * @return miliseconds
- */
- private long calculateSleep ()
- {
- String frequencyType = p_model.getFrequencyType();
- int frequency = p_model.getFrequency();
- if (frequency < 1)
- frequency = 1;
- //
- long typeSec = 600; // 10 minutes
- if (frequencyType == null)
- typeSec = 300; // 5 minutes
- else if (X_R_RequestProcessor.FREQUENCYTYPE_Minute.equals(frequencyType))
- typeSec = 60;
- else if (X_R_RequestProcessor.FREQUENCYTYPE_Hour.equals(frequencyType))
- typeSec = 3600;
- else if (X_R_RequestProcessor.FREQUENCYTYPE_Day.equals(frequencyType))
- typeSec = 86400;
- //
- return typeSec * 1000 * frequency; // ms
- } // calculateSleep
-
- /**
- * Is Sleeping
- * @return sleeping
- */
- public boolean isSleeping()
- {
- return m_sleeping;
- } // isSleeping
-
- /**
- * String Representation
- * @return info
- */
- public String toString ()
- {
- StringBuffer sb = new StringBuffer (getName())
- .append (",Prio=").append(getPriority())
- .append (",").append (getThreadGroup())
- .append (",Alive=").append(isAlive())
- .append (",Sleeping=").append(m_sleeping)
- .append (",Last=").append(getDateLastRun());
- if (m_sleeping)
- sb.append (",Next=").append(getDateNextRun(false));
- return sb.toString ();
- } // toString
-
- /**
- * Get Seconds Alive
- * @return seconds alive
- */
- public int getSecondsAlive()
- {
- if (m_start == 0)
- return 0;
- long now = System.currentTimeMillis();
- long ms = (now-m_start) / 1000;
- return (int)ms;
- } // getSecondsAlive
-
- /**
- * Get Start Time
- * @return start time
- */
- public Timestamp getStartTime()
- {
- if (m_start == 0)
- return null;
- return new Timestamp (m_start);
- } // getStartTime
-
- /**
- * Get Processor Logs
- * @return logs
- */
- public CompiereProcessorLog[] getLogs()
- {
- return p_model.getLogs();
- } // getLogs
-
-} // CompiereServer
Deleted: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerGroup.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerGroup.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerGroup.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,90 +0,0 @@
-/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
- * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- * For the text or an alternative of this public license, you may reach us *
- * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
- * or via info@... or http://www.compiere.org/license.html *
- *****************************************************************************/
-package org.compiere.server;
-
-import org.compiere.util.*;
-
-/**
- * Compiere Server Group
- *
- * @author Jorg Janke
- * @version $Id: CompiereServerGroup.java,v 1.2 2006/07/30 00:53:33 jjanke Exp $
- */
-public class CompiereServerGroup extends ThreadGroup
-{
- /**
- * Get Compiere Server Group
- * @return Server Group
- */
- public static CompiereServerGroup get()
- {
- if (s_group == null || s_group.isDestroyed())
- s_group = new CompiereServerGroup();
- return s_group;
- } // get
-
- /** Group */
- private static CompiereServerGroup s_group = null;
-
- /**
- * CompiereServerGroup
- */
- private CompiereServerGroup ()
- {
- super ("CompiereServers");
- setDaemon(true);
- setMaxPriority(Thread.MAX_PRIORITY);
- log.info(getName() + " - Parent=" + getParent());
- } // CompiereServerGroup
-
- /** Logger */
- protected CLogger log = CLogger.getCLogger(getClass());
-
- /**
- * Uncaught Exception
- * @param t thread
- * @param e exception
- */
- public void uncaughtException (Thread t, Throwable e)
- {
- log.info ("uncaughtException = " + e.toString());
- super.uncaughtException (t, e);
- } // uncaughtException
-
- /**
- * String Representation
- * @return name
- */
- public String toString ()
- {
- return getName();
- } // toString
-
- /**
- * Dump Info
- */
- public void dump ()
- {
- log.fine(getName() + (isDestroyed() ? " (destroyed)" : ""));
- log.fine("- Parent=" + getParent());
- Thread[] list = new Thread[activeCount()];
- log.fine("- Count=" + enumerate(list, true));
- for (int i = 0; i < list.length; i++)
- log.fine("-- " + list[i]);
- } // dump
-
-} // CompiereServerGroup
Deleted: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerMgr.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerMgr.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/CompiereServerMgr.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,532 +0,0 @@
-/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
- * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
- * This program is free software; you can redistribute it and/or modify it *
- * under the terms version 2 of the GNU General Public License as published *
- * by the Free Software Foundation. This program is distributed in the hope *
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
- * See the GNU General Public License for more details. *
- * You should have received a copy of the GNU General Public License along *
- * with this program; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
- * For the text or an alternative of this public license, you may reach us *
- * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
- * or via info@... or http://www.compiere.org/license.html *
- *****************************************************************************/
-package org.compiere.server;
-
-import java.sql.*;
-import java.util.*;
-import java.util.logging.*;
-import org.compiere.*;
-import org.compiere.ldap.*;
-import org.compiere.model.*;
-import org.compiere.util.*;
-import org.compiere.wf.*;
-
-/**
- * Compiere Server Manager
- *
- * @author Jorg Janke
- * @version $Id: CompiereServerMgr.java,v 1.4 2006/10/09 00:23:26 jjanke Exp $
- */
-public class CompiereServerMgr
-{
- /**
- * Get Compiere Server Manager
- * @return mgr
- */
- public static CompiereServerMgr get()
- {
- if (m_serverMgr == null)
- {
- // for faster subsequent calls
- m_serverMgr = new CompiereServerMgr();
- m_serverMgr.startServers();
- m_serverMgr.log.info(m_serverMgr.toString());
- }
- return m_serverMgr;
- } // get
-
- /** Singleton */
- private static CompiereServerMgr m_serverMgr = null;
- /** Logger */
- protected CLogger log = CLogger.getCLogger(getClass());
-
- /**************************************************************************
- * Compiere Server Manager
- */
- private CompiereServerMgr ()
- {
- super();
- startEnvironment();
- // m_serverMgr.startServers();
- } // CompiereServerMgr
-
- /** The Servers */
- private ArrayList<CompiereServer> m_servers = new ArrayList<CompiereServer>();
- /** Context */
- private Properties m_ctx = Env.getCtx();
- /** Start */
- private Timestamp m_start = new Timestamp(System.currentTimeMillis());
-
- /**
- * Start Environment
- * @return true if started
- */
- private boolean startEnvironment()
- {
- Compiere.startup(false);
- log.info("");
-
- // Set Session
- MSession session = MSession.get(getCtx(), true);
- session.setWebStoreSession(false);
- session.setWebSession("Server");
- session.save();
- //
- return true;
- } // startEnvironment
-
- /**
- * Start Environment
- * @return true if started
- */
- private boolean startServers()
- {
- log.info("");
- int noServers = 0;
- // Accounting
- MAcctProcessor[] acctModels = MAcctProcessor.getActive(m_ctx);
- for (int i = 0; i < acctModels.length; i++)
- {
- MAcctProcessor pModel = acctModels[i];
- CompiereServer server = CompiereServer.create(pModel);
- server.start();
- server.setPriority(Thread.NORM_PRIORITY-2);
- m_servers.add(server);
- }
- // Request
- MRequestProcessor[] requestModels = MRequestProcessor.getActive(m_ctx);
- for (int i = 0; i < requestModels.length; i++)
- {
- MRequestProcessor pModel = requestModels[i];
- CompiereServer server = CompiereServer.create(pModel);
- server.start();
- server.setPriority(Thread.NORM_PRIORITY-2);
- m_servers.add(server);
- }
- // Workflow
- MWorkflowProcessor[] workflowModels = MWorkflowProcessor.getActive(m_ctx);
- for (int i = 0; i < workflowModels.length; i++)
- {
- MWorkflowProcessor pModel = workflowModels[i];
- CompiereServer server = CompiereServer.create(pModel);
- server.start();
- server.setPriority(Thread.NORM_PRIORITY-2);
- m_servers.add(server);
- }
- // Alert
- MAlertProcessor[] alertModels = MAlertProcessor.getActive(m_ctx);
- for (int i = 0; i < alertModels.length; i++)
- {
- MAlertProcessor pModel = alertModels[i];
- CompiereServer server = CompiereServer.create(pModel);
- server.start();
- server.setPriority(Thread.NORM_PRIORITY-2);
- m_servers.add(server);
- }
- // Scheduler
- MScheduler[] schedulerModels = MScheduler.getActive(m_ctx);
- for (int i = 0; i < schedulerModels.length; i++)
- {
- MScheduler pModel = schedulerModels[i];
- CompiereServer server = CompiereServer.create(pModel);
- server.start();
- server.setPriority(Thread.NORM_PRIORITY-2);
- m_servers.add(server);
- }
- // LDAP
- LdapProcessorModel lp = new LdapProcessorModel(m_ctx);
- CompiereServer server = CompiereServer.create(lp);
- server.start();
- server.setPriority(Thread.NORM_PRIORITY-2);
- m_servers.add(server);
-
-
- log.fine("#" + noServers);
- return startAll();
- } // startEnvironment
-
- /**
- * Get Server Context
- * @return ctx
- */
- public Properties getCtx()
- {
- return m_ctx;
- } // getCtx
-
- /**
- * Start all servers
- * @return true if started
- */
- public boolean startAll()
- {
- log.info ("");
- CompiereServer[] servers = getInActive();
- for (int i = 0; i < servers.length; i++)
- {
- CompiereServer server = servers[i];
- try
- {
- if (server.isAlive())
- continue;
- // Wait until dead
- if (server.isInterrupted())
- {
- int maxWait = 10; // 10 iterations = 1 sec
- while (server.isAlive())
- {
- if (maxWait-- == 0)
- {
- log.severe ("Wait timeout for interruped " + server);
- break;
- }
- try
- {
- Thread.sleep(100); // 1/10 sec
- }
- catch (InterruptedException e)
- {
- log.log(Level.SEVERE, "While sleeping", e);
- }
- }
- }
- // Do start
- if (!server.isAlive())
- {
- // replace
- server = CompiereServer.create (server.getModel());
- if (server == null)
- m_servers.remove(i);
- else
- m_servers.set(i, server);
- server.start();
- server.setPriority(Thread.NORM_PRIORITY-2);
- }
- }
- catch (Exception e)
- {
- log.log(Level.SEVERE, "Server: " + server, e);
- }
- } // for all servers
-
- // Final Check
- int noRunning = 0;
- int noStopped = 0;
- for (int i = 0; i < servers.length; i++)
- {
- CompiereServer server = servers[i];
- try
- {
- if (server.isAlive())
- {
- log.info("Alive: " + server);
- noRunning++;
- }
- else
- {
- log.warning("Dead: " + server);
- noStopped++;
- }
- }
- catch (Exception e)
- {
- log.log(Level.SEVERE, "(checking) - " + server, e);
- noStopped++;
- }
- }
- log.fine("Running=" + noRunning + ", Stopped=" + noStopped);
- CompiereServerGroup.get().dump();
- return noStopped == 0;
- } // startAll
-
- /**
- * Start Server if not started yet
- * @param serverID server ID
- * @return true if started
- */
- public boolean start (String serverID)
- {
- CompiereServer server = getServer(serverID);
- if (server == null)
- return false;
- if (server.isAlive())
- return true;
-
- try
- {
- // replace
- int index = m_servers.indexOf(server);
- server = CompiereServer.create (server.getModel());
- if (server == null)
- m_servers.remove(index);
- else
- m_servers.set(index, server);
- server.start();
- server.setPriority(Thread.NORM_PRIORITY-2);
- Thread.yield();
- }
- catch (Exception e)
- {
- log.log(Level.SEVERE, "Server=" + serverID, e);
- return false;
- }
- log.info(server.toString());
- CompiereServerGroup.get().dump();
- if (server == null)
- return false;
- return server.isAlive();
- } // startIt
-
- /**
- * Stop all Servers
- * @return true if stopped
- */
- public boolean stopAll()
- {
- log.info ("");
- CompiereServer[] servers = getActive();
- // Interrupt
- for (int i = 0; i < servers.length; i++)
- {
- CompiereServer server = servers[i];
- try
- {
- if (server.isAlive() && !server.isInterrupted())
- {
- server.setPriority(Thread.MAX_PRIORITY-1);
- server.interrupt();
- }
- }
- catch (Exception e)
- {
- log.log(Level.SEVERE, "(interrupting) - " + server, e);
- }
- } // for all servers
- Thread.yield();
-
- // Wait for death
- for (int i = 0; i < servers.length; i++)
- {
- CompiereServer server = servers[i];
- try
- {
- int maxWait = 10; // 10 iterations = 1 sec
- while (server.isAlive())
- {
- if (maxWait-- == 0)
- {
- log.severe ("Wait timeout for interruped " + server);
- break;
- }
- Thread.sleep(100); // 1/10
- }
- }
- catch (Exception e)
- {
- log.log(Level.SEVERE, "(waiting) - " + server, e);
- }
- } // for all servers
-
- // Final Check
- int noRunning = 0;
- int noStopped = 0;
- for (int i = 0; i < servers.length; i++)
- {
- CompiereServer server = servers[i];
- try
- {
- if (server.isAlive())
- {
- log.warning ("Alive: " + server);
- noRunning++;
- }
- else
- {
- log.info ("Stopped: " + server);
- noStopped++;
- }
- }
- catch (Exception e)
- {
- log.log(Level.SEVERE, "(checking) - " + server, e);
- noRunning++;
- }
- }
- log.fine("Running=" + noRunning + ", Stopped=" + noStopped);
- CompiereServerGroup.get().dump();
- return noRunning == 0;
- } // stopAll
-
- /**
- * Stop Server if not stopped
- * @param serverID server ID
- * @return true if interrupted
- */
- public boolean stop (String serverID)
- {
- CompiereServer server = getServer(serverID);
- if (server == null)
- return false;
- if (!server.isAlive())
- return true;
-
- try
- {
- server.interrupt();
- Thread.sleep(10); // 1/100 sec
- }
- catch (Exception e)
- {
- log.log(Level.SEVERE, "stop", e);
- return false;
- }
- log.info(server.toString());
- CompiereServerGroup.get().dump();
- return !server.isAlive();
- } // stop
-
-
- /**
- * Destroy
- */
- public void destroy ()
- {
- log.info ("");
- stopAll();
- m_servers.clear();
- } // destroy
-
- /**
- * Get Active Servers
- * @return array of active servers
- */
- protected CompiereServer[] getActive()
- {
- ArrayList<CompiereServer> list = new ArrayList<CompiereServer>();
- for (int i = 0; i < m_servers.size(); i++)
- {
- CompiereServer server = (CompiereServer)m_servers.get(i);
- if (server != null && server.isAlive() && !server.isInterrupted())
- list.add (server);
- }
- CompiereServer[] retValue = new CompiereServer[list.size ()];
- list.toArray (retValue);
- return retValue;
- } // getActive
-
- /**
- * Get InActive Servers
- * @return array of inactive servers
- */
- protected CompiereServer[] getInActive()
- {
- ArrayList<CompiereServer> list = new ArrayList<CompiereServer>();
- for (int i = 0; i < m_servers.size(); i++)
- {
- CompiereServer server = (CompiereServer)m_servers.get(i);
- if (server != null && (!server.isAlive() || !server.isInterrupted()))
- list.add (server);
- }
- CompiereServer[] retValue = new CompiereServer[list.size()];
- list.toArray (retValue);
- return retValue;
- } // getInActive
-
- /**
- * Get all Servers
- * @return array of servers
- */
- public CompiereServer[] getAll()
- {
- CompiereServer[] retValue = new CompiereServer[m_servers.size()];
- m_servers.toArray (retValue);
- return retValue;
- } // getAll
-
- /**
- * Get Server with ID
- * @param serverID server id
- * @return server or null
- */
- public CompiereServer getServer (String serverID)
- {
- if (serverID == null)
- return null;
- for (int i = 0; i < m_servers.size(); i++)
- {
- CompiereServer server = (CompiereServer)m_servers.get(i);
- if (serverID.equals(server.getServerID()))
- return server;
- }
- return null;
- } // getServer
-
- /**
- * String Representation
- * @return info
- */
- public String toString ()
- {
- StringBuffer sb = new StringBuffer ("CompiereServerMgr[");
- sb.append("Servers=").append(m_servers.size())
- .append(",ContextSize=").append(m_ctx.size())
- .append(",Started=").append(m_start)
- .append ("]");
- return sb.toString ();
- } // toString
-
- /**
- * Get Description
- * @return description
- */
- public String getDescription()
- {
- return "$Revision: 1.4 $";
- } // getDescription
-
- /**
- * Get Number Servers
- * @return no of servers
- */
- public String getServerCount()
- {
- int noRunning = 0;
- int noStopped = 0;
- for (int i = 0; i < m_servers.size(); i++)
- {
- CompiereServer server = (CompiereServer)m_servers.get(i);
- if (server.isAlive())
- noRunning++;
- else
- noStopped++;
- }
- String info = String.valueOf(m_servers.size())
- + " - Running=" + noRunning
- + " - Stopped=" + noStopped;
- return info;
- } // getServerCount
-
- /**
- * Get start date
- * @return start date
- */
- public Timestamp getStartTime()
- {
- return m_start;
- } // getStartTime
-
-} // CompiereServerMgr
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/EMailProcessor.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/EMailProcessor.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/EMailProcessor.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
@@ -192,7 +192,7 @@
workflowFolder.open(Folder.READ_WRITE);
// Open Error
- Folder errorFolder = folder.getFolder("CompiereError");
+ Folder errorFolder = folder.getFolder("AdempiereError");
if (!errorFolder.exists() && !errorFolder.create(Folder.HOLDS_MESSAGES))
throw new IllegalStateException("Cannot create Error Folder");
errorFolder.open(Folder.READ_WRITE);
@@ -459,7 +459,7 @@
if (deliveryMessage == null)
return null;
- // Final-Recipient: RFC822; jjanke@...
+ // Final-Recipient: RFC822; jjanke@...
int index = deliveryMessage.indexOf("Final-Recipient:");
if (index != -1)
{
@@ -687,13 +687,13 @@
*/
public static void main (String[] args)
{
- Compiere.startupEnvironment(true);
- EMailProcessor m = new EMailProcessor("admin", "test", "testcompiere");
+ Adempiere.startupEnvironment(true);
+ EMailProcessor m = new EMailProcessor("admin", "test", "testadempiere");
m.processMessages();
- // System.out.println(EMailServer.send("main", "jjanke@...", "jjanke@...", "test1", "test1 message"));
- // System.out.println(EMailServer.send("main", "administrator@...", "jjanke@...", "test2", "test2 message"));
- // System.out.println(EMailServer.send("main", "jjanke@...", "jjanke@...", "test3", "test3 message"));
+ // System.out.println(EMailServer.send("main", "jjanke@...", "jjanke@...", "test1", "test1 message"));
+ // System.out.println(EMailServer.send("main", "administrator@...", "jjanke@...", "test2", "test2 message"));
+ // System.out.println(EMailServer.send("main", "jjanke@...", "jjanke@...", "test3", "test3 message"));
} // main
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/RequestProcessor.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/RequestProcessor.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/RequestProcessor.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
@@ -29,7 +29,7 @@
* @author Jorg Janke
* @version $Id: RequestProcessor.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
*/
-public class RequestProcessor extends CompiereServer
+public class RequestProcessor extends AdempiereServer
{
/**
* RequestProcessor
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/Scheduler.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/Scheduler.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/Scheduler.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,5 +1,5 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
@@ -32,7 +32,7 @@
* @author Jorg Janke
* @version $Id: Scheduler.java,v 1.5 2006/07/30 00:53:33 jjanke Exp $
*/
-public class Scheduler extends CompiereServer
+public class Scheduler extends AdempiereServer
{
/**
* Scheduler
Modified: branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/WorkflowProcessor.java
===================================================================
--- branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/WorkflowProcessor.java 2006-10-20 09:10:58 UTC (rev 538)
+++ branches/adempiere_branch_3.1.1/serverRoot/src/main/server/org/compiere/server/WorkflowProcessor.java 2006-10-20 09:11:46 UTC (rev 539)
@@ -1,6 +1,6 @@
/******************************************************************************
- * Product: Compiere ERP & CRM Smart Business Solution *
- * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
+ * Product: Adempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2006 Compiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
@@ -11,7 +11,7 @@
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
- * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * Compiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@... or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.server;
@@ -33,7 +33,7 @@
* @author Jorg Janke
* @version $Id: WorkflowProcessor.java,v 1.4 2006/07/30 00:53:33 jjanke Exp $
*/
-public class WorkflowProcessor extends CompiereServer
+public class WorkflowProcessor extends AdempiereServer
{
/**
* WorkflowProcessor
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|