<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Websphere Commerce &#8211; Tech-Freaks.com</title>
	<atom:link href="https://www.tech-freaks.com/java/websphere-commerce/feed" rel="self" type="application/rss+xml" />
	<link>https://www.tech-freaks.com</link>
	<description></description>
	<lastBuildDate>Wed, 23 May 2012 23:58:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://www.tech-freaks.com/wp-content/uploads/2025/07/cropped-tech-freaks-site-icon-512x512-1-32x32.png</url>
	<title>Websphere Commerce &#8211; Tech-Freaks.com</title>
	<link>https://www.tech-freaks.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Accessing Websphere Commerce Context Objects</title>
		<link>https://www.tech-freaks.com/java/websphere-commerce/wc-context-objects.html</link>
					<comments>https://www.tech-freaks.com/java/websphere-commerce/wc-context-objects.html#respond</comments>
		
		<dc:creator><![CDATA[Tech Programmer]]></dc:creator>
		<pubDate>Wed, 23 May 2012 23:58:52 +0000</pubDate>
				<category><![CDATA[Websphere Commerce]]></category>
		<guid isPermaLink="false">http://localhost/tfcom_wp/2012/05/23/wc-context-objects/</guid>

					<description><![CDATA[IBM Infocenter URL for CommandContext is Infocenter CommandContext API When you review the methods you will see lot of deprecated [&#8230;]]]></description>
										<content:encoded><![CDATA[		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_restricted"><button type="button"
					aria-label="Like Button"
					data-ulike-id="34"
					data-ulike-nonce="8ac699fad9"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_34"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p style="text-align: left;">IBM Infocenter URL for CommandContext is <a href="https://help.hcltechsw.com/commerce/8.0.0/api/com/ibm/commerce/command/CommandContext.html" target="_blank" rel="noopener">Infocenter CommandContext API</a></p>
<p style="text-align: left;">When you review the methods you will see lot of deprecated methods which mention use of other context objects to access the information.</p>
<p>For this article we will review the CommandContext.getRemoteAddr() method which will give the IP address of the user accessing the site.</p>
<p style="text-align: left;">Infocenter mentions:</p>
<p><em>getRemoteAddr()<br />Deprecated. The TransportData object should be retrieved from the AuditContext of the request. The remote address is retrieved by calling TransportData.getRemoteAddress()<br /></em><br />We need to use the AuditContext, but the first question is how we get instance of AuditContext.</p>
<p><em>CommandContext.getContext(strContextName)</em> is the method we need to use.</p>
<p>Below sample code explains how to get IP address using the AuditContext</p>
<pre class="language-java"><code>AuditContext auditCtx = (AuditContext) getCommandContext().getContext(AuditContext.NAME);
System.out.println("IP Address "+auditCtx.getTransportData().getRemoteAddress());</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.tech-freaks.com/java/websphere-commerce/wc-context-objects.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Troubleshooting &#8216;Order is not locked, but it should be locked&#8217; issue</title>
		<link>https://www.tech-freaks.com/java/websphere-commerce/order-not-locked.html</link>
					<comments>https://www.tech-freaks.com/java/websphere-commerce/order-not-locked.html#respond</comments>
		
		<dc:creator><![CDATA[Tech Programmer]]></dc:creator>
		<pubDate>Sun, 13 Feb 2011 12:48:20 +0000</pubDate>
				<category><![CDATA[Websphere Commerce]]></category>
		<guid isPermaLink="false">http://localhost/tfcom_wp/2011/02/13/order-not-locked/</guid>

					<description><![CDATA[Issue: In the final step of check out flow, when the user clicks the order button he might be displayed [&#8230;]]]></description>
										<content:encoded><![CDATA[		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_restricted"><button type="button"
					aria-label="Like Button"
					data-ulike-id="33"
					data-ulike-nonce="ee6c84324f"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_33"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p><strong>Issue</strong>:</p>
<p>In the final step of check out flow, when the user clicks the order button he might be displayed with a message like &#8220;Order not locked but should be locked&#8221;.</p>
<p><strong>Sample Logs:</strong></p>
<p>[2/13/11 1:09:15:500 EST] 0000009f WC_ORDER      &gt; 222ee85c:12e1d76ea52:-7ffb com.ibm.commerce.order.commands.PreProcessOrderCmdImpl.validateShippingAddress Entry</p>
<p>[2/13/11 1:09:15:500 EST] 0000009f WC_ORDER      &lt; 222ee85c:12e1d76ea52:-7ffb com.ibm.commerce.order.commands.PreProcessOrderCmdImpl.validateShippingAddress Exit</p>
<p>[2/13/11 1:09:15:500 EST] 0000009f CommerceSrvr  A com.ibm.commerce.order.commands.PreProcessOrderCmdImpl performExecute CMN1022E: Order 11001 is not locked, but it should be locked.</p>
<p>[2/13/11 1:09:15:609 EST] 0000009f FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C</p>
<p>[2/13/11 1:09:16:078 EST] 0000009f servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [WC] [/webapp/wcs/stores] [/AjaxActionErrorResponse.jsp[2/13/11 1:09:15:890 EST] 0000009f bod           I   Order 11001 is not locked, but it should be locked.</p>
<p> </p>
<p><strong>Cause:</strong></p>
<p>The final step of the order confirmation might be calling the Out-Of-Box OrderProcessCmdImpl. Before proceeding with the processing of the order, the command checks the state of order. In the database, it would check for ORDERS.LOCKED field. If the value of this field is 0, it would indicate that the order was not locked and ready for order confirmation.</p>
<p>This could happen if the call to the OrderPrepareCmdImpl got skipped. During the process of preparing the order, this command also locks(LOCKED=1) before the order can be confirmed using the OrderProcessCmdImpl.</p>
<p>The command invoked when the cart is access unlocks the orders (LOCKED=0). One command would be OrderItemDeleteCmdImpl which unlocks.</p>
<p> </p>
<p><strong>Solution:</strong></p>
<ol>
<li>Understand the checkout flow and the possible skipped step which could miss the call to OrderPrepareCmdImpl.</li>
<li>Ensure by using a workflow like check to ensure that OrderProcessCmdImpl should not be invoked before OrderPrepareCmdImpl invocation step is executed.</li>
</ol>
<p> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.tech-freaks.com/java/websphere-commerce/order-not-locked.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
