Author: jleroux
Date: Mon Aug 11 09:14:23 2014 New Revision: 1617233 URL: http://svn.apache.org/r1617233 Log: Keeps in sync with OFBiz trunk HEAD Added: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceSynchronization.java - copied unchanged from r1617228, ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceSynchronization.java Removed: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/config/wfs.properties ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/script/ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/event/WfsEventHandler.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/view/WfsViewHandler.java Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ (props changed) ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/BshUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilJ2eeCompat.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/collections/MapStack.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/lib/tomcat-extras-7.0.55-tomcat-juli.jar ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericDelegator.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelReader.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/LocalDispatcher.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ModelServiceReader.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceContainer.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceXaWrapper.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/appserver/README Propchange: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1615494-1617228 Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java Mon Aug 11 09:14:23 2014 @@ -24,8 +24,6 @@ import java.util.Locale; import java.util.Map; import java.util.Properties; -import javax.transaction.xa.XAException; - import javolution.util.FastMap; import org.ofbiz.base.util.Debug; @@ -48,7 +46,6 @@ import org.ofbiz.service.GenericServiceE import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; import org.ofbiz.service.ServiceUtil; -import org.ofbiz.service.ServiceXaWrapper; /** * ValueLinkServices - Integration with ValueLink Gift Cards @@ -792,13 +789,11 @@ public class ValueLinkServices { // Activate/Rollback is not supported by valuelink if (!vlInterface.equals("Activate")) { // create the listener - ServiceXaWrapper xaw = new ServiceXaWrapper(dctx); - xaw.setRollbackService("vlTimeOutReversal", context); - //xaw.setCommitService("vlTimeOutReversal", context); Debug.logInfo("Set 704 context : " + context, module); try { - xaw.enlist(); - } catch (XAException e) { + dctx.getDispatcher().addRollbackService("vlTimeOutReversal", context, false); + //dctx.getDispatcher().addCommitService("vlTimeOutReversal", context, false); + } catch (GenericServiceException e) { Debug.logError(e, "Unable to setup 0704 Timeout Reversal", module); } } @@ -1214,14 +1209,10 @@ public class ValueLinkServices { } if (!failure) { - // set the void on rollback wrapper - ServiceXaWrapper xaw = new ServiceXaWrapper(dctx); - activateCtx.put("cardNumber", activateResult.get("cardNumber")); - activateCtx.put("pin", activateResult.get("pin")); - xaw.setRollbackService("voidActivateGiftCard", activateCtx); + // set the void on rollback try { - xaw.enlist(); - } catch (XAException e) { + dispatcher.addRollbackService("voidActivateGiftCard", activateCtx, false); + } catch (GenericServiceException e) { Debug.logError(e, "Unable to setup Activate/Void on error", module); } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Aug 11 09:14:23 2014 @@ -3633,14 +3633,6 @@ public class OrderServices { "OrderShoppingCartEmpty", locale)); } - // go through the item attributes map once to get a list of key names - Set<String> attributeNames =FastSet.newInstance(); - Set<String> keys = itemAttributesMap.keySet(); - for (String key : keys) { - String[] attributeInfo = key.split(":"); - attributeNames.add(attributeInfo[0]); - } - // go through the item map and obtain the totals per item Map<String, BigDecimal> itemTotals = new HashMap<String, BigDecimal>(); for (String key : itemQtyMap.keySet()) { @@ -3720,6 +3712,14 @@ public class OrderServices { // update the order item attributes if (itemAttributesMap != null) { + // go through the item attributes map once to get a list of key names + Set<String> attributeNames =FastSet.newInstance(); + Set<String> keys = itemAttributesMap.keySet(); + for (String key : keys) { + String[] attributeInfo = key.split(":"); + attributeNames.add(attributeInfo[0]); + } + String attrValue = null; for (String attrName : attributeNames) { attrValue = itemAttributesMap.get(attrName + ":" + itemSeqId); @@ -3735,31 +3735,35 @@ public class OrderServices { } } // Create Estimated Delivery dates - for (Map.Entry<String, String> entry : itemEstimatedDeliveryDateMap.entrySet()) { - String itemSeqId = entry.getKey(); - - // ignore internationalised variant of dates - if (!itemSeqId.endsWith("_i18n")) { - String estimatedDeliveryDate = entry.getValue(); - if (UtilValidate.isNotEmpty(estimatedDeliveryDate)) { - Timestamp deliveryDate = Timestamp.valueOf(estimatedDeliveryDate); - ShoppingCartItem cartItem = cart.findCartItem(itemSeqId); - cartItem.setDesiredDeliveryDate(deliveryDate); + if (null != itemEstimatedDeliveryDateMap) { + for (Map.Entry<String, String> entry : itemEstimatedDeliveryDateMap.entrySet()) { + String itemSeqId = entry.getKey(); + + // ignore internationalised variant of dates + if (!itemSeqId.endsWith("_i18n")) { + String estimatedDeliveryDate = entry.getValue(); + if (UtilValidate.isNotEmpty(estimatedDeliveryDate)) { + Timestamp deliveryDate = Timestamp.valueOf(estimatedDeliveryDate); + ShoppingCartItem cartItem = cart.findCartItem(itemSeqId); + cartItem.setDesiredDeliveryDate(deliveryDate); + } } } } // Create Estimated ship dates - for (Map.Entry<String, String> entry : itemEstimatedShipDateMap.entrySet()) { - String itemSeqId = entry.getKey(); - - // ignore internationalised variant of dates - if (!itemSeqId.endsWith("_i18n")) { - String estimatedShipDate = entry.getValue(); - if (UtilValidate.isNotEmpty(estimatedShipDate)) { - Timestamp shipDate = Timestamp.valueOf(estimatedShipDate); - ShoppingCartItem cartItem = cart.findCartItem(itemSeqId); - cartItem.setEstimatedShipDate(shipDate); + if (null != itemEstimatedShipDateMap) { + for (Map.Entry<String, String> entry : itemEstimatedShipDateMap.entrySet()) { + String itemSeqId = entry.getKey(); + + // ignore internationalised variant of dates + if (!itemSeqId.endsWith("_i18n")) { + String estimatedShipDate = entry.getValue(); + if (UtilValidate.isNotEmpty(estimatedShipDate)) { + Timestamp shipDate = Timestamp.valueOf(estimatedShipDate); + ShoppingCartItem cartItem = cart.findCartItem(itemSeqId); + cartItem.setEstimatedShipDate(shipDate); + } } } } @@ -3776,6 +3780,7 @@ public class OrderServices { } String[] itemInfo = key.split(":"); + @SuppressWarnings("unused") int groupIdx = -1; try { groupIdx = Integer.parseInt(itemInfo[1]); @@ -3787,10 +3792,10 @@ public class OrderServices { // set the group qty ShoppingCartItem cartItem = cart.findCartItem(itemInfo[0]); if (cartItem != null) { - Debug.logInfo("Shipping info (before) for group #" + (groupIdx-1) + " [" + cart.getShipmentMethodTypeId(groupIdx-1) + " / " + cart.getCarrierPartyId(groupIdx-1) + "]", module); - cart.setItemShipGroupQty(cartItem, groupQty, groupIdx - 1); - Debug.logInfo("Set ship group qty: [" + itemInfo[0] + " / " + itemInfo[1] + " (" + (groupIdx-1) + ")] " + groupQty, module); - Debug.logInfo("Shipping info (after) for group #" + (groupIdx-1) + " [" + cart.getShipmentMethodTypeId(groupIdx-1) + " / " + cart.getCarrierPartyId(groupIdx-1) + "]", module); + Debug.logInfo("Shipping info (before) for group #" + (groupIdx-1) + " [" + cart.getShipmentMethodTypeId(groupIdx-1) + " / " + cart.getCarrierPartyId(groupIdx-1) + "]", module); + cart.setItemShipGroupQty(cartItem, groupQty, groupIdx - 1); + Debug.logInfo("Set ship group qty: [" + itemInfo[0] + " / " + itemInfo[1] + " (" + (groupIdx-1) + ")] " + groupQty, module); + Debug.logInfo("Shipping info (after) for group #" + (groupIdx-1) + " [" + cart.getShipmentMethodTypeId(groupIdx-1) + " / " + cart.getCarrierPartyId(groupIdx-1) + "]", module); } } @@ -4053,7 +4058,7 @@ public class OrderServices { cart.setItemShipGroupEstimate(shippingTotal, gi); } - // calc the sales tax + // calc the sales tax CheckOutHelper coh = new CheckOutHelper(dispatcher, delegator, cart); if (calcTax) { try { @@ -4103,7 +4108,7 @@ public class OrderServices { for (GenericValue stored: toStore) { if ("OrderAdjustment".equals(stored.getEntityName())) { if (("SHIPPING_CHARGES".equals(stored.get("orderAdjustmentTypeId")) || - "SALES_TAX".equals(stored.get("orderAdjustmentTypeId"))) && + "SALES_TAX".equals(stored.get("orderAdjustmentTypeId"))) && stored.get("orderId").equals(orderId) && stored.get("shipGroupSeqId").equals(shipGroupSeqId)) { // Removing objects from toStore list for old Shipping and Handling Charges Adjustment and Sales Tax Adjustment. @@ -4159,10 +4164,10 @@ public class OrderServices { // get the promo uses and codes for (String promoCodeEntered : cart.getProductPromoCodesEntered()) { - GenericValue orderProductPromoCode = delegator.makeValue("OrderProductPromoCode"); + GenericValue orderProductPromoCode = delegator.makeValue("OrderProductPromoCode"); orderProductPromoCode.set("orderId", orderId); orderProductPromoCode.set("productPromoCodeId", promoCodeEntered); - toStore.add(orderProductPromoCode); + toStore.add(orderProductPromoCode); } for (GenericValue promoUse : cart.makeProductPromoUses()) { promoUse.set("orderId", orderId); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/BshUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/BshUtil.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/BshUtil.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/BshUtil.java Mon Aug 11 09:14:23 2014 @@ -160,10 +160,10 @@ public final class BshUtil { } catch (EvalError ee) { Throwable t = ee.getCause(); if (t == null) { - Debug.logWarning(ee, "WARNING: no cause (from getCause) found for BSH EvalError: " + ee.toString(), module); + Debug.logWarning(ee, "No cause (from getCause) found for BSH EvalError: " + ee.toString(), module); t = ee; } else { - Debug.logError(t, "ERROR: Got cause (from getCause) for BSH EvalError: " + ee.toString(), module); + Debug.logError(t, "Got cause (from getCause) for BSH EvalError: " + ee.toString(), module); } String errMsg = "Error running BSH script at [" + location + "], line [" + ee.getErrorLineNumber() + "]: " + t.toString(); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilJ2eeCompat.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilJ2eeCompat.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilJ2eeCompat.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/UtilJ2eeCompat.java Mon Aug 11 09:14:23 2014 @@ -69,27 +69,27 @@ public class UtilJ2eeCompat { Debug.logInfo("serverInfo: " + serverInfo, module); if (serverInfo.indexOf(RESIN) >= 0) { - Debug.logImportant("Resin detected, disabling the flush on the region render from PageContext for better performance", module); + Debug.logInfo("Resin detected, disabling the flush on the region render from PageContext for better performance", module); doflush = false; } else if (serverInfo.indexOf(REX_IP) >= 0) { - Debug.logImportant("Trade City RexIP detected, using response.getWriter to write text out instead of response.getOutputStream", module); + Debug.logInfo("Trade City RexIP detected, using response.getWriter to write text out instead of response.getOutputStream", module); usestream = false; } else if (serverInfo.indexOf(TOMCAT) >= 0) { - Debug.logImportant("Apache Tomcat detected, using response.getWriter to write text out instead of response.getOutputStream", module); + Debug.logInfo("Apache Tomcat detected, using response.getWriter to write text out instead of response.getOutputStream", module); usestream = false; } else if (serverInfo.indexOf(JRUN) >= 0) { - Debug.logImportant("JRun detected, using response.getWriter to write text out instead of response.getOutputStream", module); + Debug.logInfo("JRun detected, using response.getWriter to write text out instead of response.getOutputStream", module); usestream = false; } else if (serverInfo.indexOf(JETTY) >= 0) { - Debug.logImportant("Jetty detected, using response.getWriter to write text out instead of response.getOutputStream", module); + Debug.logInfo("Jetty detected, using response.getWriter to write text out instead of response.getOutputStream", module); usestream = false; } else if (serverInfo.indexOf(ORION) >= 0) { - Debug.logImportant("Orion detected, using response.getWriter to write text out instead of response.getOutputStream", module); + Debug.logInfo("Orion detected, using response.getWriter to write text out instead of response.getOutputStream", module); usestream = false; - Debug.logImportant("Orion detected, using non-nested JspException", module); + Debug.logInfo("Orion detected, using non-nested JspException", module); nestjspexception = false; } else if (serverInfo.indexOf(WEBSPHERE) >= 0) { - Debug.logImportant("IBM Websphere Application Server detected, using response.getWriter to write text out instead of response.getOutputStream", module); + Debug.logInfo("IBM Websphere Application Server detected, using response.getWriter to write text out instead of response.getOutputStream", module); usestream = false; } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/collections/MapStack.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/collections/MapStack.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/collections/MapStack.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/base/src/org/ofbiz/base/util/collections/MapStack.java Mon Aug 11 09:14:23 2014 @@ -131,7 +131,7 @@ public class MapStack<K> extends MapCont public Object put(K key, Object value) { if ("context".equals(key)) { if (value == null || this != value) { - Debug.logWarning("WARNING: Putting a value in a MapStack with key [context] that is not this MapStack, will be hidden by the current MapStack self-reference: " + value, module); + Debug.logWarning("Putting a value in a MapStack with key [context] that is not this MapStack, will be hidden by the current MapStack self-reference: " + value, module); } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/lib/tomcat-extras-7.0.55-tomcat-juli.jar URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/lib/tomcat-extras-7.0.55-tomcat-juli.jar?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== Binary files - no diff available. Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Mon Aug 11 09:14:23 2014 @@ -237,13 +237,6 @@ public class CatalinaContainer implement } public boolean start() throws ContainerException { - // Start the Tomcat server - try { - tomcat.getServer().start(); - } catch (LifecycleException e) { - throw new ContainerException(e); - } - // load the web applications loadComponents(); @@ -260,6 +253,12 @@ public class CatalinaContainer implement (con.getSecure() ? "secure" : "not-secure") + " [" + con.getProtocolHandlerClassName() + "] started.", module); } } + // Start the Tomcat server + try { + tomcat.getServer().start(); + } catch (LifecycleException e) { + throw new ContainerException(e); + } Debug.logInfo("Started " + ServerInfo.getServerInfo(), module); return true; } @@ -564,7 +563,7 @@ public class CatalinaContainer implement } protected Callable<Context> createContext(final ComponentConfig.WebappInfo appInfo) throws ContainerException { - Debug.logInfo("createContext(" + appInfo.name + ")", module); + Debug.logInfo("Creating context [" + appInfo.name + "]", module); final Engine engine = engines.get(appInfo.server); if (engine == null) { Debug.logWarning("Server with name [" + appInfo.server + "] not found; not mounting [" + appInfo.name + "]", module); @@ -607,7 +606,6 @@ public class CatalinaContainer implement public Context call() throws ContainerException, LifecycleException { StandardContext context = configureContext(engine, host, appInfo); context.setParent(host); - context.start(); return context; } }; @@ -682,7 +680,6 @@ public class CatalinaContainer implement Engine egn = (Engine) context.getParent().getParent(); egn.setService(tomcat.getService()); - Debug.logInfo("host[" + host + "].addChild(" + context + ")", module); context.setJ2EEApplication(J2EE_APP); context.setJ2EEServer(J2EE_SERVER); context.setLoader(new WebappLoader(ClassLoaderContainer.getClassLoader())); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/common/src/org/ofbiz/common/CommonServices.java Mon Aug 11 09:14:23 2014 @@ -40,7 +40,6 @@ import java.util.Set; import java.util.TreeSet; import javax.mail.internet.MimeMessage; -import javax.transaction.xa.XAException; import javolution.util.FastList; import javolution.util.FastMap; @@ -65,8 +64,8 @@ import org.ofbiz.service.DispatchContext import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; +import org.ofbiz.service.ServiceSynchronization; import org.ofbiz.service.ServiceUtil; -import org.ofbiz.service.ServiceXaWrapper; import org.ofbiz.service.mail.MimeMessageWrapper; import org.owasp.esapi.errors.EncodingException; @@ -142,23 +141,19 @@ public class CommonServices { } public static Map<String, Object> testRollbackListener(DispatchContext dctx, Map<String, ?> context) { - Locale locale = (Locale) context.get("locale"); - ServiceXaWrapper xar = new ServiceXaWrapper(dctx); - xar.setRollbackService("testScv", context); try { - xar.enlist(); - } catch (XAException e) { + ServiceSynchronization.registerRollbackService(dctx, "testScv", null, context, false, false); + } catch (GenericServiceException e) { Debug.logError(e, module); } + Locale locale = (Locale) context.get("locale"); return ServiceUtil.returnError(UtilProperties.getMessage(resource, "CommonTestRollingBack", locale)); } public static Map<String, Object> testCommitListener(DispatchContext dctx, Map<String, ?> context) { - ServiceXaWrapper xar = new ServiceXaWrapper(dctx); - xar.setCommitService("testScv", context); try { - xar.enlist(); - } catch (XAException e) { + ServiceSynchronization.registerCommitService(dctx, "testScv", null, context, false, false); + } catch (GenericServiceException e) { Debug.logError(e, module); } return ServiceUtil.returnSuccess(); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericDelegator.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Mon Aug 11 09:14:23 2014 @@ -236,7 +236,7 @@ public class GenericDelegator implements // do the entity model check List<String> warningList = new LinkedList<String>(); - Debug.logImportant("Doing entity definition check...", module); + Debug.logInfo("Doing entity definition check...", module); ModelEntityChecker.checkEntities(this, warningList); if (warningList.size() > 0) { Debug.logWarning("=-=-=-=-= Found " + warningList.size() + " warnings when checking the entity definitions:", module); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Mon Aug 11 09:14:23 2014 @@ -332,14 +332,14 @@ public class DatabaseUtil { // NOTE: this may need a toUpperCase in some cases, keep an eye on it, okay just compare with ignore case if (!ccInfo.typeName.equalsIgnoreCase(typeName)) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] is of type [" + ccInfo.typeName + "] in the database, but is defined as type [" + typeName + "] in the entity definition."; Debug.logError(message, module); if (messages != null) messages.add(message); } if (columnSize != -1 && ccInfo.columnSize != -1 && columnSize != ccInfo.columnSize && (columnSize * 3) != ccInfo.columnSize) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] has a column size of [" + ccInfo.columnSize + "] in the database, but is defined to have a column size of [" + columnSize + "] in the entity definition."; Debug.logWarning(message, module); @@ -350,7 +350,7 @@ public class DatabaseUtil { } } if (decimalDigits != -1 && decimalDigits != ccInfo.decimalDigits) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] has a decimalDigits of [" + ccInfo.decimalDigits + "] in the database, but is defined to have a decimalDigits of [" + decimalDigits + "] in the entity definition."; Debug.logWarning(message, module); @@ -359,13 +359,13 @@ public class DatabaseUtil { // do primary key matching check if (checkPks && ccInfo.isPk && !field.getIsPk()) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] IS a primary key in the database, but IS NOT a primary key in the entity definition. The primary key for this table needs to be re-created or modified so that this column is NOT part of the primary key."; Debug.logError(message, module); if (messages != null) messages.add(message); } if (checkPks && !ccInfo.isPk && field.getIsPk()) { - String message = "WARNING: Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + + String message = "Column [" + ccInfo.columnName + "] of table [" + tableName + "] of entity [" + entity.getEntityName() + "] IS NOT a primary key in the database, but IS a primary key in the entity definition. The primary key for this table needs to be re-created or modified to add this column to the primary key. Note that data may need to be added first as a primary key column cannot have an null values."; Debug.logError(message, module); if (messages != null) messages.add(message); @@ -2631,13 +2631,13 @@ public class DatabaseUtil { /* ====================================================================== */ public int createDeclaredIndices(ModelEntity entity, List<String> messages) { if (entity == null) { - String message = "ERROR: ModelEntity was null and is required to create declared indices for a table"; + String message = "ModelEntity was null and is required to create declared indices for a table"; Debug.logError(message, module); if (messages != null) messages.add(message); return 0; } if (entity instanceof ModelViewEntity) { - String message = "WARNING: Cannot create declared indices for a view entity"; + String message = "Cannot create declared indices for a view entity"; Debug.logWarning(message, module); if (messages != null) messages.add(message); return 0; @@ -2842,13 +2842,13 @@ public class DatabaseUtil { public int createForeignKeyIndices(ModelEntity entity, int constraintNameClipLength, List<String> messages) { if (entity == null) { - String message = "ERROR: ModelEntity was null and is required to create foreign keys indices for a table"; + String message = "ModelEntity was null and is required to create foreign keys indices for a table"; Debug.logError(message, module); if (messages != null) messages.add(message); return 0; } if (entity instanceof ModelViewEntity) { - String message = "WARNING: Cannot create foreign keys indices for a view entity"; + String message = "Cannot create foreign keys indices for a view entity"; Debug.logWarning(message, module); if (messages != null) messages.add(message); return 0; Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelReader.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelReader.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelReader.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/model/ModelReader.java Mon Aug 11 09:14:23 2014 @@ -140,10 +140,10 @@ public class ModelReader implements Seri // check to see if entity with same name has already been read if (entityCache.containsKey(entityName) && !redefinedEntity) { - Debug.logWarning("WARNING: Entity " + entityName + + Debug.logWarning("Entity " + entityName + " is defined more than once, most recent will over-write " + "previous definition(s)", module); - Debug.logWarning("WARNING: Entity " + entityName + " was found in " + + Debug.logWarning("Entity " + entityName + " was found in " + entityResourceHandler + ", but was already defined in " + entityResourceHandlerMap.get(entityName).toString(), module); } @@ -423,7 +423,7 @@ TEMP_VIEW_LOOP: for (String message : orderedMessages) { Debug.logInfo(message, module); } - Debug.logInfo("FINISHED LOADING ENTITIES - ALL FILES; #Entities=" + numEntities + " #ViewEntities=" + numViewEntities + " #Fields=" + numFields + " #Relationships=" + numRelations + " #AutoRelationships=" + numAutoRelations, module); + Debug.logInfo("Finished loading entities; #Entities=" + numEntities + " #ViewEntities=" + numViewEntities + " #Fields=" + numFields + " #Relationships=" + numRelations + " #AutoRelationships=" + numAutoRelations, module); } } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java Mon Aug 11 09:14:23 2014 @@ -747,9 +747,9 @@ public class TransactionUtil implements private static void setTransactionBeginStack(Exception newExc) { if (transactionBeginStack.get() != null) { Exception e = transactionBeginStack.get(); - Debug.logWarning(e, "WARNING: In setTransactionBeginStack a stack placeholder was already in place, here is where the transaction began: ", module); + Debug.logWarning(e, "In setTransactionBeginStack a stack placeholder was already in place, here is where the transaction began: ", module); Exception e2 = new Exception("Current Stack Trace"); - Debug.logWarning(e2, "WARNING: In setTransactionBeginStack a stack placeholder was already in place, here is the current location: ", module); + Debug.logWarning(e2, "In setTransactionBeginStack a stack placeholder was already in place, here is the current location: ", module); } transactionBeginStack.set(newExc); Long curThreadId = Thread.currentThread().getId(); @@ -763,7 +763,7 @@ public class TransactionUtil implements Exception e = transactionBeginStack.get(); if (e == null) { Exception e2 = new Exception("Current Stack Trace"); - Debug.logWarning(e2, "WARNING: In clearTransactionBeginStack no stack placeholder was in place, here is the current location: ", module); + Debug.logWarning(e2, "In clearTransactionBeginStack no stack placeholder was in place, here is the current location: ", module); return null; } else { transactionBeginStack.set(null); @@ -775,7 +775,7 @@ public class TransactionUtil implements Exception e = transactionBeginStack.get(); if (e == null) { Exception e2 = new Exception("Current Stack Trace"); - Debug.logWarning(e2, "WARNING: In getTransactionBeginStack no stack placeholder was in place, here is the current location: ", module); + Debug.logWarning(e2, "In getTransactionBeginStack no stack placeholder was in place, here is the current location: ", module); } return e; } @@ -834,9 +834,9 @@ public class TransactionUtil implements private static void setSetRollbackOnlyCause(RollbackOnlyCause newRoc) { if (setRollbackOnlyCause.get() != null) { RollbackOnlyCause roc = setRollbackOnlyCause.get(); - roc.logError("WARNING: In setSetRollbackOnlyCause a stack placeholder was already in place, here is the original rollbackOnly cause: "); + roc.logError("In setSetRollbackOnlyCause a stack placeholder was already in place, here is the original rollbackOnly cause: "); Exception e2 = new Exception("Current Stack Trace"); - Debug.logWarning(e2, "WARNING: In setSetRollbackOnlyCause a stack placeholder was already in place, here is the current location: ", module); + Debug.logWarning(e2, "In setSetRollbackOnlyCause a stack placeholder was already in place, here is the current location: ", module); } setRollbackOnlyCause.set(newRoc); } @@ -859,7 +859,7 @@ public class TransactionUtil implements public static RollbackOnlyCause getSetRollbackOnlyCause() { if (setRollbackOnlyCause.get() == null) { Exception e = new Exception("Current Stack Trace"); - Debug.logWarning(e, "WARNING: In getSetRollbackOnlyCause no stack placeholder was in place, here is the current location: ", module); + Debug.logWarning(e, "In getSetRollbackOnlyCause no stack placeholder was in place, here is the current location: ", module); } return setRollbackOnlyCause.get(); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java Mon Aug 11 09:14:23 2014 @@ -252,7 +252,7 @@ public class EntityListIterator implemen if (!haveShowHasNextWarning) { // DEJ20050207 To further discourage use of this, and to find existing use, always log a big warning showing where it is used: Exception whereAreWe = new Exception(); - Debug.logWarning(whereAreWe, "WARNING: For performance reasons do not use the EntityListIterator.hasNext() method, just call next() until it returns null; see JavaDoc comments in the EntityListIterator class for details and an example", module); + Debug.logWarning(whereAreWe, "For performance reasons do not use the EntityListIterator.hasNext() method, just call next() until it returns null; see JavaDoc comments in the EntityListIterator class for details and an example", module); haveShowHasNextWarning = true; } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/entityext/src/org/ofbiz/entityext/eca/EntityEcaUtil.java Mon Aug 11 09:14:23 2014 @@ -136,7 +136,7 @@ public class EntityEcaUtil { rules.add(new EntityEcaRule(e)); } try { - Debug.logImportant("Loaded [" + StringUtil.leftPad(Integer.toString(rules.size()), 3) + "] Entity ECA definitions from " + handler.getFullLocation() + " in loader " + handler.getLoaderName(), module); + Debug.logInfo("Loaded [" + StringUtil.leftPad(Integer.toString(rules.size()), 3) + "] Entity ECA definitions from " + handler.getFullLocation() + " in loader " + handler.getLoaderName(), module); } catch (GenericConfigException e) { Debug.logError(e, module); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java Mon Aug 11 09:14:23 2014 @@ -22,7 +22,6 @@ import java.util.Date; import java.util.Map; import javax.transaction.Transaction; -import javax.transaction.xa.XAException; import org.ofbiz.service.calendar.RecurrenceRule; import org.ofbiz.entity.Delegator; @@ -117,14 +116,7 @@ public abstract class GenericAbstractDis } public void addRollbackService(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException { - ServiceXaWrapper xa = new ServiceXaWrapper(this.getDispatchContext()); - xa.setRollbackService(serviceName, context, true, persist); - try { - xa.enlist(); - } catch (XAException e) { - Debug.logError(e, module); - throw new GenericServiceException(e.getMessage(), e); - } + ServiceSynchronization.registerRollbackService(this.getDispatchContext(), serviceName, null, context, true, persist); } public void addRollbackService(String serviceName, boolean persist, Object... context) throws GenericServiceException { @@ -132,14 +124,7 @@ public abstract class GenericAbstractDis } public void addCommitService(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException { - ServiceXaWrapper xa = new ServiceXaWrapper(this.getDispatchContext()); - xa.setCommitService(serviceName, context, true, persist); - try { - xa.enlist(); - } catch (XAException e) { - Debug.logError(e, module); - throw new GenericServiceException(e.getMessage(), e); - } + ServiceSynchronization.registerCommitService(this.getDispatchContext(), serviceName, null, context, true, persist); } public void addCommitService(String serviceName, boolean persist, Object... context) throws GenericServiceException { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/LocalDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/LocalDispatcher.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/LocalDispatcher.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/LocalDispatcher.java Mon Aug 11 09:14:23 2014 @@ -281,7 +281,7 @@ public interface LocalDispatcher { /** - * Adds a rollback service to the current TX using the ServiceXaWrapper + * Adds a rollback service to the current TX using ServiceSynchronization * @param serviceName * @param context * @param persist @@ -291,7 +291,7 @@ public interface LocalDispatcher { public void addRollbackService(String serviceName, boolean persist, Object... context) throws GenericServiceException; /** - * Adds a commit service to the current TX using the ServiceXaWrapper + * Adds a commit service to the current TX using ServiceSynchronization * @param serviceName * @param context * @param persist Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ModelServiceReader.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ModelServiceReader.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ModelServiceReader.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ModelServiceReader.java Mon Aug 11 09:14:23 2014 @@ -145,7 +145,7 @@ public class ModelServiceReader implemen // check to see if service with same name has already been read if (modelServices.containsKey(serviceName)) { - Debug.logWarning("WARNING: Service " + serviceName + " is defined more than once, " + + Debug.logWarning("Service " + serviceName + " is defined more than once, " + "most recent will over-write previous definition(s)", module); } @@ -182,11 +182,11 @@ public class ModelServiceReader implemen } if (this.isFromURL) { utilTimer.timerString("Finished file " + readerURL + " - Total Services: " + i + " FINISHED"); - Debug.logImportant("Loaded [" + StringUtil.leftPad(Integer.toString(i), 3) + "] Services from " + readerURL, module); + Debug.logInfo("Loaded [" + StringUtil.leftPad(Integer.toString(i), 3) + "] Services from " + readerURL, module); } else { utilTimer.timerString("Finished document in " + handler + " - Total Services: " + i + " FINISHED"); - if (Debug.importantOn()) { - Debug.logImportant("Loaded [" + StringUtil.leftPad(Integer.toString(i), 3) + "] Services from " + resourceLocation, module); + if (Debug.infoOn()) { + Debug.logInfo("Loaded [" + StringUtil.leftPad(Integer.toString(i), 3) + "] Services from " + resourceLocation, module); } } return modelServices; Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceContainer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceContainer.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceContainer.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceContainer.java Mon Aug 11 09:14:23 2014 @@ -90,7 +90,7 @@ public class ServiceContainer implements dispatcher = dispatcherFactory.createLocalDispatcher(dispatcherName, delegator); dispatcherCache.putIfAbsent(dispatcherName, dispatcher); dispatcher = dispatcherCache.get(dispatcherName); - if (Debug.infoOn()) Debug.logInfo("Created new dispatcher [" + dispatcherName + "] (" + Thread.currentThread().getName() + ")", module); + if (Debug.infoOn()) Debug.logInfo("Created new dispatcher [" + dispatcherName + "]", module); } return dispatcher; } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Mon Aug 11 09:14:23 2014 @@ -88,7 +88,6 @@ public class ServiceDispatcher { protected JmsListenerFactory jlf = null; protected ServiceDispatcher(Delegator delegator, boolean enableJM, boolean enableJMS, boolean enableSvcs) { - Debug.logInfo("[ServiceDispatcher] : Creating new instance.", module); factory = new GenericEngineFactory(this); ServiceGroupReader.readConfig(); ServiceEcaUtil.readConfig(); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceUtil.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceUtil.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceUtil.java Mon Aug 11 09:14:23 2014 @@ -372,7 +372,7 @@ public class ServiceUtil { } public static Map<String, Object> purgeOldJobs(DispatchContext dctx, Map<String, ? extends Object> context) { - Debug.logWarning("WARNING: purgeOldJobs service invoked. This service is obsolete - the Job Scheduler will purge old jobs automatically.", module); + Debug.logWarning("purgeOldJobs service invoked. This service is obsolete - the Job Scheduler will purge old jobs automatically.", module); String sendPool = null; Calendar cal = Calendar.getInstance(); try { Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceXaWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceXaWrapper.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceXaWrapper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/ServiceXaWrapper.java Mon Aug 11 09:14:23 2014 @@ -34,7 +34,9 @@ import org.ofbiz.entity.transaction.Tran /** * ServiceXaWrapper - XA Resource wrapper for running services on commit() or rollback() + * @deprecated - Use ServiceSynchronization instead (via LocalDispatcher) */ +@Deprecated public class ServiceXaWrapper extends GenericXaResource { public static final String module = ServiceXaWrapper.class.getName(); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java Mon Aug 11 09:14:23 2014 @@ -22,8 +22,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import javax.transaction.xa.XAException; - import javolution.util.FastMap; import org.ofbiz.base.util.Debug; @@ -33,8 +31,8 @@ import org.ofbiz.service.DispatchContext import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; +import org.ofbiz.service.ServiceSynchronization; import org.ofbiz.service.ServiceUtil; -import org.ofbiz.service.ServiceXaWrapper; import org.w3c.dom.Element; /** @@ -115,19 +113,12 @@ public class ServiceEcaAction implements } if (eventName.startsWith("global-")) { - // XA resource ECA - ServiceXaWrapper xaw = new ServiceXaWrapper(dctx); if (eventName.equals("global-rollback")) { - xaw.setRollbackService(serviceName, runAsUser, context, "async".equals(serviceMode), persist); // using the actual context so we get updates + ServiceSynchronization.registerRollbackService(dctx, serviceName, runAsUser, context, "async".equals(serviceMode), persist); // using the actual context so we get updates } else if (eventName.equals("global-commit")) { - xaw.setCommitService(serviceName, runAsUser, context, "async".equals(serviceMode), persist); // using the actual context so we get updates + ServiceSynchronization.registerCommitService(dctx, serviceName, runAsUser, context, "async".equals(serviceMode), persist); // using the actual context so we get updates } else if (eventName.equals("global-commit-post-run")) { - xaw.setCommitService(serviceName, runAsUser, context, "async".equals(serviceMode), persist); // using the actual context so we get updates - } - try { - xaw.enlist(); - } catch (XAException e) { - throw new GenericServiceException("Unable to enlist ServiceXaWrapper with transaction", e); + ServiceSynchronization.registerCommitService(dctx, serviceName, runAsUser, context, "async".equals(serviceMode), persist); // using the actual context so we get updates } } else { // standard ECA Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java Mon Aug 11 09:14:23 2014 @@ -122,8 +122,8 @@ public class ServiceEcaUtil { for (Element e: UtilXml.childElementList(rootElement, "eca")) { handlerRules.add(new ServiceEcaRule(e, resourceLocation)); } - if (Debug.importantOn()) { - Debug.logImportant("Loaded [" + StringUtil.leftPad(Integer.toString(handlerRules.size()), 3) + "] Service ECA Rules from " + resourceLocation, module); + if (Debug.infoOn()) { + Debug.logInfo("Loaded [" + StringUtil.leftPad(Integer.toString(handlerRules.size()), 3) + "] Service ECA Rules from " + resourceLocation, module); } return handlerRules; } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java Mon Aug 11 09:14:23 2014 @@ -81,14 +81,14 @@ public class ServiceGroupReader { groupsCache.put(groupName, new GroupModel(group)); numDefs++; } - if (Debug.importantOn()) { + if (Debug.infoOn()) { String resourceLocation = handler.getLocation(); try { resourceLocation = handler.getURL().toExternalForm(); } catch (GenericConfigException e) { Debug.logError(e, "Could not get resource URL", module); } - Debug.logImportant("Loaded [" + StringUtil.leftPad(Integer.toString(numDefs), 3) + "] Group definitions from " + resourceLocation, module); + Debug.logInfo("Loaded [" + StringUtil.leftPad(Integer.toString(numDefs), 3) + "] Group definitions from " + resourceLocation, module); } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/start/src/org/ofbiz/base/start/Config.java Mon Aug 11 09:14:23 2014 @@ -33,7 +33,6 @@ import java.util.Properties; import java.util.TimeZone; public class Config { - public static final double REQUIRED_JDK = 1.6; private static String getConfigFileName(String command) { // default command is "start" @@ -165,7 +164,6 @@ public class Config { if (required) { System.err.println(""); System.err.println("Required library " + jarName + " could not be located."); - System.err.println("Make sure you using Java2 SDK " + REQUIRED_JDK + "+ and NOT the JRE."); System.err.println("You may need to copy " + jarName + " into a loadable lib directory"); System.err.println("(i.e. OFBIZ_HOME or OFBIZ_HOME/base/lib)"); System.err.println(""); @@ -285,14 +283,6 @@ public class Config { // check the java_version String javaVersion = System.getProperty("java.version"); String javaVendor = System.getProperty("java.vendor"); - double version = Double.parseDouble(javaVersion.substring(0, javaVersion.indexOf(".") + 2)); - if (REQUIRED_JDK > version) { - System.err.println(""); - System.err.println("Java Version - " + javaVendor + " " + javaVersion + " - is not supported by OFBiz."); - System.err.println("Please install Java2 SDK " + REQUIRED_JDK + "+"); - System.err.println(""); - System.exit(-1); - } Properties props = this.getPropertiesFile(config); System.out.println("Start.java using configuration file " + config); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Mon Aug 11 09:14:23 2014 @@ -72,9 +72,7 @@ public class ControlServlet extends Http super.init(config); if (Debug.infoOn()) { ServletContext servletContext = config.getServletContext(); - Debug.logInfo("LOADING WEBAPP [" + servletContext.getContextPath().substring(1) + "] " - + servletContext.getServletContextName() - + ", located at " + servletContext.getRealPath("/"), module); + Debug.logInfo("Lading webapp [" + servletContext.getContextPath().substring(1) + "], located at " + servletContext.getRealPath("/"), module); } // configure custom BSF engines Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/webapp/src/org/ofbiz/webapp/taglib/ContentUrlTag.java Mon Aug 11 09:14:23 2014 @@ -59,7 +59,7 @@ public class ContentUrlTag extends BodyT public static void appendContentPrefix(HttpServletRequest request, Appendable urlBuffer) throws IOException { if (request == null) { - Debug.logWarning("WARNING: request was null in appendContentPrefix; this probably means this was used where it shouldn't be, like using ofbizContentUrl in a screen rendered through a service; using best-bet behavior: standard prefix from url.properties (no WebSite or security setting known)", module); + Debug.logWarning("Request was null in appendContentPrefix; this probably means this was used where it shouldn't be, like using ofbizContentUrl in a screen rendered through a service; using best-bet behavior: standard prefix from url.properties (no WebSite or security setting known)", module); String prefix = UtilProperties.getPropertyValue("url", "content.url.prefix.standard"); if (prefix != null) { urlBuffer.append(prefix.trim()); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java Mon Aug 11 09:14:23 2014 @@ -111,7 +111,7 @@ public class HtmlFormWrapper { if (contextStack instanceof MapStack) { return renderFormString((MapStack) contextStack); } else { - Debug.logWarning("WARNING: call renderFormString with a non-MapStack: " + (contextStack == null ? "null" : contextStack.getClass().getName()), module); + Debug.logWarning("Call renderFormString with a non-MapStack: " + (contextStack == null ? "null" : contextStack.getClass().getName()), module); return renderFormString(); } } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/framework/widget/templates/htmlFormMacroLibrary.ftl Mon Aug 11 09:14:23 2014 @@ -176,7 +176,7 @@ under the License. jQuery("#${id}").datetimepicker({ showSecond: true, <#-- showMillisec: true, --> - timeFormat: 'hh:mm:ss', + timeFormat: 'HH:mm:ss', stepHour: 1, stepMinute: 1, stepSecond: 1, @@ -490,7 +490,7 @@ under the License. jQuery("#${name?html}_fld0_value").datetimepicker({ showSecond: true, <#-- showMillisec: true, --> - timeFormat: 'hh:mm:ss', + timeFormat: 'HH:mm:ss', stepHour: 1, stepMinute: 5, stepSecond: 10, @@ -526,7 +526,7 @@ under the License. jQuery("#${name?html}_fld1_value").datetimepicker({ showSecond: true, <#-- showMillisec: true, --> - timeFormat: 'hh:mm:ss', + timeFormat: 'HH:mm:ss', stepHour: 1, stepMinute: 5, stepSecond: 10, Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/appserver/README URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/appserver/README?rev=1617233&r1=1617232&r2=1617233&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/appserver/README (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/appserver/README Mon Aug 11 09:14:23 2014 @@ -1,7 +1,7 @@ For Websphere community edition or Geronimo refer to the Guidelines in the OFBiz documentation : http://docs.ofbiz.org/x/Ah Else to generate configuration files from the templates in a sub-directory of the templates directory just run something like (from the ofbiz.home directory): -java -jar ofbiz.jar -setup test +java -jar ofbiz.jar setup test All template files in the given sub-directory, in case "test", will be processed and put in a corresponding sub-directory of ${ofbiz.home}/setup. |
Free forum by Nabble | Edit this page |