<?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>Pramati News &#38; Blogs</title>
	<atom:link href="http://server.pramati.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://server.pramati.com/blog</link>
	<description>Java, J2EE, Middleware &#38; more..</description>
	<lastBuildDate>Tue, 17 Aug 2010 09:46:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Deploying Applications On Pramati Server From MyEclipse Development Environment</title>
		<link>http://server.pramati.com/blog/2010/08/17/deploying-applications-on-pramati-server-from-myeclipse-development-environment/</link>
		<comments>http://server.pramati.com/blog/2010/08/17/deploying-applications-on-pramati-server-from-myeclipse-development-environment/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 09:45:36 +0000</pubDate>
		<dc:creator>tribikram</dc:creator>
				<category><![CDATA[Pramati Server]]></category>
		<category><![CDATA[ANT]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[MyEclipse]]></category>
		<category><![CDATA[Pramati]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=310</guid>
		<description><![CDATA[Pramati Server provides several useful Ant Task implementations for day to day activities with server. Extending the highly useful remoteshell tool, these ant tasks can help to ease out our burden by scripting several repetitive tasks in our very own ANT scripts. More detailed info on all available ANT tasks shall be covered in another [...]]]></description>
			<content:encoded><![CDATA[<p>Pramati Server provides several useful Ant Task implementations for day to day activities with server. Extending the highly useful remoteshell tool, these ant tasks can help to ease out our burden by scripting several repetitive tasks in our very own ANT scripts. More detailed info on all available ANT tasks shall be covered in another post.</p>
<p>Here we are discussing one of the most sought after feature of deploying our J2EE/JavaEE compliant application in to Pramati Server Using Ant Script. Most IDEs allow configuring a custom build script for the project. Using this feature the deployment activity can be configured as an ANT task in the build script.</p>
<p>IDE Used: <strong>MyEclipse 6.0</strong></p>
<p>Target Server: <strong>Pramati Server 6.0 SP3</strong></p>
<p>Below mentioned is a step by step procedure on how to configure and Run the Deployment Task Builder In MyEclipse.</p>
<p>1.  Make sure the Pramati Server instance is already up and running on the machine. Open the MyEclipse IDE and create a new Web Application.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/01-Create_web_project_1.jpg" target="_blank"><img class="alignnone size-medium wp-image-312" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/01-Create_web_project_1-300x225.jpg" alt="01-Create_web_project_1" width="300" height="225" /></a></p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/02-Create_web_project_2.jpg"><img class="alignnone size-medium wp-image-313" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/02-Create_web_project_2-300x224.jpg" alt="02-Create_web_project_2" width="300" height="224" /></a></p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/03-Created_web_project.jpg"><img class="alignnone size-medium wp-image-314" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/03-Created_web_project-300x225.jpg" alt="03-Created_web_project" width="300" height="225" /></a></p>
<p>2.  Create a file named <em>pramatiDeployer.xml</em> any where on the disc (say <em>D:\pramatiDeployer\</em> folder) with the following content:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;project name=&quot;AntShell&quot; default=&quot;servertasks&quot;&gt;

	&lt;property name=&quot;pramati_install_dir&quot; value=&quot;D:/Pserver&quot;/&gt;
	&lt;property name=&quot;pramati_node_name&quot; value=&quot;default&quot;/&gt;

    &lt;taskdef name=&quot;pramati&quot; classname=&quot;com.pramati.tools.ant.AntTaskHandler&quot; /&gt;

	&lt;target name=&quot;buildwar&quot;&gt;
		&lt;jar jarfile=&quot;${build_project}/${project_name}.war&quot; basedir=&quot;${build_project}/WebRoot&quot; /&gt;
	&lt;/target&gt;

    &lt;target name=&quot;servertasks&quot; depends=&quot;buildwar&quot; &gt;
		&lt;echo message=&quot;Project Directory :${build_project}&quot;/&gt;
    	&lt;echo message=&quot;Project Name :${project_name}&quot;/&gt;
            &lt;pramati verbose=&quot;true&quot;
                     node=&quot;${pramati_node_name}&quot;
                     installroot=&quot;${pramati_install_dir}/server&quot;
                     ip=&quot;localhost&quot;
                     port=&quot;9191&quot;
                     realm=&quot;system&quot;
                     user=&quot;root&quot;
                     password=&quot;pramati&quot;
                     fork=&quot;false&quot;
                     debug=&quot;true&quot;
                     classpath=&quot;${pramati_install_dir}/server/lib/pramati/classpath.jar&quot;
                     endorseddirs=&quot;${pramati_install_dir}/server/lib/std/endorsed&quot;
                     command=&quot;deploy ${build_project}/${project_name}.war&quot;/&gt;
    &lt;/target&gt;

    &lt;!--&lt;target name=&quot;servertasks&quot; depends=&quot;buildwar&quot; &gt;
		&lt;echo message=&quot;Project Directory :${build_project}&quot;/&gt;
    	&lt;echo message=&quot;Project Name :${project_name}&quot;/&gt;
    	&lt;echo message=&quot;Placing the archive in Autodeploy folder&quot;/&gt;
    	&lt;copy file=&quot;${build_project}/${project_name}.war&quot;
				todir=&quot;${pramati_install_dir}/server/nodes/${pramati_node_name}/archives/autodeploy&quot;&gt;
    	&lt;/copy&gt;
  	&lt;/target&gt;--&gt;

&lt;/project&gt;
</pre>
<p>3.  You can customize the parameters pramati_install_dir, pramati_node_name, port(naming-port), realm, user and password as per the target deployment server and node configuration.</p>
<p>4. Right click on the project and click import. Select <strong>General-&gt;File System</strong>, and click Next.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/import.jpg"><img class="alignnone size-medium wp-image-315" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/import-256x300.jpg" alt="import" width="256" height="300" /></a></p>
<p>5. Click &#8216;Browse&#8217; against &#8216;From Directory&#8217; box and navigate to the folder containing pramatiDeployer.xml. Click on the check box against pramatiDeployer.xml and click &#8220;<strong>Finish</strong>&#8221; to import it into the root directory of the web Application just created</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/import-2.jpg"><img class="alignnone size-medium wp-image-316" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/import-2-278x300.jpg" alt="import-2" width="278" height="300" /></a></p>
<p>6. Now the file shall be available in the Projects Package Explorer Window file list.</p>
<p>7. Right click  on the file and go to <strong>Run As -&gt; Open External Tools Dialog</strong>.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/open-external-tools-dialog.jpg"><img class="alignnone size-medium wp-image-317" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/open-external-tools-dialog-300x218.jpg" alt="open-external-tools-dialog" width="300" height="218" /></a></p>
<p>8. In the window that follows, double click the &#8220;<strong>Ant Build</strong>&#8221; entry on the left panel to add a new Ant Build. The Following screen appears.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/create-ant-build-tool.jpg"><img class="alignnone size-medium wp-image-318" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/create-ant-build-tool-300x228.jpg" alt="create-ant-build-tool" width="300" height="228" /></a></p>
<p>9. In case multiple Ant Script build are listed under &#8220;<strong>Ant Build</strong>&#8221; entry on the left panel, select the one containing the Project Name you are currently working on.</p>
<p>10. Navigate to &#8220;<strong>Classpath</strong>&#8221; tab and Click on &#8220;<strong>User Entries</strong>&#8220;. Then click on &#8220;<strong>Add External JARs</strong>&#8221; .</p>
<p>11. Navigate to the jar <em>&lt;Pramati_server_install&gt;/server/lib/pramati_client/pramati_ant.jar</em> and click on &#8220;<strong>Open</strong>&#8221; to add the same to classpath.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/create-ant-build-tool-2.jpg"><img class="alignnone size-medium wp-image-319" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/create-ant-build-tool-2-300x219.jpg" alt="create-ant-build-tool-2" width="300" height="219" /></a></p>
<p>12. Click on &#8220;<strong>Apply</strong>&#8221; and &#8220;<strong>Close</strong>&#8221; on External Tools Window.</p>
<p>13. Now our script is available as a build script which can be added to the Auto Build sequence. To do so, Right click on the project. Go to <strong>Properties-&gt;Builders-&gt;Import</strong>.</p>
<p>14. Select the newly created build script from the listed entries. Take care to choose the one with the current project name, if more than one entries are listed.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/import-builder.jpg"><img class="alignnone size-medium wp-image-320" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/import-builder-300x262.jpg" alt="import-builder" width="300" height="262" /></a></p>
<p>15.  Click on &#8220;<strong>OK</strong>&#8220;. Now edit the imported builder by clicking on &#8220;<strong>Edit</strong>&#8220;. The following window appears.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/edit-imported-builder.jpg"><img class="alignnone size-medium wp-image-321" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/edit-imported-builder-300x240.jpg" alt="edit-imported-builder" width="300" height="240" /></a></p>
<p>16. Go to &#8220;<strong>Targets</strong>&#8221; tab and Click on &#8220;<strong>Set Targets</strong>&#8221; button against the &#8220;<strong>Auto  Build</strong>&#8221; Box. On the &#8220;<strong>Set Targets</strong>&#8221; dialog that appears, Select the &#8220;<strong>servertask</strong>&#8221; entry and click ok.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/add-servertask-to-auto-build.jpg"><img class="alignnone size-medium wp-image-322" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/add-servertask-to-auto-build-300x239.jpg" alt="add-servertask-to-auto-build" width="300" height="239" /></a></p>
<p>17. Go to &#8220;<strong>Main</strong>&#8221; tab and add the following in the &#8220;<strong>Arguments</strong>&#8221; text box.</p>
<pre class="brush: plain;">
-Dbuild_project=${build_project} -Dproject_name=${project_name}
</pre>
<p>18. Click on &#8220;<strong>OK</strong>&#8220;. This shall finish the configuration and run the auto build process immediately causing our script to be executed.</p>
<p>19. The following shall appear on the MyEclipse console window in case of successful deployment.</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/build_output.jpg"><img class="alignnone size-medium wp-image-323" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/build_output-300x238.jpg" alt="build_output" width="300" height="238" /></a></p>
<p>20.  Corresponding out put on the Pramati Server console:</p>
<p><a href="http://server.pramati.com/blog/wp-content/uploads/2010/08/Server-console-output.jpg"><img class="alignnone size-medium wp-image-324" src="http://server.pramati.com/blog/wp-content/uploads/2010/08/Server-console-output-300x206.jpg" alt="Server-console-output" width="300" height="206" /></a></p>
<p><strong>In case of any errors</strong><br />
1. Check correctness of the pramati_install_dir and other configured parameters in pramatiDeployer.xml.<br />
2. Make Sure the server is running<br />
3. Make sure the pramati_ant.jar is placed in classpath and is from the same setup as the target server</p>
<p>Customized deployments can also be done. For example deployments with custom context root, mapping resource (like Datasource) names etc. Steps for the same shall follow in next post.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F08%2F17%2Fdeploying-applications-on-pramati-server-from-myeclipse-development-environment%2F', 'Deploying+Applications+On+Pramati+Server+From+MyEclipse+Development+Environment')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F08%2F17%2Fdeploying-applications-on-pramati-server-from-myeclipse-development-environment%2F', title: '+Deploying+Applications+On+Pramati+Server+From+MyEclipse+Development+Environment+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/08/17/deploying-applications-on-pramati-server-from-myeclipse-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling Unsafe SSL Session Renegotiation on Pramati Server</title>
		<link>http://server.pramati.com/blog/2010/08/10/disabling-unsafe-ssl-session-renegotiation-on-pramati-server/</link>
		<comments>http://server.pramati.com/blog/2010/08/10/disabling-unsafe-ssl-session-renegotiation-on-pramati-server/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 11:26:48 +0000</pubDate>
		<dc:creator>tribikram</dc:creator>
				<category><![CDATA[Pramati Server]]></category>
		<category><![CDATA[Renegotiation]]></category>
		<category><![CDATA[Session]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=302</guid>
		<description><![CDATA[Pramati Server internally uses, JDK SSL sockets to communicate over https. The underlying JDK in use, handles ssl handshake and re-negotiation if required. Hence to disable session renegotiation, one must use a JDK which has the issue addressed (for Example JDK 1.6 update 21). For already installed pramati servers, one can change the JDK in [...]]]></description>
			<content:encoded><![CDATA[<p>Pramati Server internally uses, JDK SSL sockets to communicate over https. The underlying JDK in use, handles ssl handshake and re-negotiation if required. Hence to disable session renegotiation, one must use a JDK which has the issue addressed (for Example JDK 1.6 update 21). For already installed pramati servers, one can change the JDK in use by changing JAVA_HOME variable in the file &lt;server-install&gt;/server/bin/setup.bat (or setup.sh in UNIX OS).</p>
<pre class="brush: plain;">
@ ECHO Generated batch file to setup Environment Variables for Pramati Server 6.0
set install_root=D:\Pserver60_1091_SP3\server
set JAVA_HOME=D:\Java\jdk1.6.0_21
set PATH=%JAVA_HOME%\bin;%PATH%
set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%install_root%\lib\pramati\classpath.jar;
 </pre>
<p>Now the nodes can be started using the runserver script file as usual and SSL Session renegotiation shall be disabled by default.</p>
<p><strong>Testing SSL Session renegotiation:</strong><br />
For my test case I have used the instructions at http://blog.ivanristic.com/2009/12/testing-for-ssl-renegotiation.html</p>
<p><strong>The Console output:</strong></p>
<pre class="brush: plain;">
C:\OpenSSL098a\bin&amp;gt;openssl s_client -connect localhost:443
Loading 'screen' into random state - done
CONNECTED(00000784)
depth=0 /C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
verify return:1
---

. . .
[SSL-Handshake-Messages]

. . .
---
HEAD / HTTP/1.0
R
RENEGOTIATING
6776:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:.\ssl\s3_pkt.c:534:

closed

C:\OpenSSL098a\bin&amp;gt;
 </pre>
<p><strong>Step By Step:</strong><br />
1. Navigate to the OpenSSL bin directory on a Command Prompt<br />
2. Execute command to connect to running web server using command</p>
<pre class="brush: plain;">
openssl s_client -connect localhost:443
 </pre>
<p>3. If the server IP and Port are correct, connection will be through and a lot of SSL handshake messages shall be printed on console.</p>
<pre class="brush: plain;">
Loading 'screen' into random state - done
CONNECTED(00000784)
depth=0 /C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
verify return:1
---
Certificate chain
0 s:/C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
i:/C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
---
Server certificate
-----BEGIN CERTIFICATE-----
MIICXzCCAcigAwIBAgIES6tMbTANBgkqhkiG9w0BAQUFADB0MQ4wDAYDVQQGEwVJ
bmRpYTELMAkGA1UECBMCQVAxEjAQBgNVBAcTCUh5ZGVyYWJhZDEQMA4GA1UEChMH
UHJhbWF0aTEUMBIGA1UECxMLRW5naW5lZXJpbmcxGTAXBgNVBAMTEHRlc3QgY2Vy
dGlmaWNhdGUwHhcNMTAwMzI1MTE0MzQxWhcNMTEwMzI1MTE0MzQxWjB0MQ4wDAYD
VQQGEwVJbmRpYTELMAkGA1UECBMCQVAxEjAQBgNVBAcTCUh5ZGVyYWJhZDEQMA4G
A1UEChMHUHJhbWF0aTEUMBIGA1UECxMLRW5naW5lZXJpbmcxGTAXBgNVBAMTEHRl
c3QgY2VydGlmaWNhdGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALi1cXLT
TxkqxCcHVm/7JcoRn3uJlex3NAnEMYNLTopf2SOzdJDYRjd3MHY3JcT+yEtvfNSR
Vpj7KyDTD0Up2XDZyk0+yJAI6DqLelmfak4/uDbXMW9T7jW7Gu2jbJA5WJD5oyHF
MuiWRAu3xdL049H5uRDJpUN2ckVGBN/eBdOnAgMBAAEwDQYJKoZIhvcNAQEFBQAD
gYEASdTN256auusTcKOReeh2OW8y0PS6kI4eSPjAWCqI+bnixtxc5bhNp/p2kjbL
IqcfpQnRmffbMLXlHJgV03DL4jUTXQCwJu6Jw4fHwiUnU+prcruVDSPT9pNZbEId
ou8CYYE5ISVz+wWSXv6tXRDVhLjj4JZVOl58p9DqzUR+Evc=
-----END CERTIFICATE-----
subject=/C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
issuer=/C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
---
No client certificate CA names sent
---
SSL handshake has read 1152 bytes and written 338 bytes
---
New, TLSv1/SSLv3, Cipher is EDH-RSA-DES-CBC3-SHA
Server public key is 1024 bit
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol  : TLSv1
Cipher    : EDH-RSA-DES-CBC3-SHA
Session-ID: 4C5027FBD785EA3AAAB4ACBB45A1426E52D5DF829DD13D1B9CDF25C6266D6FC6
Session-ID-ctx:
Master-Key: 291247553A11AF4AC9FB54DE32D677ACE804605675D3EC58B72572D31E831EFB4D2E6C339AB39458E56E8650D2FF8253
Key-Arg   : None
Start Time: 1280321531
Timeout   : 300 (sec)
Verify return code: 18 (self signed certificate)
---
 </pre>
<p>4. Now, the connection shall remain active for the socket idle timeout seconds, which is usually 3 seconds for default Pramati Server node.<br />
5. We can send first line of Request header now. Paste the following at command prompt and press enter (before the time out happens of-course).</p>
<pre class="brush: plain;">
HEAD / HTTP/1.0
 </pre>
<p>6. Now we can initiate a renegotiation by typing R and pressing enter.</p>
<pre class="brush: plain;">
R
 </pre>
<p>(The time out sure applies here as well. So make sure you key in R and press enter before the time out of 3 seconds starting from the point we pressed enter for the HEAD line above)</p>
<p>7. A renegotiation request is now initiated. Now is the time for results. If JDK does not allow renegotiation, the output on the same window shall be as given below:</p>
<pre class="brush: plain;">
RENEGOTIATING
6776:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:.\ssl\s3_pkt.c:534:
 </pre>
<p>8. If the JDK allows renegotiation, the output shall be like :</p>
<pre class="brush: plain;">
RENEGOTIATING
depth=0 /C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=India/ST=AP/L=Hyderabad/O=Pramati/OU=Engineering/CN=test certificate
verify return:1
 </pre>
<p>9. We can leave the prompt now as it is, and the connection shall be closed automatically by time-out</p>
<pre class="brush: plain;">
closed
 </pre>
<p>JDK also provides a system property to re-enable SSL re-negotiation, which can be configured in the server startup script runserver.bat / runserver.sh.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F08%2F10%2Fdisabling-unsafe-ssl-session-renegotiation-on-pramati-server%2F', 'Disabling+Unsafe+SSL+Session+Renegotiation+on+Pramati+Server')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F08%2F10%2Fdisabling-unsafe-ssl-session-renegotiation-on-pramati-server%2F', title: '+Disabling+Unsafe+SSL+Session+Renegotiation+on+Pramati+Server+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/08/10/disabling-unsafe-ssl-session-renegotiation-on-pramati-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending Java URLs to support your own protocol</title>
		<link>http://server.pramati.com/blog/2010/07/21/custom-protocol-support-with-url/</link>
		<comments>http://server.pramati.com/blog/2010/07/21/custom-protocol-support-with-url/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 12:07:08 +0000</pubDate>
		<dc:creator>Deepak Anupalli</dc:creator>
				<category><![CDATA[Pramati Server]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=263</guid>
		<description><![CDATA[
  We have been evaluating to support deploying applications that are uploaded to ftp/http Servers. Usually to deploy an application, you need to download or copy the archive to the same machine where your Application Server runs. And using one of the various deployment tools provided by the Server, deploy application by specifying the [...]]]></description>
			<content:encoded><![CDATA[<p>
  We have been evaluating to support deploying applications that are uploaded to ftp/http Servers. Usually to deploy an application, you need to download or copy the archive to the same machine where your Application Server runs. And using one of the various deployment tools provided by the Server, deploy application by specifying the file path.
</p>
<p>
  To make the deployment process much simpler, we can now directly deploy the archive using URL spec. Java URLs can be made to work with protocols like http, ftp, etc., with support for introspection of standard headers and authentication mechanisms. For example, you can download an archive uploaded to ftp site as shown below.
</p>
<p><pre class="brush: java;">
  URL url = new URL(&quot;ftp://guest:guest@ftp.mysite.com/apps/myapp.war&quot;);
  URLConnection conn = url.openConnection();
  InputStream is = conn.getInputStream();
  </pre>
</p>
<p>
  You can see that the user &amp; password are also included within the URL, as it requires authentication. Now, all that we need to deploy application is the URL spec., <code>ftp://guest:guest@ftp.mysite.com/apps/myapp.war</code>. This is not just enough, with the growing adoption towards cloud storage services like Amazon S3, there is need to support more protocols. Java allows configuring custom protocol handlers by implementing <code>java.net.URLStreamHandler</code> and placing it in the classpath. The following is a protocol handler for Amazon S3.
</p>
<p><pre class="brush: java;">
  package sun.net.www.protocol.s3;

  public class Handler extends URLStreamHandler {

     protected URLConnection openConnection(URL u) throws IOException {
        InputStream is;
        try {
           RestS3Service s3Service = new RestS3Service(
                    new AWSCredentials(accessKey, secretAccessKey));
           S3Object s3obj = s3Service.getObject(
                    new S3Bucket(u.getHost()), u.getPath().substring(1));
           is = s3obj.getDataInputStream();
        }catch (S3ServiceException e){
           throw new IOException(e);
        }
        final InputStream inputStream = is;
        return new URLConnection(u) {
           public InputStream getInputStream() throws IOException {
              return this.inputStream;
           }
           public void connect() throws IOException {
              // Nothing to do. When we give back this object
           }
        };
     }
  }
  </pre>
</p>
<p>
  The package name for the handler class, <code>sun.net.www.protocol.s3</code> indicates URL mechanism to use this handler for S3 protocol, i.e. for all URLs of the form <code>s3://s3.amazon.com/mybucket/myapp.war</code>, and most importantly the class name should be named as <code>Handler</code>. The package name convention is enforced to make sure the standard protocol handlers are always loaded by the Java boot strap classloaders. However, there is an antidote if you intend to override the default behaviour through system property <code>java.protocol.handler.pkgs</code>, which allows specifying a comma separated list of packages to look for the protocol handlers.
</p>
<p>
  However, the above approach requires protocol handler classes to be placed in system classpath only. There is another approach to control the protocol handling mechanism through the <code>java.net.URLStreamHandlerFactory</code> class, which can be set through a public static method in <code>java.net.URL</code>.
</p>
<p><pre class="brush: java;">
  URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {
     public URLStreamHandler createURLStreamHandler(String protocol) {
        ...
        return null;//if you do not intend to create handler for this protocol
     }
  });
  </pre>
</p>
<p>
  With the Factory approach we can completely customize the class loading mechanism, package and class name conventions and overriding the default protocol handlers. But the downside is, once the Factory is set, it cannot be reset within the JVM. Especially, if running within a Container or Server environment which has the URLStreamHandlerFactory already set, there is no way of setting our own factory again.
</p>
<p>
  Using the above approaches, we can support deploying applications from one of your favourite storage services through its own protocol.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F07%2F21%2Fcustom-protocol-support-with-url%2F', 'Extending+Java+URLs+to+support+your+own+protocol')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F07%2F21%2Fcustom-protocol-support-with-url%2F', title: '+Extending+Java+URLs+to+support+your+own+protocol+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/07/21/custom-protocol-support-with-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance issues with JDBC drivers&#8217; for MS SQL Server</title>
		<link>http://server.pramati.com/blog/2010/06/02/perfissues-jdbcdrivers-mssqlserver/</link>
		<comments>http://server.pramati.com/blog/2010/06/02/perfissues-jdbcdrivers-mssqlserver/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 07:32:33 +0000</pubDate>
		<dc:creator>Shaik Emran Sharif</dc:creator>
				<category><![CDATA[Pramati Server]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mssqlserver]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=245</guid>
		<description><![CDATA[Recently one of our customers reported that their JMS server startup was taking long time, when they restart the server after a downtime. They were using MS SQL Server 2005 as the persistent store for JMS and Microsoft&#8217;s JDBC driver to connect to the database. Upon initial analysis, we figured that there were incomplete transactions [...]]]></description>
			<content:encoded><![CDATA[<p>Recently one of our customers reported that their JMS server startup was taking long time, when they restart the server after a downtime. They were using MS SQL Server 2005 as the persistent store for JMS and Microsoft&#8217;s JDBC driver to connect to the database. Upon initial analysis, we figured that there were incomplete transactions present in the DB during the server restart. JMS Server loads all these transactions in-memory during the startup. The delay was around 20 minutes for 20K incomplete transactions. Ideally, as per our tests with other DBs, this should be done in 15-20 seconds. The thread dumps revealed us that even simple delete queries that are part of this transaction loading step were taking substantial amount of time. We started digging into the database and driver configuration and found that it was JDBC driver which was causing the whole slow-down.</p>
<p>SQL Server differentiates its data types that support Unicode from the ones that just support ASCII. For example, the character data types that support Unicode are nchar, nvarchar, longnvarchar where as their ASCII counter parts are char, varchar and longvarchar respectively. By default, all Microsoft&#8217;s JDBC drivers send the strings in Unicode format to the SQL Server, irrespective of whether the datatype of the corresponding column defined in the SQL Server supports Unicode or not. In the case where the data types of the columns support Unicode, everything is smooth. But, in cases where the data types of the columns do not support Unicode, serious performance issues arise especially during data fetches. SQL Server tries to convert non-unicode datatypes in the table to unicode datatypes before doing the comparison. Moreover, if an index exists on the non-unicode column, it will be ignored. This would ultimately lead to a whole table scan during data fetch, thereby slowing down the search queries drastically.</p>
<p>All the tables created by the JMS Server have non-unicode datatypes and hence will be the indexes on non-unicode datatypes. With this, we fell in the trap of the MS JDBC driver&#8217;s default behaviour, facing a performance degradation.</p>
<p>On digging the driver&#8217;s configuration, we figured that there is a property called <strong>sendStringParametersAsUnicode</strong> which helps in getting rid of this unicode conversion. This property defaults to &#8216;true&#8217; which makes the JDBC driver send every string in Unicode format to the database by default. We switched off this property and achieved two improvements in our use-case:<br />
1) All string parameters of our prepared statements are being sent to the database in ASCII format. This helped us overcome the Unicode conversion overhead.<br />
2) Since Unicode conversion isn&#8217;t happening, all our indexes on varchar columns are being used during data fetches instead of whole table scans.</p>
<p>With this, we were able to get our JMS server started in less than 30 sec.</p>
<p>This performance degradation is quite possible with other driver&#8217;s for Microsoft SQL Server also as the default behaviour in the well-known drivers for MS SQL Server is to send strings as Unicode by default. However, all these drivers have a similar property to tweak the default behaviour. Here is a list of these of properties by vendor:</p>
<table border="1">
<tbody>
<tr>
<th>Vendor</th>
<th>Parameter</th>
</tr>
<tr>
<td>JSQLConnect</td>
<td>asciiStringParameters</td>
</tr>
<tr>
<td>JTDS</td>
<td>sendStringParametersAsUnicode</td>
</tr>
<tr>
<td>DataDirectConnect</td>
<td>sendStringParametersAsUnicode</td>
</tr>
<tr>
<td>Microsoft JDBC</td>
<td>sendStringParametersAsUnicode</td>
</tr>
<tr>
<td>WebLogic Type 4 JDBC SQL Server driver</td>
<td>sendStringParametersAsUnicode</td>
</tr>
</tbody>
</table>
<p></p>
<p>How to apply the property in Pramati Server?<br />
Pramati Server maintains all datasources, jdbc connection factories in an xml file called resource-config.xml. The property <strong>sendStringParametersAsUnicode </strong> has to be added under the &#8216;properties&#8217; element of the corresponding jdbc connection factory.</p>
<p>Example:<br />
&lt;connection-factory authorized-by=&#8221;Container&#8221; classname=&#8221;com.microsoft.sqlserver.jdbc.SQLServerDriver&#8221; description=&#8221;" name=&#8221;jmsdb-cf&#8221; url=&#8221;jdbc:sqlserver://localhost\SQLEXPRESS;DatabaseName=TESTDB&#8221;&gt;<br />
&lt;login-parameters mask-password=&#8221;false&#8221; password=&#8221;pramati&#8221; user=&#8221;sa&#8221;/&gt;<br />
&lt;properties&gt;<br />
<em>&lt;property name=&#8221;sendStringParametersAsUnicode&#8221; value=&#8221;false&#8221;/&gt;</em><br />
&lt;/properties&gt;<br />
&lt;/connection-factory&gt;</p>
<p>Alternately, the property can also be added to the connection url string as shown below:</p>
<p>&lt;connection-factory authorized-by=&#8221;Container&#8221; classname=&#8221;com.microsoft.sqlserver.jdbc.SQLServerDriver&#8221; description=&#8221;" name=&#8221;jmsdb-cf&#8221;<br />
url=&#8221;jdbc:sqlserver://localhost\SQLEXPRESS;DatabaseName=TESTDB;<em>sendStringParametersAsUnicode=false</em>&#8220;&gt;<br />
&lt;login-parameters mask-password=&#8221;false&#8221; password=&#8221;pramati&#8221; user=&#8221;sa&#8221;/&gt;<br />
&lt;properties/&gt;<br />
&lt;/connection-factory&gt;</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F06%2F02%2Fperfissues-jdbcdrivers-mssqlserver%2F', 'Performance+issues+with+JDBC+drivers%26%238217%3B+for+MS+SQL+Server')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F06%2F02%2Fperfissues-jdbcdrivers-mssqlserver%2F', title: '+Performance+issues+with+JDBC+drivers%26%238217%3B+for+MS+SQL+Server+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/06/02/perfissues-jdbcdrivers-mssqlserver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Pramati Server MBeans</title>
		<link>http://server.pramati.com/blog/2010/04/09/working-with-pramati-server-mbeans/</link>
		<comments>http://server.pramati.com/blog/2010/04/09/working-with-pramati-server-mbeans/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 06:46:55 +0000</pubDate>
		<dc:creator>tanuja</dc:creator>
				<category><![CDATA[Pramati Server]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=232</guid>
		<description><![CDATA[Like other Application servers, Pramati Server have Management Console, through which you can monitor server health, configure JDBC, JMS resources and much more  management/administrative activities. All these are done through Management Bean, popularly known as MBeans. Pramati Server&#8217;s Management Console implements Java Management Extensions (JMX) specifications (JSR 77). It also exposes Management APIs to facilitate [...]]]></description>
			<content:encoded><![CDATA[<p>Like other Application servers, Pramati Server have Management Console, through which you can monitor server health, configure JDBC, JMS resources and much more  management/administrative activities. All these are done through Management Bean, popularly known as MBeans. Pramati Server&#8217;s Management Console implements Java Management Extensions (JMX) specifications (JSR 77). It also exposes Management APIs to facilitate server management through custom tools and applications. You can refer to the link <a href="http://www.pramati.com/docstore/1230006/help/mbeanbrowser/working.htm">here </a> to have more idea on it.</p>
<p>If you have installed Pramati Server, then access the Management console through &#8220;http://&lt;host_name&gt;:&lt;port_name&gt;/admin&#8221; and login with default user name, password as &#8220;root&#8221; and &#8220;pramati&#8221; respectively.</p>
<p>where,</p>
<ol>
<li><em>&lt;host_name&gt;</em> :  Is your host name where server is installed</li>
<li> <em>&lt;port_name&gt;</em> :  HTTP listener port value, default is 8181</li>
</ol>
<p>After logging in, on the left navigation panel, click on &#8220;Utilities&#8221;. Now you can see &#8220;MBean Viewer&#8221; link there. MBean Viewer is a utility provided in the Console to allow you to view details about all the MBeans present in and being used by the various Domains. Further expanding the Domain will list all the MBeans related to it. Clicking on a listed MBean will display the following three tabs for the same MBean:</p>
<ol>
<li><em>attributes</em></li>
<li><em>operations</em></li>
<li><em>notifications</em></li>
</ol>
<p>You can also avail the Management APIs for particular MBean, by clicking on the link provided under &#8220;JavaDoc&#8221; section. You can use them as per requirement. Click on the &#8220;Help?&#8221; icon present on MBean Viewer page to know more about it.</p>
<p>Now, lets see a sample which shows the status of the Datasource configured on the Pramati Server. I assume that you already have a DataSource configured on server. Find more information on configuring DataSources <a href="http://www.pramati.com/docstore/1500003/forAdmin/WorkingWithPResources/HowToConfigureDatasourceForJ2EEApps.htm">here</a>.  Now coming to our sample with MBean, here is the snippet of code:</p>
<pre class="brush: java;">
import java.util.Properties;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.naming.InitialContext;

import com.pramati.services.admin.base.StatisticsProvider;
import com.pramati.services.admin.stat.Statistic;
import com.pramati.services.admin.stat.StatisticMetadata;
import com.pramati.services.admin.stat.Stats;
import com.pramati.services.admin.util.PoolStatus;
import com.pramati.services.j2ee.spi.admin.J2EEServerMBean;
import com.pramati.services.resource.spi.admin.JDBCResourceMBean;
import com.pramati.services.resource.spi.admin.JDBCSelfManagedDataSourceMBean;

public class MyMBeanLookup
{
    public static void main(String args[])
    {
        try {
//Create Initial Context to the server where we want to lookup the resources
            Properties props = new java.util.Properties();
            props.put(&quot;java.naming.factory.initial&quot;, &quot;com.pramati.naming.client.PramatiClientContextFactory&quot;);
            props.put(&quot;java.naming.provider.url&quot;, &quot;rmi://127.0.0.1:9191&quot;);
            InitialContext ic = new javax.naming.InitialContext(props);
            J2EEServerMBean mBeanServer = (J2EEServerMBean) ic.lookup(&quot;root-server-mbean&quot;);
//Get Name of Node
            System.out.println(&quot;The Server Node Name is :: &quot; + mBeanServer.getServerName());
//Get hold of JDBCResourceMBean
            JDBCResourceMBean myResourceMbean = mBeanServer.getJDBCResourceService();
//Get all Container Managed DataSources
            JDBCSelfManagedDataSourceMBean[] dataSources = myResourceMbean.getJDBCSelfManagedDataSources();
//Iterate the datasources to get the stats
            for (JDBCSelfManagedDataSourceMBean dataSource : dataSources) {
                Stats getMyStats = dataSource.getStats();
                System.out.println(&quot;The DS name :: &quot; + dataSource.getJNDIName());
                System.out
                        .println(&quot;ConnectionRefreshRate in Minutes :: &quot; + dataSource.getConnectionRefreshRateMinutes());
                System.out
                        .println(&quot;ConnectionRequestTimeout in Seconds :: &quot; + dataSource.getConnectionRequestTimeout());
//Get Pool statistics
                PoolStatus poolStat = dataSource.getCurrentPoolStatus();
                System.out.println(&quot;Total Pool size :: &quot; + poolStat.getPoolSize());
                System.out.println(&quot;Free Pool size :: &quot; + poolStat.getFreePoolSize());
                System.out.println(&quot;in Use Pool size :: &quot; + poolStat.getInUsePoolSize());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
</pre>
<p><span style="font-size: 13.3333px;">Change the following line of code with appropriate host-name and naming port value for successful lookup on server.</span></p>
<p>props.put(&#8221;java.naming.provider.url&#8221;, &#8220;rmi://127.0.0.1:9191&#8243;);</p>
<p>To compile and execute the class successfully, you need to have following list of jar files in classpath:</p>
<ol>
<li> <em>pramati_client_all.jar </em>:   located at &lt;$pserver_install&gt;\server\lib\pramati_client</li>
<li><em>pramati_client_all_jms.jar</em> :   located at &lt;$pserver_install&gt;\server\lib\pramati_client</li>
<li><em>pramati_jmsconn.jar</em> :   located at &lt;$pserver_install&gt;\server\lib\pramati</li>
<li><em>pramati_serveradmin.jar </em>:   located at &lt;$pserver_install&gt;\server\lib\pramati</li>
<li><em>pramati_util.jar</em> :   located at &lt;$pserver_install&gt;\server\lib\pramati</li>
</ol>
<p>On successful execution, you should see the status of the configured DataSource. Similarly you can view other services status through <em> </em></p>
<p><em> com.pramati.services.j2ee.spi.admin.J2EEServerMBean</em><br />
or<br />
<em> com.pramati.services.jms.spi.admin.JMSServerMBean</em></p>
<p>by looking up &#8220;root-server-mbean&#8221; or &#8220;jms-server-mbean&#8221; either from the same VM or remotely.</p>
<p>The sample was for viewing the statistics. You can also make any configurational changes through MBean. Changes can not be done through anonymous login. That means in the above example, user is an anonymous user. You must provide administrative credential details to do so. For this, add following three lines to your code:</p>
<p>props.put(&#8221;java.naming.security.principal&#8221;, &#8220;root&#8221;);<br />
props.put(&#8221;java.naming.security.credentials&#8221;, &#8220;pramati&#8221;);<br />
props.put(&#8221;com.pramati.naming.realm&#8221;, &#8220;system&#8221;);</p>
<p>where,</p>
<ol>
<li> <em>root</em> :   default user name</li>
<li> <em>pramati </em>:   default password</li>
<li> <em>system</em> :   default realm configured on Pramati Server</li>
</ol>
<p>If you are not using the default values of these properties, then replace them with your customized ones.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F04%2F09%2Fworking-with-pramati-server-mbeans%2F', 'Working+with+Pramati+Server+MBeans')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F04%2F09%2Fworking-with-pramati-server-mbeans%2F', title: '+Working+with+Pramati+Server+MBeans+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/04/09/working-with-pramati-server-mbeans/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Configure SSL on Pramati Server using Admin Console</title>
		<link>http://server.pramati.com/blog/2010/04/03/configure-ssl-on-pramati-server-using-admin-console/</link>
		<comments>http://server.pramati.com/blog/2010/04/03/configure-ssl-on-pramati-server-using-admin-console/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 11:54:12 +0000</pubDate>
		<dc:creator>vinod</dc:creator>
				<category><![CDATA[Pramati Server]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=198</guid>
		<description><![CDATA[SSL (Secure Socket Layer), is a request/response protocol that involves public and private keys, as well as a digital certificate. SSL technology allows web browsers and web servers to communicate over a secure connection. In this secure connection, the data that is being sent is encrypted before being sent and then is decrypted upon receipt [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>SSL</strong></em> (Secure Socket Layer), is a request/response protocol that involves public and private keys, as well as a digital certificate. SSL technology allows web browsers and web servers to communicate over a secure connection. In this secure connection, the data that is being sent is encrypted before being sent and then is decrypted upon receipt and before processing. Both the browser and the server encrypt all traffic before sending any data. An SSL connector is pre-configured for the Application Server. By default this feature is disabled on Pramati Server. To configure SSL support on Pramati Server, you need to follow the simple steps:</p>
<p><strong>Configure/Enable Server for HTTPS Requests </strong>:</p>
<p>1. If Pramati Server is already up and running and you want to configure SSL support on the fly with the default (https-port value 443) configuration, execute the following command at Server Shell prompt:</p>
<p>j2eeadmin@default&gt; ssl_accept start</p>
<p>Eg:</p>
<p>Refer the following screen-shot for the details:</p>
<p><img src="/DOCUME%7E1/vinod/LOCALS%7E1/Temp/moz-screenshot-4.jpg" alt="" /><a href="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen1.jpg"><img class="alignnone size-full wp-image-199" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen1.jpg" alt="screen1" width="689" height="82" /></a></p>
<p>2.  If you want to configure SSL support with your own configuration:</p>
<p>* Edit server-config.xml file located at <em>&lt;install_dir&gt;/server/nodes/&lt;node_name&gt;/config/ directory.</em></p>
<p>* Locate the following under the services tag:</p>
<p>&lt;service name=&#8221;WebContainer&#8221; enabled=&#8221;true&#8221; class-name=&#8221;com.pramati.web.WebServer&#8221;&gt;<br />
&lt;property name=&#8221;https-port&#8221; value=&#8221;443&#8243;/&gt;<br />
&lt;/service&gt;</p>
<p>* By default, https-port is set as 443. Set this value to the required HTTPS port as you want to modify and save this file.</p>
<p>* Now, edit web-config.xml file located at <em>&lt;install_dir&gt;/server/nodes/&lt;node_name&gt;/config/ directory.</em></p>
<p>* By default,</p>
<p><code>&lt;protocol http-enabled="true" ssl-enabled="false"/&gt;</code>.</p>
<p>Set <code>ssl-enabled</code> to <code>true</code> as</p>
<p><code>&lt;protocol http-enabled="true" ssl-enabled="true"/&gt;</code>.</p>
<p>* Save the changes and restart Server.</p>
<p>* Note that, you will see the following information during the restart of Pramati Server on the server console:</p>
<p style="text-align: center;"><a href="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen2.jpg"><img class="size-full wp-image-200 aligncenter" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen2.jpg" alt="screen2" width="590" height="86" /></a></p>
<p>This confirms that SSL support is enabled successfully on Pramati Server.</p>
<h3>Manage Security Certificates using Management Console:</h3>
<p>1. Start Pramati Server and access the following url:</p>
<p>http://localhost:8181/admin/</p>
<p>2. Provide the required credentials and navigate to &#8220;<em><strong>Configure &#8211;&gt; Security Certificates</strong></em>&#8221; available in the left panel of management console .</p>
<p>3. By default, you see a test certificate called &#8220;<em><strong>default</strong></em>&#8221; under &#8220;<strong>Server Certificates</strong>&#8221; section.  Click on &#8220;Add&#8221; button:</p>
<p style="text-align: center;"><a href="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen3.jpg"><img class="size-full wp-image-201 aligncenter" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen3.jpg" alt="screen3" width="710" height="242" /></a></p>
<p>4. Once you have clicked &#8220;Add&#8221; button, the following screen will display for the details. Fill the details as per the requirement and click &#8220;<strong>Save</strong>&#8221; button:</p>
<p style="text-align: center;"><a href="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen4.jpg"><img class="size-full wp-image-204 aligncenter" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen4.jpg" alt="screen4" width="731" height="338" /></a></p>
<p>5. Make sure that the certificate name should be equal to the domain name of the site for which you are trying to configure https. In the above example it is test.pramati.com.  Here, you can ignore the port numbers on which you are going to access the application.</p>
<p>6. The created certificate will appear as shown in the following screen-shot:</p>
<p style="text-align: center;"><a href="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen5.jpg"><img class="size-full wp-image-205 aligncenter" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen5.jpg" alt="screen5" width="732" height="173" /></a></p>
<p>The created certificate contains &#8220;Alias&#8221; name with Issued By and Issued To information. Presently both the entries are equal to the target domain name. This indicates that the certificate is generated for this domain and not yet signed by CA.</p>
<p>7.  The server certificates are loaded during the startup of Pramati Server. By default test certificate is the one which is available, can be picked up. Hence, it is suggested that delete the existing test certificate with alias &#8220;<strong>default</strong>&#8221; after creating a new certificate (Eg: samplecert). To delete &#8220;default&#8221; certificate, check the box available against to alias name &#8220;default&#8221;  and click &#8220;<strong>Delete</strong>&#8221; button. Once you have deleted the existing default certificate, restart Pramati Server to use the newly created certificate.</p>
<p><strong>Note</strong>:</p>
<p>It is always recommended that you should have only one certificate under &#8220;<strong>Server Certificate</strong>&#8221; section.</p>
<p>8. The certificate that is generated using Server is a self-signed certificate. For getting the certificate signed by a CA, a Certificate Signing Request (CSR) must be sent to the CA. To obtain the CSR,  click on the certificate&#8217;s alias name (samplecert) and select &#8220;Save CSR&#8221;  option in the next screen.</p>
<p>* In case of <strong>InternetExplorer</strong>, you will get a prompt for saving the file. Click on &#8220;<strong>Save</strong>&#8221; and provide the name as &#8220;<strong>CSRReply.cer</strong>&#8220;.</p>
<p>* In case of <strong>Firefox</strong>, CSR details will be displayed directly in right panel of management console.  Copy the content and paste in a notepad. Save this file as &#8220;<strong>CSRReply.cer</strong>&#8220;.</p>
<p>9.  Once the CSR is generated, the CSR file has to be mailed to the CA. The CA signs the same and sends back the same.</p>
<p>10. Once you have received the mail from CA, extract the CSRReply certificate and save it on the localmachine as &#8220;<strong>CSRReply.cer</strong>&#8220;.</p>
<p>11. As most of the CA&#8217;s are already listed in Pramati Server under &#8220;<strong>Certification Authorities trusted by Server</strong>&#8221; section, you can import the CSRReply on the generated self-signed certificate.</p>
<p>Note:</p>
<p>If the CA is not listed in the trusted certs of Pramati Server, you will get &#8220;<strong>Exception while importing the CSR reply in the store&#8230;</strong>&#8221; exception. To overcome this problem, refer &#8220;<strong>General Exceptions with solutions</strong>&#8221; section which is explained after the completion of the current steps in this post.</p>
<p>12. To import CSRReply, click on alias (samplecert) name and browse for the CSRReply.cer file under &#8220;<strong>Certificate Signing Request Reply</strong>&#8221; section and click &#8220;<strong>Import</strong>&#8220;.</p>
<p>13. Upon the successful import of certificate, the following information(as shown in the screen-shot) will be displayed against the alias name under &#8220;<strong>Server Certificates</strong>&#8221; section:</p>
<p style="text-align: center;"><a href="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen6.jpg"><img class="size-full wp-image-206 aligncenter" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen6.jpg" alt="screen6" width="733" height="164" /></a></p>
<p>14. This confirms that the certificate is issued to domain(test.pramati.com) by CA (verisign).</p>
<p>15. Now, access the following URL to confirm the same:</p>
<p>https://test.pramati.com/admin/ (if you have configured https-port as 443 else you have to access this url with port number specified). Make sure that <strong>test.pramati.com</strong> should points the machine where you have installed the certificate.</p>
<p><strong>General Exceptions with solutions:</strong></p>
<p>1.<br />
<strong>File uploaded. Now putting certificate in store&#8230;</strong></p>
<p><strong>Exception while importing the CSR reply in the store&#8230;:Error while importing the CSR reply. &#8211; Could not establish the certificate chain. </strong></p>
<p>Solution:</p>
<p>The above exception clearly indicates that the certificate chain is incomplete.  A <span>certificate chain</span> is a sequence of certificates, where each certificate in the chain is signed by the subsequent certificate. The last certificate in the chain is normally a <span>self-signed certificate</span>-a certificate that signs itself.</p>
<p>Following is the exception while trying with <strong>verisign trial certificate</strong>:</p>
<p><strong>Exception while importing the CSR reply in the store&#8230;:Error while importing the CSR reply. &#8211; Could not establish the certificate chain. Missing certificate for issuer &#8216;CN=VeriSign Trial Secure Server CA &#8211; G2, OU=Terms of use at https://www.verisign.com/cps/testca (c)09, OU=&#8221;For Test Purposes Only. No assurances.&#8221;, O=&#8221;VeriSign, Inc.&#8221;, C=US&#8217;</strong></p>
<p>*To resolve this problem, firstly, double click on &#8220;CSRReply.cer&#8221; certificate which you have received from CA and saved on the local machine. This certificate contains the information as shown below:</p>
<p><img class="alignnone size-full wp-image-218" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen8.jpg" alt="screen8" /></p>
<p>* This certificate is issued by &#8220;<strong>Verisign Trial Secure Server CA &#8211; G2</strong>&#8220;. So, you need to import root/intermediate certificate for &#8220;<strong>Verisign Trial Secure Server CA &#8211; G2</strong>&#8220;  into &#8220;<strong>Certification Authorities trusted by Server</strong>&#8221; section. You can get these root/intermediate certificates from respective CA. Mostly, all the instructions (download locations) are explained in the CSR reply mail sent by CA.</p>
<p>* Once you have download the root/intermediate certifcate from the respective locations, save this certificate as &#8220;<strong>inter.cer</strong>&#8221; and double click this certificate for the details. Details are as follows:</p>
<p><img class="alignnone size-full wp-image-219" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen9.jpg" alt="screen9" /></p>
<p>* As this certificate is issued by &#8220;<strong>Verisign Trial Secure Server Root CA &#8211; G2</strong>&#8220;, you need to import root/intermediate certificates for &#8220;<strong>Verisign Trial Secure Server Root CA &#8211; G2</strong>&#8221; into &#8220;<strong>Certification Authorities trusted by Server</strong>&#8221; section.</p>
<p>* Once you have download the Root CA certificate from repsective location, save this file as &#8220;<strong>RootCA</strong>.<strong>cer</strong>&#8221; and double click this certificate to view the details. Details are as follows:</p>
<p><img class="alignnone size-full wp-image-220" src="http://server.pramati.com/blog/wp-content/uploads/2010/04/screen10.jpg" alt="screen10" /></p>
<p>* This indicates clearly that the &#8220;issued by&#8221; and &#8220;issued to&#8221; are same. This conclude that the chain completes if you have the above specified two root/intermediate certificates in the Pramati Server&#8217;s trusted store. To import these files, click on &#8220;<strong>Add</strong>&#8221; button under &#8220;<strong>Certification Authorities trusted by Server</strong>&#8221; section and browse for files and click &#8220;import&#8221; button to import the intermediate certificates.</p>
<p>* Once you have imported these files under &#8220;<strong>Certification Authorities trusted by Server</strong>&#8221; section, import CSRReply, by clicking on alias (samplecert) name and browse for the CSRReply.cer file under &#8220;<strong>Certificate Signing Request Reply</strong>&#8221; section and click &#8220;<strong>Import</strong>&#8220;.</p>
<p><img src="/DOCUME%7E1/vinod/LOCALS%7E1/Temp/moz-screenshot-1.jpg" alt="" /><img src="/DOCUME%7E1/vinod/LOCALS%7E1/Temp/moz-screenshot-2.jpg" alt="" /><img src="/DOCUME%7E1/vinod/LOCALS%7E1/Temp/moz-screenshot-3.jpg" alt="" /><img src="/DOCUME%7E1/vinod/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="" /></p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F04%2F03%2Fconfigure-ssl-on-pramati-server-using-admin-console%2F', 'Configure+SSL+on+Pramati+Server+using+Admin+Console')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F04%2F03%2Fconfigure-ssl-on-pramati-server-using-admin-console%2F', title: '+Configure+SSL+on+Pramati+Server+using+Admin+Console+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/04/03/configure-ssl-on-pramati-server-using-admin-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Server Certificate for SSL/https on Pramati Server using Server Command Prompt</title>
		<link>http://server.pramati.com/blog/2010/04/01/configuring-server-certificate-for-ssl-https-on-pramati-server-using-server-command-prompt/</link>
		<comments>http://server.pramati.com/blog/2010/04/01/configuring-server-certificate-for-ssl-https-on-pramati-server-using-server-command-prompt/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 07:59:00 +0000</pubDate>
		<dc:creator>tribikram</dc:creator>
				<category><![CDATA[Pramati Server]]></category>
		<category><![CDATA[Pramati server certificate ssl https commnd prompt console]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=193</guid>
		<description><![CDATA[To use SSL on Pramati Server the server should support https protocol and a should have a certificate that can be presented to client for verification. The certificate should be signed by a Trusted Certifying agency like Verisign for the clients to trust the same.
The certificate creation, signing and import on to server can be [...]]]></description>
			<content:encoded><![CDATA[<p>To use SSL on Pramati Server the server should support https protocol and a should have a certificate that can be presented to client for verification. The certificate should be signed by a Trusted Certifying agency like Verisign for the clients to trust the same.</p>
<p>The certificate creation, signing and import on to server can be done using both the web console and the server command prompt. In this article we discuss on how to carry out the following steps using Pramati server command prompt or a Remoteshell prompt:</p>
<ul>
<li>Create the Server certificate</li>
</ul>
<ul>
<li>Generate the Certificate Signing Request (CSR)</li>
</ul>
<ul>
<li>Get the CSR signed by a Trusted Certifying Agency (CA)</li>
</ul>
<ul>
<li>Import the CA reply certificate into Pramati Server</li>
</ul>
<p><strong>Create the Server certificate:</strong></p>
<p>1. Go to the server command prompt window with j2eeadmin@&lt;node-name&gt; prompt (or remoteshell prompt).</p>
<p>2. Type &#8220;<em>secsh</em>&#8221; without the quotes and press enter at the j2eeadmin@&lt;node-name&gt; prompt. You shall be presented with the security shell command prompt securityShell@&lt;node-name&gt;.</p>
<p>3. Create a new Server Certificate: Type &#8220;<em>generate_cert</em>&#8221; without the quotes and press enter. Provide the details asked for one by one. For example</p>
<p><em>securityShell@default&gt;<strong> generate_cert</strong></em></p>
<p><em>Please Enter the following values required by the command:<br />
Note: Fields followed by * are mandatory<br />
You can press &#8216;Enter&#8217; for default values shown in [ ]<br />
Typing &#8216;q&#8217; and pressing enter at any point will cancel the current command</em></p>
<p><em>securityShell@default&gt; &#8211; alias * #<strong>myalias</strong><br />
securityShell@default&gt; &#8211; Common Name * #<strong>testsite.com</strong><br />
securityShell@default&gt; &#8211; Organization Unit * #<strong>SampleOrganisation</strong><br />
securityShell@default&gt; &#8211; Organization * #<strong>sampleOrg</strong><br />
securityShell@default&gt; &#8211; City * #<strong>Mumbai</strong><br />
securityShell@default&gt; &#8211; State * #<strong>Maharastra</strong><br />
Two Letter Code for Country, e.g IN<br />
securityShell@default&gt; &#8211; Country * #<strong>IN</strong><br />
securityShell@default&gt; &#8211; Validity [365] #<strong>365</strong><br />
Key Algo can be &#8216;RSA&#8217; or &#8216;DSA&#8217;<br />
securityShell@default&gt; &#8211; Key Algo [RSA] #<strong>RSA</strong><br />
Key Size must be a multiple of 64.<br />
securityShell@default&gt; &#8211; Key Size [1024] #<strong>1024</strong><br />
A few examples of Sign algorithm :<br />
MD5WithRSA<br />
SHA1WithRSA<br />
SHA1WithDSA<br />
securityShell@default&gt; &#8211; Sign Algo [MD5WithRSA] #<strong>MD5WithRSA</strong><br />
Certificate &lt;myalias&gt; Added to the server keystore.</em></p>
<p>Please note that the <em>Common Name  a</em>ttribute should set to a value equal to the site on which the certificate is supposed to be used. Like in the example, the applications on the server can be accessed using https://testsite.com/app1/. In case the site name differs from the <em>Common Name  a</em>ttribute, client/browser shall raise and SSL handshake error.</p>
<p>You can confirm the addition of the new certificate using the command &#8220;<em>list_server_cert</em>&#8221; without the quotes.</p>
<p><strong>Generate the Certificate Signing Request (CSR):</strong></p>
<p>1. Type &#8220;generate_csr&#8221; without the quotes and press enter. Provide the details asked for reg alias and target file name. For example:</p>
<p><em>securityShell@default&gt; generate_csr</em></p>
<p><em>Please Enter the following values required by the command:<br />
Note: Fields followed by * are mandatory<br />
You can press &#8216;Enter&#8217; for default values shown in [ ]<br />
Typing &#8216;q&#8217; and pressing enter at any point will cancel the current command</em></p>
<p><em>securityShell@default&gt; &#8211; alias * #myalias</em></p>
<p><em>securityShell@default&gt; &#8211; fileName * #mycert.csr<br />
CSR generated for &lt;myalias&gt; and stored in D:\Pserver\server\bin\mycert.csr</em></p>
<p><strong>Get the CSR signed by a Trusted Certifying Agency (CA):</strong></p>
<p>1. The .csr file should be sent for signing to desired CA. You may type exit in security shell to return back to j2eeadmin prompt.</p>
<p><strong>Import the CA reply certificate into Pramati Server:</strong></p>
<p>1. Take a back up of the existing keystore files from the node (castore,servercerts,trustedcacerts) config directory. (&lt;server-install&gt;/server/nodes/&lt;node-name&gt;/config directory)</p>
<p>2. Go to the server command prompt window with j2eeadmin@&lt;node-name&gt; prompt (or remoteshell prompt).</p>
<p>3. Type &#8220;<em>secsh</em>&#8221; without the quotes and press enter at the j2eeadmin@&lt;node-name&gt; prompt. You shall be presented with the security shell command prompt securityShell@&lt;node-name&gt;.</p>
<p>4. List the available aliases in the server certificate store by executing the following command at securityShell</p>
<p><em>list_server_cert</em></p>
<p>5. Place the reply certificate file from CA in &lt;server-install&gt;/server/bin directory. Say &lt;server-install&gt;/server/bin/signedCert.crt.</p>
<p>6. Execute the following command at at securityShell</p>
<p><em>import_csr_reply</em></p>
<p>Provide the inputs prompted for. For example :</p>
<p><em>securityShell@test&gt; &#8211; alias * #<strong>myNewCertAlias</strong><br />
securityShell@test&gt; &#8211; fileName * #<strong>signedCert.crt</strong></em></p>
<p>7. The ca replyt shall be imported to the server keysotre.</p>
<p>8. You can use &#8220;<em>import_cert</em>&#8221; command (without the quotes) to import additional CA and intermediate certificates to trusted keystore of the server. Files to be imported have to be placed in &lt;server-install&gt;/server/bin directory. You can use keytool command from jdk, to import such files as well.</p>
<p>The Signed certificate is now imported to server and ready for use on https access.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F04%2F01%2Fconfiguring-server-certificate-for-ssl-https-on-pramati-server-using-server-command-prompt%2F', 'Configuring+Server+Certificate+for+SSL%2Fhttps+on+Pramati+Server+using+Server+Command+Prompt')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F04%2F01%2Fconfiguring-server-certificate-for-ssl-https-on-pramati-server-using-server-command-prompt%2F', title: '+Configuring+Server+Certificate+for+SSL%2Fhttps+on+Pramati+Server+using+Server+Command+Prompt+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/04/01/configuring-server-certificate-for-ssl-https-on-pramati-server-using-server-command-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploying Apache ActiveMQ JCA Adapter on Pramati Server</title>
		<link>http://server.pramati.com/blog/2010/03/25/deploying-apache-activemq-jca-adapter-on-pramati-server/</link>
		<comments>http://server.pramati.com/blog/2010/03/25/deploying-apache-activemq-jca-adapter-on-pramati-server/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 12:52:00 +0000</pubDate>
		<dc:creator>tribikram</dc:creator>
				<category><![CDATA[Pramati Server]]></category>
		<category><![CDATA[ActiveMQ Pramati Server Deploy JCA adapter]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=172</guid>
		<description><![CDATA[Integrating application servers to Third party Enterprise Service Providers like JDBC and JMS has been streamlined through use of JCA 1.5 compliant adapters. This article focuses on deployment of ActiveMQ JCA 1.5 compliant adapter on to Pramati Server 6.0 Server.
Prerequisites:

 Pramati Server 6.0 Installation
Active MQ installation
Active MQ adapter rar distribution (Bundled with Active MQ distribution [...]]]></description>
			<content:encoded><![CDATA[<p>Integrating application servers to Third party Enterprise Service Providers like JDBC and JMS has been streamlined through use of <strong>JCA 1.5 compliant adapters</strong>. This article focuses on deployment of ActiveMQ JCA 1.5 compliant adapter on to Pramati Server 6.0 Server.</p>
<p><strong>Prerequisites:</strong></p>
<ol>
<li> Pramati Server 6.0 Installation</li>
<li>Active MQ installation</li>
<li>Active MQ adapter rar distribution (Bundled with Active MQ distribution in activeMQ\lib\optional directory)</li>
</ol>
<p><strong>Versions used here:</strong></p>
<ol>
<li>Pramati Server 6.0 SP3 with JDK 1.6</li>
<li>Apache Active MQ 5.2.0</li>
</ol>
<p><strong>Required resources can be located at:</strong></p>
<ol>
<li> http://server.pramati.com/download</li>
<li>http://activemq.apache.org/download.html</li>
</ol>
<p><strong>Deployment Process:</strong><br />
Deployment process is straight forward with deploytool. (For cases where GUI/Deploytool is unavailable, we shall quote a sample descriptor that can be bundled and deployed).<br />
1. Start any node of the server on a console prompt or Connect to any running node through remote shell (<a href="http://server.pramati.com/blog/2009/12/14/the-pramati-server-remote-shell/">The Pramati Server Remote Shell</a>).<br />
2. Execute command &#8220;deploytool&#8221; without quotes to open the deploytool GUI.<br />
3. In the deploytool GUI, click on the last entry of activemq-rar-5.2.0.rar.<br />
4. Edit Parameters on the right pane general tab as required to point to the active MQ server. If the active MQ server is running on the same machine with default values, no changes are necessary in this section.<br />
5. If active MQ server is running on a different machine, the ServerUrl (Under Configuration Properties Section) should be changed to point to the corresponding ip:port. User name password if changed form default on Active MQ server, should be changed here as well. These properties shall be used by the Resource Adapter to connect to the Active MQ Server from the Pramati Server JVM.<br />
6. The Work Manager Configuration can be left with default values. This Work manager API is supposed to be used internally by the application server to manage threads for the inbound connections to Active MQ.<br />
7. On the Configuration Tab, Click on &#8220;Change&#8221; button in &#8220;Connection Resource Properties&#8221; section. On the window that appears, click on ok.<br />
8. Now, Configure a Connection Factory in the &#8220;Connection Configuration&#8221; section. Provide a jndi name under which the connection factory shall be bound on server. For example &#8220;jca/ActiveMQConnection&#8221;. Set a pool size that will be maintained by server for connections from this connection factory. For Example : 20. Leave Author option to &#8220;container&#8221;. Provide the username and password in the corresponding text boxes that will be used to connect to Active MQ server (default values are &#8220;defaultUser&#8221; and &#8220;defaultPassword&#8221;). Now click on add to add this connection factory configuration to the (now empty) list on the middle pane.<br />
9. Similarly many other connection factories can be created as per requirement and added to the list in the middle pane.<br />
10. Now click on save button of Deploytool GUI to save the (auto-generated) Deployment descriptor file (pramati-j2ee-server.xml) to the rar archive. This file content can be viewed by clicking on View&#8212;&gt;pramati-j2ee-server.xml link.</p>
<p>Now we are ready to deploy the Resource Adapter on to server.</p>
<p>Click on Deploy button to complete the deployment of the archive.</p>
<p>Post deployment, all the JNDI names can be seen bound in the Server JNDI names list. Applications can look up the same and use to connect to Active MQ Server.</p>
<p><a title="pramati-j2ee-server.xml" href="http://server.pramati.com/blog/wp-content/uploads/2010/03/pramati-j2ee-server.zip" target="_blank">Here</a> is a sample pramati-j2ee-server.xml file that can be bundled with the rar and direct deploy command can be used to deploy the archive. No Deploytool or GUI shall be necessary.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F03%2F25%2Fdeploying-apache-activemq-jca-adapter-on-pramati-server%2F', 'Deploying+Apache+ActiveMQ+JCA+Adapter+on+Pramati+Server')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F03%2F25%2Fdeploying-apache-activemq-jca-adapter-on-pramati-server%2F', title: '+Deploying+Apache+ActiveMQ+JCA+Adapter+on+Pramati+Server+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/03/25/deploying-apache-activemq-jca-adapter-on-pramati-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote debugging with Eclispe for Applications deployed on Pramati Server</title>
		<link>http://server.pramati.com/blog/2010/02/15/remote-debugging-with-eclispe-for-applications-deployed-on-pramati-server/</link>
		<comments>http://server.pramati.com/blog/2010/02/15/remote-debugging-with-eclispe-for-applications-deployed-on-pramati-server/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 10:40:49 +0000</pubDate>
		<dc:creator>vinod</dc:creator>
				<category><![CDATA[Pramati Server]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Remote debugging]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=158</guid>
		<description><![CDATA[The Java Debugger (jdb) is a dynamic, controlled, assignment-based debugging tool. It helps to find and fix bugs in the Java language programs both locally and on the server. To use jdb with Pramati Server,  follow the provided steps below:
1. Edit runserver.bat/runserver.sh file located at &#60;SERVER_INSTALL&#62;\server\bin directory.
2. Add the following properties:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
Eg:
set TEMP1=%PATH%
set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
call [...]]]></description>
			<content:encoded><![CDATA[<p>The <strong>Java Debugger</strong> <strong>(jdb)</strong> is a dynamic, controlled, assignment-based debugging tool. It helps to <em>find and fix bugs</em> in the Java language programs both locally and on the server. To use jdb with Pramati Server,  follow the provided steps below:</p>
<p>1. Edit <strong>runserver.bat/runserver.sh</strong> file located at <strong>&lt;SERVER_INSTALL&gt;\server\bin</strong> directory.<br />
2. Add the following properties:</p>
<p><em><strong>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</strong></em></p>
<p>Eg:</p>
<p><em>set TEMP1=%PATH%<br />
set </em><em><strong>DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</strong><br />
call E:\Servers\PServer50\SP3_test\server\bin\setup.bat<br />
java -server </em><em><strong>%DEBUG_OPTS%</strong> -Xms128m -Xmx512m -Dinstall.root=%install_root% -verbose:gc -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps -Xloggc:verbose_gc.log -Dinstall.root=%install_root% -Djava.security.policy=%install_root%\lib\pramati\pramati.java.policy -Djava.security.auth.policy=%install_root%\lib\pramati\pramati.jaas.policy -Djacorb.home=%install_root%\lib\tp\jacorb -Djava.endorsed.dirs=%install_root%\lib\std\endorsed com.pramati.Server %*<br />
@ set PATH=%TEMP1%</em></p>
<p>3. Make sure that the <strong>address port</strong> (used in above configuration) should be free.<br />
4. Start Pramati Server with the above mentioned parameters.<br />
5. Once Pramati Server has started successfully,  start <strong>Eclipse</strong>.<br />
6. Now, in Eclipse, navigate to Run | Debug option.<br />
7. This will open a dubug window. In this window, right click on <strong>Remote Java Application </strong>and select <strong>New </strong>option<br />
8. In the Create configuration  screen you&#8217;ll be prompted to enter the following values:</p>
<p>* <strong>Name :</strong> Name of the Debugger name, can be any name<br />
* <strong>Project:</strong> Select the Java project that contains the source code you want to debug.<br />
* <strong>Connection Type: </strong>Leave Connection Type  in default, i.e. Standard (Socket Attach) .<br />
* <strong>Host</strong>: enter localhost. If you want to debug a remote server, enter it&#8217;s hostname or IP address.<br />
* <strong>Port</strong>: enter 8000 (as defined in your Pramati Server&#8217;s startup script).</p>
<p>9. Click <strong>Apply</strong><br />
10. In the same screen click<strong> Debug</strong> (Make sure Pramati Server instance is already running in debug mode with suggested prameters). Eclipse should automatically take you to the <strong>Debug  perspective</strong> and you should see a stack trace in the Debug  view.<br />
11. If you are not automatically taken to the Debug  perspective, select <em>Window | Open Perspective | Other</em> and then click  <em>Debug</em> option.<br />
12. Now, add the <em>break points</em> and make a request for the application using browser.<br />
13. The application shall be executed till to reach break point. Once break point has reached, Eclipse Debug window should automatically pop-up with the stack pointer on your first breakpoint. This confirms that the whole debug set up is working fine.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F02%2F15%2Fremote-debugging-with-eclispe-for-applications-deployed-on-pramati-server%2F', 'Remote+debugging+with+Eclispe+for+Applications+deployed+on+Pramati+Server')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2010%2F02%2F15%2Fremote-debugging-with-eclispe-for-applications-deployed-on-pramati-server%2F', title: '+Remote+debugging+with+Eclispe+for+Applications+deployed+on+Pramati+Server+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2010/02/15/remote-debugging-with-eclispe-for-applications-deployed-on-pramati-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collect thread dumps while running java process in background</title>
		<link>http://server.pramati.com/blog/2009/12/30/collect-thread-dumps-while-running-java-process-in-background/</link>
		<comments>http://server.pramati.com/blog/2009/12/30/collect-thread-dumps-while-running-java-process-in-background/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 05:36:46 +0000</pubDate>
		<dc:creator>vinod</dc:creator>
				<category><![CDATA[Other App Server]]></category>
		<category><![CDATA[Pramati Server]]></category>
		<category><![CDATA[adaptj]]></category>
		<category><![CDATA[background process]]></category>
		<category><![CDATA[sendsignal program]]></category>
		<category><![CDATA[stacktrace]]></category>
		<category><![CDATA[thread dump]]></category>

		<guid isPermaLink="false">http://server.pramati.com/blog/?p=151</guid>
		<description><![CDATA[Thread dumps are vital information to debug the application response slow issue and know the server status. If Pramati Server is running as a background process (Service) in Windows, it is very difficult to collect thread dumps. To overcome this problem, use one of the following third party tools:
1. StackTrace tool developed by adaptj
2. SendSignal [...]]]></description>
			<content:encoded><![CDATA[<p>Thread dumps are vital information to debug the application response slow issue and know the server status. If Pramati Server is running as a <strong>background process</strong> (Service) in Windows, it is very difficult to collect thread dumps. To overcome this problem, use one of the following third party tools:</p>
<p><strong>1. StackTrace tool developed by adaptj</strong><br />
<strong>2.</strong> <strong>SendSignal program</strong></p>
<p><strong>1.</strong> <strong>StackTrace</strong> is a tool developed by <strong>adaptj</strong> for inspecting the state of a running JVM without starting it in debug mode and without using any additional startup settings. Visit the following link to download the same:</p>
<p><strong>http://www.adaptj.com/root/main/download</strong></p>
<p>* Now, click on &#8220;<strong>Launch</strong>&#8221; button and save the &#8220;launch.jnlp&#8221; file in the local system.<br />
* Once the launch.jnlp file has been downloaded successfully, double click on the lanuch.jnlp file to execute.  <strong>Please note that this jnlp file requires Internet connection during the execution</strong>.<br />
* Upon the startup, it opens a new window with the title of &#8220;Stack Trace-Untitled&#8221;.<br />
* In the opened window, provide &#8220;<em>Process ID</em>&#8221; (Pramati Server&#8217;s java process id located in task manager) in the textbox.<br />
* Now, select &#8220;Process&#8221; tab and then choose &#8220;Thread dump&#8221; option.<br />
* Upon the selection, it will generates the thread dumps in that tool itself.</p>
<p><strong>2. SendSignal</strong> is a tool which sends <strong>ctrl-break</strong> signal from command  line to JVM to generate thread dumps. Visit the following link to download the same:</p>
<p><strong>http://www.latenighthacking.com/projects/2003/sendSignal/SendSignal.exe</strong></p>
<p>* Once you have downloaded <strong>SendSignal.exe</strong> program from the above mentioned link, open a command prompt and navigate to the directory where you have downloaded this program.<br />
* Increase the screen buffer(right click on the left top corner of the command <em><strong>window&#8211;&gt;Properties&#8211;&gt;Layout&#8211;&gt;Increase the screen buffer height to 9999</strong></em>) size to capture complete thread dumps.<br />
* Now, <strong>Execute </strong>the following command:</p>
<p><em><strong>SendSignal &lt;$PID&gt;</strong></em></p>
<p>Where PID is the java process id related to Pramati Server. We will get this from task manager.</p>
<p>* This command will generate the thread dumps on the command prompt.</p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2009%2F12%2F30%2Fcollect-thread-dumps-while-running-java-process-in-background%2F', 'Collect+thread+dumps+while+running+java+process+in+background')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fserver.pramati.com%2Fblog%2F2009%2F12%2F30%2Fcollect-thread-dumps-while-running-java-process-in-background%2F', title: '+Collect+thread+dumps+while+running+java+process+in+background+' })"/></div>]]></content:encoded>
			<wfw:commentRss>http://server.pramati.com/blog/2009/12/30/collect-thread-dumps-while-running-java-process-in-background/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
