Friday, November 9, 2012

SOLR adding custom attributes in SRCHATTRPROP !


If you need to filter SOLR queries based on a dynamic attribute. In the sample java code below the value for the custom attribute _custom.ItemType is retrieved from SRCHATTRPROP table. The code uses out of the box getIndexColumnNameByType on SolrSearchConfigurationRegistry object to retrieve the custom attribute value.

Monday, November 5, 2012

Elite Store Order Flow JSPs

Out of the box V7->EliteStorefrontAssetStore ->Order flow.
Useful to check for JSP's in a certain flow quickly. I have moved header\footer\mincart\breadcrumb\leftside\rightside\espot JSP's to the bottom.Internally it calls multiple JSP fragments that are not captured here.

Cart --> ViewName->AjaxOrderItemDisplayView
Starting point of flow JSP::OrderItemDisplay.jsp
/EliteStorefrontAssetStore/ShoppingArea/ShopcartSection/OrderItemDisplay.jsp
/EliteStorefrontAssetStore/ShoppingArea/OrderCreationSection/RequisitionListSubsection/RequisitionListPopupDisplay.jsp
/EliteStorefrontAssetStore/ShoppingArea/OrderCreationSection/RequisitionListSubsection/RequisitionListPopupTableDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Promotions/PromotionChoiceOfFreeGiftsPopupContent.jsp
/EliteStorefrontAssetStore/ShoppingArea/ShopcartSection/ShopCartDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Order/Cart/ShipmodeSelectionExt.jsp
/EliteStorefrontAssetStore/Snippets/Order/Cart/OrderItemDetail.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Promotions/PromotionPickYourFreeGift.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentOrderTotalsSummary.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Promotions/PromotionCodeDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Promotions/CouponWalletTable.jsp
/EliteStorefrontAssetStore/Snippets/Order/Cart/CheckoutLogon.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedHeaderDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/ESpot/CachedContentAreaESpot.jsp
/EliteStorefrontAssetStore/include/MiniShopCartDisplay.jsp
/EliteStorefrontAssetStore/include/BreadCrumbTrailDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedLeftSidebarDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedRightSidebarDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/ESpot/ESpotNavDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedFooterDisplay.jsp

Shipping and Billing page--> OrderShippingBillingView
Starting point of flow JSP:OrderShippingBillingDetails.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/OrderShippingBillingDetails.jsp
/EliteStorefrontAssetStore/ShoppingArea/OrderCreationSection/RequisitionListSubsection/RequisitionListPopupDisplay.jsp
/EliteStorefrontAssetStore/ShoppingArea/OrderCreationSection/RequisitionListSubsection/RequisitionListPopupTableDisplay.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/ShippingDetailsDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Promotions/PromotionChoiceOfFreeGiftsPopupContent.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/ShippingAddressSelect.jsp
/EliteStorefrontAssetStore/Snippets/Member/Address/AddressDisplay.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentShippingMethodDetails.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentShipChargeExt.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/OrderItemDetails.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Promotions/PromotionPickYourFreeGift.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentOrderTotalsSummary.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Promotions/PromotionCodeDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Promotions/CouponWalletTable.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/ScheduleOrderDisplayExt.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/BillingAddressDropDownDisplay.jsp
/EliteStorefrontAssetStore/Snippets/EDP/PaymentMethods/Empty.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedHeaderDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/ESpot/CachedContentAreaESpot.jsp
/EliteStorefrontAssetStore/include/MiniShopCartDisplay.jsp
/EliteStorefrontAssetStore/include/BreadCrumbTrailDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedLeftSidebarDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedRightSidebarDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedFooterDisplay.jsp

 Order Summary page-->SingleShipmentOrderSummaryView
 Starting point of flow JSP:BillingAddressDropDownDisplay
 /EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/BillingAddressDropDownDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Member/Address/AddressDisplay.jsp
/EliteStorefrontAssetStore/Snippets/EDP/PaymentMethods/StandardCOD.jsp
/AjaxActionResponse.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/OrderTotalInJSON.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentSummary.jsp
/EliteStorefrontAssetStore/include/MiniShopCartDisplay.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/OrderItemDetailSummary.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentOrderTotalsSummary.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/ScheduleOrderDisplayExt.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedHeaderDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/ESpot/CachedContentAreaESpot.jsp
/EliteStorefrontAssetStore/include/BreadCrumbTrailDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedLeftSidebarDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedRightSidebarDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedFooterDisplay.jsp

Order Confirmation page-->OrderShippingBillingConfirmationView
Starting point of flow JSP:OrderReceivedNotify.jsp
/EliteStorefrontAssetStore/Messages/OrderReceivedNotify.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/Content/ContentSpotDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Member/Address/AddressDisplay.jsp
/AjaxActionResponse.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/OrderShippingBillingConfirmationPage.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/OrderItemDetailSummary.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/SingleShipment/SingleShipmentOrderTotalsSummary.jsp
/EliteStorefrontAssetStore/ShoppingArea/CheckoutSection/ScheduleOrderDisplayExt.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedHeaderDisplay.jsp
/EliteStorefrontAssetStore/Snippets/Marketing/ESpot/CachedContentAreaESpot.jsp
/EliteStorefrontAssetStore/include/MiniShopCartDisplay.jsp
/EliteStorefrontAssetStore/include/BreadCrumbTrailDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedLeftSidebarDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedRightSidebarDisplay.jsp
/EliteStorefrontAssetStore/include/styles/style1/CachedFooterDisplay.jsp

Thursday, November 1, 2012

Increase HeapSize on server.xml for OutOfMemory Exception

If you are running SOLR or any other high memory process, there is a chance, you have seen the OutOfMemory exception. You can increase the heap-size using WAS or directly in the file. Recommended approach would be directly in the file. 

From WAS console:
  1. In the administrative console, click Servers > Server Types > WebSphere application servers, and then click on an application server name.
  2. In the Server Infrastructure section, click Java and process management > Process definition .
Directly updating the file, as this is the same file that gets updated while changing WAS console: On toolkit, this would be the path
C:\WCDE_ENT70\wasprofile\config\cells\localhost\nodes\localhost\servers\server1\server.xml
Search for initialHeapSize and maximumHeapSize and change 
initialHeapSize=512
maximumHeapSize=1536
or you have only 1024 try
initialHeapSize=1024
maximumHeapSize=1024
If you give incorrect values here, it could result in your server not starting so please be cognizant about that.

Analyzing memory heaps from WebSphere Commerce


You need two install 2 plug-ins in RAD:
  1. Eclipse Memory Analyzer Plug-in: http://www.eclipse.org/mat/
  2. IBM Diagnostic Tool Framework for Java Plug-in: http://www.ibm.com/developerworks/java/jdk/tools/dtfj.html#download

This should allow you to read WCS dump files (*.phd). Install #1 then #2.

After that you can follow this tutorial to get ideas on what to investigate: