<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Jeffrey Black</title>
	<atom:link href="http://jeffblacktn.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeffblacktn.wordpress.com</link>
	<description>The digital residue of my life lands here.</description>
	<lastBuildDate>Fri, 07 May 2010 21:04:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jeffblacktn.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/23018425c184d645558596fda661b1e4?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Jeffrey Black</title>
		<link>http://jeffblacktn.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jeffblacktn.wordpress.com/osd.xml" title="Jeffrey Black" />
	<atom:link rel='hub' href='http://jeffblacktn.wordpress.com/?pushpress=hub'/>
		<item>
		<title>PowerDynamo to JSP conversion tool</title>
		<link>http://jeffblacktn.wordpress.com/2010/05/07/powerdynamo-to-jsp-conversion-tool-sybase/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/05/07/powerdynamo-to-jsp-conversion-tool-sybase/#comments</comments>
		<pubDate>Fri, 07 May 2010 20:38:55 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[EAServer]]></category>
		<category><![CDATA[Jaguar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[powerdynamo]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=170</guid>
		<description><![CDATA[Dyn2JSP

Welcome to the PowerDynamo to JSP conversion tool. This tool is designed to aid you in converting your PowerDynamo Dynamic File site to a JSP file site. The conversion tool will make every effort to logically convert the DynaScript to an equivalent JSP, however not all scenarios have a conversion. At the end of this document you will find a table that identifies several of these common scenarios and provides you with information that will aid you in a manual conversion.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=170&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While attending the Sybase Developer Days event in Houston, TX yesterday (May 6, 2010) I had a conversation with a gentleman from Dallas supporting PowerDynamo running on EAServer 5.x (Jaguar).  He told me that he needed to convert the PowerDynamo scripts to JSP&#8217;s; however he was unaware of a tool that Sybase shipped with EAServer to facilitate migrating from PowerDynamo scripts to JavaServer Pages.</p>
<p>I am including the link to <a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc38032_0550/html/new55/BHACABEA.htm" target="_blank">SyBooks Online</a> which documents its functionality.  Hopefully this will be of use to someone else out there that needs to convert their PowerDynamo scripts to JSP&#8217;s and were unaware of the utility.</p>
<p style="padding-left:30px;"><em><strong>Dyn2JSP</strong></em></p>
<p style="padding-left:30px;"><em>Welcome to the PowerDynamo to JSP conversion tool. This tool is designed to aid you in converting your PowerDynamo Dynamic File site to a JSP file site. The conversion tool will make every effort to logically convert the DynaScript to an equivalent JSP, however not all scenarios have a conversion. At the end of this document you will find a table that identifies several of these common scenarios and provides you with information that will aid you in a manual conversion.</em></p>
<p><a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc38032_0550/html/new55/BHACABEA.htm" target="_blank">http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc38032_0550/html/new55/BHACABEA.htm</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=170&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/05/07/powerdynamo-to-jsp-conversion-tool-sybase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>Convert PowerBuilder ResultSet from EAServer to Java Collection</title>
		<link>http://jeffblacktn.wordpress.com/2010/04/12/convert-powerbuilder-resultset-from-easerver-to-java-collection/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/04/12/convert-powerbuilder-resultset-from-easerver-to-java-collection/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 21:09:13 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[Datawindow]]></category>
		<category><![CDATA[EAServer]]></category>
		<category><![CDATA[Jaguar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jConnect]]></category>
		<category><![CDATA[JDBC]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Struts]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JSP]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=161</guid>
		<description><![CDATA[The State of Texas has a massive n-tier PowerBuilder application using EAServer.  That means they have a significant investment in PowerBuilder and by proxy &#8212; Datawindows!  I am involved in several projects developing Java web applications in addition to my PowerBuilder work and I needed to tap that PowerBuilder Datawindow investment. I thought I would [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=161&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The State of Texas has a massive n-tier PowerBuilder application using EAServer.  That means they have a significant investment in PowerBuilder and by proxy &#8212; Datawindows!  I am involved in several projects developing Java web applications in addition to my PowerBuilder work and I needed to tap that PowerBuilder Datawindow investment.</p>
<p>I thought I would share with the community how one can take an EAServer component developed with PowerBuilder and return a DataStore ResultSet to a Java class and convert the rows and columns of the java.sql.ResultSet to a Collection of Java beans.</p>
<p>I have a method named <strong>getContractList </strong>in a PowerBuilder NVO called <strong>n_spr</strong> deployed to an EAServer package named <strong>JaguarSPR. </strong>For instruction on how to build EAServer components using PowerBuilder please refer to the <a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc37774_1100/html/apptech/CBBBFDAD.htm" target="_blank">Sybase documentation</a>.</p>
<p>The PowerBuilder code is pretty self-explanatory.  If you are a PowerBuilder developer there is nothing remarkable about the method other than the return type is ResultSet.  The code listing for the getContractList follows:</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">// Begin PowerBuilder Code  ---------------------------------------------------------------------------------------</span><span style="color:#0000ff;">
// Method: getContractList
// Returns: ResultSet
</span></pre>
<pre style="padding-left:30px;"><span style="color:#0000ff;">long ll_rows
resultset lrs
datastore lds_data</span></pre>
<pre style="padding-left:30px;"><span style="color:#0000ff;">iel.Log("Executing getContractList")
lds_data = CREATE datastore
lds_data.dataobject = "d_aft_contract_list"
lds_data.settransobject(sqlca)
iel.Log("Datastore created")</span></pre>
<pre style="padding-left:30px;"><span style="color:#0000ff;">ll_rows = lds_data.Retrieve()
iel.Log("Contracts retrieved --&gt; "+ string(ll_rows) )</span></pre>
<pre style="padding-left:30px;"><span style="color:#0000ff;">if (ll_rows &gt;= 0) then
  lds_data.GenerateResultSet(lrs)
end if

// return ResultSet to caller</span><span style="color:#0000ff;">
return lrs</span></pre>
<pre style="padding-left:30px;"><span style="color:#0000ff;">// End PowerBuilder Code ---------------------------------------------------------------------------------------</span></pre>
<p>The Java code requires a bit more explanation so I have included some comments along the way to guide you through the process.  If you have any questions, comments, or observations please drop me a note.</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">// Begin Java Code -------------------------------------------------------------------------------------------------
package us.tx.state.twc.twist.spr;

import CTS.PBUserException;
import JaguarSPR.n_spr;
import JaguarSPR.n_sprHelper;
import com.sybase.CORBA.jdbc11.SQL;
import java.sql.SQLException;
import java.util.Collection;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.dbutils.BasicRowProcessor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.util.ModuleException;
import org.omg.CORBA.ORB;

/**
 * Obtain ResultSet from EAServer/PowerBuilder Component and convert to a Collection of Java Beans
 *
 */
public class JaguarContractBean {

 private static Log log = LogFactory.getLog(JaguarContractBean.class);    // commons logging reference
 public void getContractList() throws ModuleException {
 TabularResults.ResultSet contractResultSet = null;
 java.sql.ResultSet rs = null;

<span style="color:#0000ff;"> //
 // Initialize the CORBA client-side ORB and
 // obtain a stub for the EAServer component instance.
 //
 log.info("... Creating CORBA session.");
 //
 // Initialize the ORB.
 //
 log.info("... Initialize ORB and get ORB object.");
 java.util.Properties props = new java.util.Properties();
 props.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
 ORB orb = ORB.init((java.lang.String[]) null, props);</span></span><span style="color:#0000ff;">

//
// Get reference to Jaguar (EAServer) component
//
log.info("... Create Jaguar component using FactoryHelper.");
org.omg.CORBA.Object object = null;
object = orb.string_to_object("JaguarSPR/n_spr");
n_spr comp = n_sprHelper.narrow(object);</span>
<span style="color:#0000ff;">//
// Call PowerBuilder component to obtain ResultSet
//

try {</span>

<span style="color:#0000ff;">contractResultSet = comp.getcontractlist();</span>

<span style="color:#0000ff;">if (contractResultSet != null) {</span>

<span style="color:#0000ff;">// We have a TabularResults::ResultSets CORBA IDL object returned from EAServer/PowerBuilder
// Convert the TabularResults::ResultSets CORBA IDL <a name="X28139">to an equivalent java.sql.ResultSet object</a>
//
// http://infocenter.sybase.com/help/topic/com.sybase.dc37774_1100/html/apptech/BABBEEFI.htm
// http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc38037.0600/html/easref/X27842.htm
//
rs = SQL.getResultSet(contractResultSet);
XContractDTO contractObj = null;</span>
<span style="color:#0000ff;">
//
// Use the Apache Commons DBUtils package to convert the SQL ResultSet to a Collection of Java Objects
// </span><span style="color:#0000ff;">http://commons.apache.org/dbutils/apidocs/index.html</span>
<span style="color:#0000ff;">// </span>
<span style="color:#0000ff;">BasicRowProcessor brp = new BasicRowProcessor();
Collection&lt;XContractDTO&gt; contractObjs = brp.toBeanList(rs, XContractDTO.class);
Iterator&lt;XContractDTO&gt; contractIter = contractObjs.iterator();
while (contractIter.hasNext()) {
  contractObj = (XContractDTO) contractIter.next();
  log.info("XContractDTO --&gt; "+ contractObj.getAft_contract_id());
}

brp = null;<span style="color:#0000ff;">
contractObjs = null;
contractObj = null;</span></span><span style="color:#0000ff;">}</span>
<span style="color:#0000ff;">} catch (SQLException ex) {
  Logger.getLogger(JaguarContractBean.class.getName()).log(Level.SEVERE, null, ex);
</span>
<span style="color:#0000ff;">} catch (PBUserException pbue) {
</span>

<span style="color:#0000ff;">  log.error("error retrieving contract list from PowerBuilder component JaguarSPR/n_spr");
  log.error(pbue.getLocalizedMessage());
  ModuleException me = new ModuleException("error.pbue.message");
  throw me;</span>
<span style="color:#0000ff;">} finally {rs = null;</span>
<span style="color:#0000ff;">  contractResultSet = null;
  comp = null;</span>
<span style="color:#0000ff;">}</span>
<span style="color:#0000ff;">return;</span>
<span style="color:#0000ff;"><span style="color:#0000ff;">}</span>
</span><span style="color:#0000ff;">}</span></pre>
<pre><span style="color:#0000ff;">    // End Java code --------------------------------------------------------------------------------------------------------------</span></pre>
<p>Resources:</p>
<p>http://infocenter.sybase.com/help/topic/com.sybase.dc37774_1100/html/apptech/BABBEEFI.htm</p>
<p>http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc38037.0600/html/easref/X27842.htm</p>
<p>http://commons.apache.org/dbutils/apidocs/index.html</p>
<p>http://www.sybase.com/detail?id=1002670</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=161&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/04/12/convert-powerbuilder-resultset-from-easerver-to-java-collection/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>Roll your own (sort of) sybase-easerver-config.xml file</title>
		<link>http://jeffblacktn.wordpress.com/2010/03/30/roll-your-own-sort-of-sybase-easerver-config-xml-file/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/03/30/roll-your-own-sort-of-sybase-easerver-config-xml-file/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 22:18:08 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[EAServer]]></category>
		<category><![CDATA[Jaguar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jConnect]]></category>
		<category><![CDATA[JDBC]]></category>
		<category><![CDATA[Struts]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=153</guid>
		<description><![CDATA[I am developing a Java Web-Application for deployment to Jaguar 5.5 (don&#8217;t ask).  Anyway, whenever I finished deploying my application, using Jaguar Manager, I had to manually assign my JNDI Datasource (res-ref-name property) to the Connection Cache defined in Jaguar (res-link property) on the &#8220;Resource Refs&#8221; property tab of my application.  After doing this entirely [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=153&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am developing a Java Web-Application for deployment to Jaguar 5.5 (don&#8217;t ask).  Anyway, whenever I finished deploying my application, using Jaguar Manager, I had to manually assign my JNDI Datasource (res-ref-name property) to the Connection Cache defined in Jaguar (res-link property) on the &#8220;Resource Refs&#8221; property tab of my application.  After doing this entirely too many times I took the time away from my development efforts to automate this task on deployment.</p>
<p>The good people at Sybase enable me to perform this configuration via an EAServer XML configuration file embedded in the META-INF directory of my WAR file.  Armed with the XML file appropriately named sybase-easerver-config.xml I can configure components, applications, Web applications, and connectors to my hearts content &#8212; automatically.</p>
<p>Creating the XML from scratch can be difficult and time consuming; however running the following command can provide you with a great start:</p>
<p>%jaguar_home%\bin&gt;jagtool exportconfig -configtype create WebApplication:MyWebApplication</p>
<p>I have output from a  sample application to review for your convenience:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!--DOCTYPE sybase-easerver-config PUBLIC '-//Sybase, Inc.//DTD EAServer configuration 1.0//EN' 'http://download.sybase.com/specifications/xsd/sybase-easerver-config_1_0.dtd'&gt;
WebApplication twistspr"&gt;
 &lt;configure type="update" entity="WebApplication:twistspr"&gt;
 &lt;property name="com.sybase.jaguar.webapplication.env-entry" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.listeners" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.cache.message-topics" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.cache.use-sessionid" value="false" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.jsp.compile-extra-cp" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.cookie.persistent" value="false" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.java.classes" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.name" value="twistspr" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.jarlist" value="ReportsClient.jar,activation.jar,commons-beanutils.jar,commons-collections.jar,commons-dbcp.jar,commons-dbutils-1.3.jar,commons-digester.jar,commons-fileupload.jar,commons-lang.jar,commons-logging.jar,commons-pool.jar,commons-validator.jar,jakarta-oro.jar,jconn3.jar,jstl.jar,log4j-1.2.15.jar,standard.jar,struts-el.jar,struts-legacy.jar,struts.jar" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.description" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.servlet-mapping" value="(url-pattern=*.do,servlet-name=action,description=)" /&gt;
 &lt;property name="res-type" value="javax.sql.Datasource" /&gt;
 form-login-config=(form-login-page=,form-error-page=))" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.cache.session-attributes" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.jsp.compile-use-eas-cp" value="true" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.context-param" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.mime-mapping" value="" /&gt;
 &lt;property name="res-sharing-scope" value="Shareable" /&gt;
 &lt;property name="description" value="TWIST SPR Connection Cache Definition" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.context-root" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.cache.request-parameters" value="*" /&gt;
 &lt;property name="res-link" value="TWIST_SPR_cc" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.applications" value="" /&gt;
 &lt;property name="res-ref-name" value="jdbc/TWIST_OLTP_jconnect" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.small-icon" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.jagmgr.XSLTFactoryChoice" value="0" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.version" value="2.2" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.session-config.session-timeout" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.dependencies" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.WarFileName" value="twistspr" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.large-icon" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.singlethread.poolsize" value="" /&gt;
 &lt;property name="res-auth" value="Container" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.session-config" value="(session-timeout=30)" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.classloaderpolicy" value="ParentFirst" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.jagmgr.SAXFactoryChoice" value="0" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.ejb-local-ref" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.welcome-file-list" value="home.jsp" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.filter-mapping" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.shared" value="false" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.context-path" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.cache.locale-sensitive" value="false" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.files" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.distributable" value="false" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.jagmgr.DOMFactoryChoice" value="0" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.cache.timeout" value="600" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.resource-ref" value="(description=TWIST SPR Connection Cache Reference,res-sharing-scope=Shareable,res-type=javax.sql.DataSource,res-ref-name=jdbc/TWIST_OLTP_jconnect,res-link=TWIST_SPR_cc,res-auth=Container)" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.web-resource-collection" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.error-page" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.security-constraint" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.cache.request-headers" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.resource-env-ref" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.ejb-ref" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.filters" value="" /&gt;
 taglib-uri=/WEB-INF/struts-html-el.tld,taglib-location=/WEB-INF/struts-html-el.tld),(taglib-uri=jstl-c,taglib-location=/WEB-INF/c.tld),(taglib-uri=/WEB-INF/struts-bean-el.tld,taglib-location=/WEB-INF/struts-bean-el.tld),(taglib-uri=/WEB-INF/struts-logic-el.tld,taglib-location=/WEB-INF/struts-logic-el.tld),(taglib-uri=jstl-fmt,taglib-location=/WEB-INF/fmt.tld)" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.jsp.compile-use-third-party" value="" /&gt;
 &lt;property name="com.sybase.jaguar.webapplication.security-roles" value="" /&gt;
 &lt;/configure&gt;
&lt;/sybase-easerver-config&gt;</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=153&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/03/30/roll-your-own-sort-of-sybase-easerver-config-xml-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>Binding Sybase Java Datastore Transaction objects to a ConnectionCache</title>
		<link>http://jeffblacktn.wordpress.com/2010/03/05/binding-sybase-java-datastore-transaction-objects-to-a-connectioncache/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/03/05/binding-sybase-java-datastore-transaction-objects-to-a-connectioncache/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 18:36:28 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[Datawindow]]></category>
		<category><![CDATA[EAServer]]></category>
		<category><![CDATA[Jaguar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jConnect]]></category>
		<category><![CDATA[JDBC]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Datastore]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=142</guid>
		<description><![CDATA[you will inevitably wish to leverage a connection cache, defined in your application server, to perform your database work.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=142&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>From day 1 PowerBuilder Developers become acquainted with the Transaction object and its use in facilitating database communications for their application&#8217;s Datawindows and Datastores.</p>
<p>One of the key properties of the Transaction object is the DBParm.  It contains DBMS-specific parameters that allows you to take  advantage of various features supported by your database.</p>
<pre style="padding-left:30px;">SQLCA.dbParm="ConnectString='DSN=Sales;UID=PB;PWD=xyz',Async=1"</pre>
<p>While all of this is very familiar to experienced PowerBuilder Developers working in classic PowerBuilder they may struggle, <em>initially</em>, to configure their Transaction objects and Datastores in a similar fashion when working in a Java environment.</p>
<p>The class library provided with the Java Datastore does have a Transaction object with many familiar properties.  The Transaction object&#8217;s DBParm enables you, the application developer, to specify connection criteria to establish communication with your database:</p>
<pre style="padding-left:30px;">SQLCA.setDbparm("Driver='com.sybase.jdbc3.jdbc.SybDriver',URL='jdbc:sybase:Tds:devserver.state.tx.us:5000'");</pre>
<p>However you will inevitably wish to leverage a connection cache, defined  in your  application server, to perform your database work.  The following code fragment demonstrates how to establish database communications with your Transaction object using a connection cache:</p>
<pre style="padding-left:30px;">private void connectToCache() {

 Context ic = null;
 String dsName = "java:comp/env/jdbc/TWIST_OLTP_jconnect";

 System.out.println("Executing connectToCache.");

 try {
   // 1. Lookup the name of my ConnectionCache (DataSource) using JNDI.
   ic = new InitialContext();
   System.out.println("... lookup datasource defined in EAServer --&gt; " + dsName);
   DataSource ds = (DataSource) ic.lookup(dsName);

   // 2. Obtain the ConnectionObject from the DataSource.
   System.out.println("... obtain reference to connection from our DataSource.");
   connectionObject = ds.getConnection();

   // 3. Create instance of Transaction object and "bind" it to the ConnectionObject.
   transObject = new Transaction();
   transObject.setDbms("JDBC");
   transObject.bindJDBCConnection(connectionObject);
   transObject.setAutocommit(true);

 } catch (NamingException e) {
   e.printStackTrace();
 } catch (SQLException e) {
   e.printStackTrace();
 }

 return;
}</pre>
<p>Finally when you are finished using your Transaction object issue a disconnect to release the connection:</p>
<pre style="padding-left:30px;">transObject.disconnect();</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=142&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/03/05/binding-sybase-java-datastore-transaction-objects-to-a-connectioncache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>Datawindows and Chained Transactions: Part Two</title>
		<link>http://jeffblacktn.wordpress.com/2010/02/24/datawindows-and-chained-transactions-part-two/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/02/24/datawindows-and-chained-transactions-part-two/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 02:37:01 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[ASE]]></category>
		<category><![CDATA[Datawindow]]></category>
		<category><![CDATA[EAServer]]></category>
		<category><![CDATA[Jaguar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jConnect]]></category>
		<category><![CDATA[JDBC]]></category>
		<category><![CDATA[PowerBuilder]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=123</guid>
		<description><![CDATA[I recently authored a post about the failure of my Datawindows sourced from stored procedures to retrieve any data.  What was remarkable about my Datawindows, other than the fact that they were sourced from stored procedures instead of SQL Selects, was that they &#8220;lived&#8221; on JSP&#8217;s in a JSF application deployed to EAServer. The root [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=123&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently authored a <a href="http://jeffblacktn.wordpress.com/2010/02/23/datawindows-vs-chained-transactions/" target="_blank">post</a> about the failure of my Datawindows sourced from stored procedures to retrieve any data.  What was remarkable about my Datawindows, other than the fact that they were sourced from stored procedures instead of SQL Selects, was that they &#8220;lived&#8221; on JSP&#8217;s in a JSF application deployed to EAServer.</p>
<p>The root of the problem with my Datawindows not retrieving any data  after being deployed to EAServer was the fact that the connection cache  the Datawindows were using was defaulting to &#8220;Chained Transactions&#8221; on.</p>
<p>Our DBA expressed a concern that <em>something</em> was forcing the connection cache, defined in EAServer, to &#8220;set chained on&#8221;.</p>
<p>This led to an interesting and enlightening conversation and fact-finding mission about Chained and Unchained Transactions and how they impact our database and applications.</p>
<p>At the end of the day we discovered that the jConnect for JDBC Driver was defaulting to &#8220;set chained on&#8221;.  To force &#8220;set chained off&#8221; which allows &#8220;Unchained&#8221; database transactions I needed to specify the property <a href="http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc39001.0605/html/prjdbc/prjdbc14.htm" target="_blank">SERVER_INITIATED_TRANSACTIONS=FALSE</a> in the connection URL.  Here is an example:</p>
<pre>jdbc:sybase:Tds:dbserver.twc.state.tx.us:5000?SERVER_INITIATED_TRANSACTIONS=FALSE
</pre>
<p>Configuring this property to false forces the connection to operate with &#8220;Unchained Transactions&#8221;.</p>
<p>If you&#8217;re still reading this you may be asking &#8220;why do I care?&#8221;</p>
<p>If you are a PowerBuilder developer and familiar with the <a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc37787_1100/html/objcont_merged/CIHGJAHI.htm" target="_blank">Transaction</a> object&#8217;s AutoCommit property and its use in managing your database transactions, then you will want to know about this property when using jConnect for JDBC from your Java applications.  Before changing this property you should check with your DBA to determine the impact on your transaction management strategy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=123&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/02/24/datawindows-and-chained-transactions-part-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>Datawindows and Chained Transactions</title>
		<link>http://jeffblacktn.wordpress.com/2010/02/23/datawindows-vs-chained-transactions/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/02/23/datawindows-vs-chained-transactions/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 21:00:34 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[ASE]]></category>
		<category><![CDATA[Datawindow]]></category>
		<category><![CDATA[EAServer]]></category>
		<category><![CDATA[Jaguar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=96</guid>
		<description><![CDATA[After a half-hour WebEx and conference call with Kevin Bates and Patricia Steinhardt of Sybase Technical Support the problem was identified and resolved.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=96&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>During the course of working on a JSF project adorned with lovely Datawindows I decided to proceed the route that I had become very familiar with and that was the practice of sourcing my Datawindows from database stored procedures versus SQL Selects.</p>
<p>Having created the appropriate stored procedures I designed my Datawindow objects using the Datawindow Designer in Sybase Workspace.  Using Workspace&#8217;s page editor I then dropped my Datawindows on my JSP and configured the appropriate property settings.</p>
<p>After deploying my application to EAServer I used my trusty browser to request the JSP.  I was presented with my Datawindow however no data was returned.  After opening my Datawindows in the designer I previewed them properly.  Next I executed the procedures within ISQL.  My procedures returned the data properly.  The data was being returned in both ISQL and Sybase Workspace&#8217;s Datawindow Designer.</p>
<p>I decided to create Datawindow objects using SQL Select statements and reference them from my JSPs instead of those using stored procedures.  After I deployed my application again I previewed my page: The Datatwindows retrieved the data as intended on my JSP.</p>
<p>What could possibly be the matter with my stored procedure sourced Datawindow objects and their ability to retrieve data via EAServer in my JSF application?</p>
<p><em>After a half-hour WebEx and conference call with Kevin Bates and Patricia Steinhardt of Sybase Technical Support the problem was identified and resolved.</em></p>
<p>Kevin ran a TDS Trace using Ribo against my target database (ASE 15).  It was determined that my stored procedures were executing in &#8220;unchained&#8221; mode (See below):</p>
<p style="padding-left:30px;">EED Token (0xE5); variable length.<br />
Length [2]:                   224<br />
Message Number [4]:           7713<br />
Message State [1]:            2<br />
Message Class [1]:            16<br />
SQL State Length [1]:         5<br />
SQL State [5]:                &#8220;ZZZZZ&#8221;<br />
Status [1]:                   NO_EED (0&#215;00)<br />
Transaction State [2]:        TDS_TRAN_SUCCEED (0&#215;0001)<br />
Message Length [2]:           195<br />
Message Text [195]:          <span style="text-decoration:underline;"><em> </em></span>&#8220;Stored procedure &#8216;dbo.p_oltp_aft_contract_retrieve&#8217; may be run only in unchained transaction mode. The &#8216;SET CHAINED OFF&#8217; command will cause the current session to use unchained transaction mode.&#8221;<span style="text-decoration:underline;"><em><br />
</em></span> Server Name Length [1]:       8<br />
Server Name [8]:              &#8220;OLTP_DEV&#8221;<br />
Stored Proc. Name Length [1]: 0<br />
Line Number [2]:              1</p>
<p>The solution for my problem was to execute the following statement on my database:</p>
<pre style="padding-left:30px;">sp_procxmode p_oltp_aft_contract_retrieve, "anymode"</pre>
<p>Following execution of the above statement, I used my browser to request the JSP containing my stored procedure sourced Datawindow and it retrieved the data as intended.</p>
<p>If you happen to experience similar symptoms don&#8217;t forget to check the transaction mode in which your stored procedures may be executing.  An excerpt from Sybase&#8217;s jConnect for JDBC documenation addresses the subject:</p>
<p><em>Chapter 4: Troubleshooting</em></p>
<hr size="1" noshade="noshade" />
<h1><a name="CHDEGBEA">Stored procedure executed in unchained transaction mode</a></h1>
<pre><a name="CHDEGBEA">Sybase Error 7713 - Stored Procedure can only be executed in unchained transaction mode.
</a></pre>
<p><a name="CHDEGBEA">This error occurs when JDBC attempts to put the connection in <strong>autocommit(true)</strong> mode. The application can change the connection to chained mode using <strong>Connection.setAutoCommit(false)</strong> or by using a <strong>“set chained on”</strong> language command. This error occurs if the stored procedure was not created in a compatible mode.</a></p>
<p><a name="CHDEGBEA">To fix the problem, use: </a></p>
<pre><a name="CHDEGBEA">sp_procxmode <em>procedure_name,"</em>anymode"
</a></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=96&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/02/23/datawindows-vs-chained-transactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>The Sybase Datawindow and the JSF Life-cyle</title>
		<link>http://jeffblacktn.wordpress.com/2010/02/23/the-sybase-datawindow-and-the-jsf-life-cyle/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/02/23/the-sybase-datawindow-and-the-jsf-life-cyle/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 15:15:43 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[Datawindow]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PowerBuilder]]></category>
		<category><![CDATA[Sybase]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=87</guid>
		<description><![CDATA[to get the most out of your JSF based Datawindow projects it is important to know when the various Datawindow "Handlers" and "Listeners" execute during the JSF life-cycle<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=87&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently began working on a Java Server Faces project using Sybase Workspace and my beloved Datawindow.  Sybase Workspace enables me to <em>easily </em>integrate my Datawindow programming expertise with the Java Server Faces web-application framework.</p>
<p>However, to get the most out of your JSF based Datawindow projects it is important to know when the various Datawindow &#8220;Handlers&#8221; and &#8220;Listeners&#8221; execute during the JSF life-cycle:</p>
<ol>
<li>The Datawindow component&#8217;s <span style="text-decoration:underline;"><em>onLoadHandler </em></span>is executed between the BEFORE and AFTER APPLY_REQUEST_VALUES phase (Phase 2).</li>
<li>Any Sybase Datawindow component with registered <em>Listeners</em> (e.g. RetrieveListener, UpdateListener, SQLPreviewListener) will be executed between the BEFORE and AFTER  APPLY_REQUEST_VALUES phase (Phase 2).</li>
<li>Any actions which call methods on Managed Beans used in conjunction with the Datawindow component (e.g. Updating a Datawindow) are executed between the BEFORE and AFTER  INVOKE_APPLICATION phase (Phase 5).</li>
</ol>
<p>The Sybase Datawindow component in conjunction with the Sybase Java Datastore provides the Datawindow programmer familiar and tremendous power when architecting and developing browser-based JSF applications.  Understanding the JSF life-cycle and where the Datawindow fits within that life-cycle is crucial to exploit the full capability of the Datawindow that PowerBuilder developers have become so familiar.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=87&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/02/23/the-sybase-datawindow-and-the-jsf-life-cyle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>Upgrading your &#8220;ancient&#8221; SQL Anywhere database</title>
		<link>http://jeffblacktn.wordpress.com/2010/01/15/upgrading-your-ancient-sql-anywhere-database/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/01/15/upgrading-your-ancient-sql-anywhere-database/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 16:55:34 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=70</guid>
		<description><![CDATA[Sybase has some "terrific" tools that make upgrading your "ancient" database to their latest offering a snap.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=70&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently needed to upgrade an &#8220;ancient&#8221; Sybase Adaptive Server Anywhere database to SQL Anywhere 11.  Sybase has some &#8220;terrific&#8221; tools that make upgrading your &#8220;ancient&#8221; database to their latest offering a snap.</p>
<p>Follow these steps borrowed from Sybase&#8217;s own documentation (<em>iAnywhere Solutions, Inc.)</em>:</p>
<p>To rebuild a database (Sybase Central)</p>
<p>1. Carry out the standard precautions for upgrading software. See Important upgrade precautions.</p>
<p>2. If possible, defragment the drive where the new database will be stored because a fragmented drive can decrease database performance.</p>
<p>3. Ensure that you have exclusive access to the database to be unloaded and reloaded. No other users can be connected.</p>
<p>4. From the Start menu, choose Programs » SQL Anywhere 11 » Sybase Central.</p>
<p>5. From the Tools menu, choose SQL Anywhere 11 » Unload Database.</p>
<p>6. Read the introductory page of the Unload Database Wizard, and click Next.</p>
<p>7. Select Unload A Database Running On An Earlier Version Of The Server, Or A Database That Is Not Running. Enter the connection information for the database.<br />
Click Next.</p>
<p>8. Select Unload And Reload Into A New Database. Click Next.</p>
<p>9. Specify a new file name for the database. Click Next.<br />
You can specify the page size for the new database. In version 11, the default (and recommended) page size is 4096 bytes.<br />
You can encrypt the database file if you want. If you choose strong encryption, you need the encryption key each time you want to start the database. See Encrypting a database.</p>
<p>10. Choose to unload structure and data. Click Next.</p>
<p>11. Specify whether you want to connect to the new database when the unload/reload is complete.</p>
<p>12. Click Finish. Examine the new database to confirm that the rebuild completed properly.</p>
<p><em>iAnywhere Solutions, Inc., &#8220;Rebuilding version 9 and earlier databases for version 11.0.0.&#8221; 2008.http://dcx.sybase.com/1100en/sachanges_en11/unloading-reloading-upgrading-newjasper.html#v10upgrade-b-3548731 (accessed 01-14-2010). </em></p>
<p><em>Copyright © 2008, iAnywhere Solutions, Inc. &#8211; SQL Anywhere 11.0.0</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=70&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/01/15/upgrading-your-ancient-sql-anywhere-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>News Cycles</title>
		<link>http://jeffblacktn.wordpress.com/2010/01/15/news-cycles/</link>
		<comments>http://jeffblacktn.wordpress.com/2010/01/15/news-cycles/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 12:32:11 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[nonsense]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/2010/01/15/news-cycles/</guid>
		<description><![CDATA[Deep Thoughts: Do you suppose Tiger Woods is &#8220;thankful&#8221; for the Detroit airplane terrorist and the Haitian earthquake?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=67&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Deep Thoughts: Do you suppose Tiger Woods is &#8220;thankful&#8221; for the Detroit airplane terrorist and the Haitian earthquake?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=67&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2010/01/15/news-cycles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
		<item>
		<title>Sybase: Search stored procedures containing specific text</title>
		<link>http://jeffblacktn.wordpress.com/2009/12/28/sybase-search-stored-procedures-containing-specific-text/</link>
		<comments>http://jeffblacktn.wordpress.com/2009/12/28/sybase-search-stored-procedures-containing-specific-text/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 16:32:27 +0000</pubDate>
		<dc:creator>Jeff Black</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sybase]]></category>

		<guid isPermaLink="false">http://jeffblacktn.wordpress.com/?p=56</guid>
		<description><![CDATA[I frequently have a need to search my Sybase ASE 15 database for stored procedures containing a specific string of text. The following SQL may be used to return a listing of stored procedures that contain a fragment of text: select distinct object_name(c.id) from syscomments c where c.texttype = 0 and c.text like '%correct defect [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=56&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I frequently have a need to search my Sybase ASE 15 database for stored procedures containing a specific string of text.</p>
<p>The following SQL may be used to return a listing of stored procedures that contain a fragment of text:</p>
<p><code><br />
select distinct object_name(c.id)<br />
from syscomments c<br />
where c.texttype = 0<br />
and c.text like '%correct defect 9781%'<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffblacktn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffblacktn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffblacktn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffblacktn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffblacktn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffblacktn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffblacktn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffblacktn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffblacktn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffblacktn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffblacktn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffblacktn.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffblacktn.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffblacktn.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffblacktn.wordpress.com&amp;blog=5472243&amp;post=56&amp;subd=jeffblacktn&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffblacktn.wordpress.com/2009/12/28/sybase-search-stored-procedures-containing-specific-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/90dfc8a82d041ef77a781b28bb510c50?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jb</media:title>
		</media:content>
	</item>
	</channel>
</rss>
