<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-34024422</id><updated>2011-11-05T11:53:19.360-07:00</updated><category term='VPD'/><category term='Application Server'/><category term='Application Server Control'/><category term='ASControl'/><category term='JVM'/><category term='Datasource'/><category term='ROUTER'/><category term='JMX MDB'/><category term='Hermes'/><category term='Oracle Application Server'/><category term='JMS'/><category term='SOA'/><category term='OPMN'/><category term='Cluster'/><category term='AQ'/><category term='OC4J'/><category term='iHat'/><category term='MDB'/><category term='Discoverer'/><title type='text'>Middleware Blogging</title><subtitle type='html'>A blog of middleware technology I am working on and interested in</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34024422.post-5714192933470328531</id><published>2006-12-13T18:25:00.000-08:00</published><updated>2006-12-13T22:37:27.984-08:00</updated><title type='text'>Reset OC4J Admin Password</title><content type='html'>Seems like a rash of questions recently about how to reset Oracle Application Server/OC4J's administrator password and for whatever reason Google doesn't index our doc (&lt;span style="font-style: italic;"&gt;as per the feedback below, due to our robot.txt disallowing this - I don't know why this is the policy&lt;/span&gt;) and as a result isn't finding the entry in our doc on how to do this here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download-west.oracle.com/docs/cd/B31017_01/core.1013/b28940/trouble_asc.htm#BCEDHFEI"&gt;http://download-west.oracle.com/docs/cd/B31017_01/core.1013/b28940/trouble_asc.htm#BCEDHFEI&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Reproduced in its entirety below [1] and hopefully this will help Google point people to the right information.&lt;br /&gt;&lt;br /&gt;One of the "tricks" you have to be aware of when doing this is that if you are using Application Server Control to manage a cluster of OC4J's, there is a default assumption that all the OC4J's use the same administrator password (you can override) - if you are doing this, step 5 of the instructions, which talks about removing the ASControl cached security file (passwords encrypted!) to re-enable cluster management, is important to heed when you do this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;[1]&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;Reset the &lt;code&gt;oc4jadmin&lt;/code&gt; password using the following procedure while you are logged in as the user who installed the Oracle Application Server instance:&lt;/span&gt;&lt;/p&gt; &lt;ol start="1" type="1"&gt;&lt;li&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Stop OC4J and the Application Server Control.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Enter the following command in the Oracle home of the application server instance:&lt;/span&gt;&lt;/p&gt; &lt;pre space="preserve" class="oac_no_warn"&gt;&lt;span style="font-size:100%;"&gt;(UNIX) &lt;span class="italic"&gt;ORACLE_HOME&lt;/span&gt;/opmn/bin/opmnctl stopproc ias-component=OC4J&lt;br /&gt;(Windows) &lt;span class="italic"&gt;ORACLE_HOME\&lt;/span&gt;opmn\bin\opmnctl stopproc ias-component=OC4J&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;a id="sthref1167" name="sthref1167"&gt;&lt;/a&gt;Locate and open the following file in a text editor:&lt;/span&gt;&lt;/p&gt; &lt;pre space="preserve" class="oac_no_warn"&gt;&lt;span style="font-size:100%;"&gt;(UNIX)&lt;span class="italic"&gt;ORACLE_HOME&lt;/span&gt;/j2ee/home/config/system-jazn-data.xml&lt;br /&gt;(Windows)&lt;span class="italic"&gt;ORACLE_HOME&lt;/span&gt;\j2ee\home\config\system-jazn-data.xml&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Locate the line that defines the credentials property for the oc4j&lt;code&gt;admin&lt;/code&gt; user.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;The following example shows the section of &lt;code&gt;system-jazn-data.xml&lt;/code&gt; with the encrypted &lt;code&gt;credentials&lt;/code&gt; entry in boldface type:&lt;/span&gt;&lt;/p&gt; &lt;pre space="preserve" class="oac_no_warn"&gt;&lt;span style="font-size:100%;"&gt;&lt;jazn-realm&gt;&lt;br /&gt; &lt;realm&gt;&lt;br /&gt;    &lt;name&gt;jazn.com&lt;/name&gt;&lt;br /&gt;    &lt;users&gt;&lt;br /&gt;     .&lt;br /&gt;     .&lt;br /&gt;     .&lt;br /&gt;       &lt;user&gt;&lt;br /&gt;          &lt;name&gt;oc4jadmin&lt;/name&gt;&lt;br /&gt;          &lt;display-name&gt;OC4J Administrator&lt;/display-name&gt;&lt;br /&gt;          &lt;description&gt;OC4J Administrator&lt;/description&gt;&lt;br /&gt;&lt;span class="bold"&gt;            &lt;credentials&gt;{903}4L50lHJWIFGwLgHXTub7eYK9e0AnWLUH&lt;/credentials&gt;&lt;/span&gt;&lt;br /&gt;       &lt;/user&gt;&lt;br /&gt;&lt;br /&gt;&lt;/users&gt;&lt;/realm&gt;&lt;/jazn-realm&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Replace the existing encrypted password with the new password.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Be sure to prefix the password with an exclamation point (!). For example:&lt;/span&gt;&lt;/p&gt; &lt;pre space="preserve" class="oac_no_warn"&gt;&lt;span style="font-size:100%;"&gt;&lt;credentials&gt;!mynewpassword123&lt;/credentials&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;a id="sthref1168" name="sthref1168"&gt;&lt;/a&gt;The password for the &lt;code&gt;oc4jadmin&lt;/code&gt; user should conform to following guidelines:&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;li type="disc"&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Must contain at least five characters, but not more than 30 characters.&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li type="disc"&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Must begin with an alphabetic character. It cannot begin with a number, the underscore (_), the dollar sign ($), or the number sign (#).&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li type="disc"&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;At least one of the characters must be a number.&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li type="disc"&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Can contain only the following characters; numbers, letters, and the following special characters: US dollar sign ($), number sign (#), or underscore (_).&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;li type="disc"&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Cannot contain any Oracle reserved words, such as VARCHAR.&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;div align="center"&gt; &lt;div class="inftblnotealso"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;table class="NoteAlso oac_no_warn" summary="This is a layout table to format a tip" title="This is a layout table to format a tip" dir="ltr" border="1" cellpadding="3" cellspacing="0" frame="hsides" rules="groups" width="80%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td align="left"&gt; &lt;p class="notep1"&gt;&lt;span style="font-size:100%;"&gt;See Also:&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:100%;"&gt; "The oc4jadmin User and Restrictions on its Password" in the &lt;span class="italic"&gt;Oracle Application Server Installation Guide&lt;/span&gt;&lt;/span&gt;&lt;!-- a class="olinkSRC GSTAB" href="../../dcommon/html/noexist.htm"--&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;!-- class="inftblnotealso" --&gt;&lt;/div&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Delete cached password data by deleting the contents of the following directory:&lt;/span&gt;&lt;/p&gt; &lt;pre space="preserve" class="oac_no_warn"&gt;&lt;span style="font-size:100%;"&gt;(UNIX)&lt;br /&gt;&lt;span class="italic"&gt;ORACLE_HOME&lt;/span&gt;/j2ee/&lt;span class="italic"&gt;oc4jinstance &lt;/span&gt;/persistence/ascontrol/ascontrol/securestore/&lt;br /&gt;(Windows)&lt;br /&gt;&lt;span class="italic"&gt;ORACLE_HOME&lt;/span&gt;\j2ee\&lt;span class="italic"&gt;oc4jinstance&lt;/span&gt;\persistence\ascontrol\ascontrol\securestore/&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Start OC4J and the Application Server Control.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;After the restart, the Application Server Control will use your new Administrator (&lt;code&gt;oc4jadmin&lt;/code&gt;) password, which will be stored in encrypted format within the &lt;code&gt;system-jazn-data.xml&lt;/code&gt; file.&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-5714192933470328531?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/5714192933470328531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=5714192933470328531&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/5714192933470328531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/5714192933470328531'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/12/reset-oc4j-admin-password.html' title='Reset OC4J Admin Password'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-1397698771828813872</id><published>2006-12-03T18:22:00.000-08:00</published><updated>2006-12-03T18:40:32.098-08:00</updated><title type='text'>OracleAS JVM Analysis in Application Server Control</title><content type='html'>Sometimes you are pleasantly surprised by some of the technologies your colleagues put out.  I was in a meeting with the Application Server Control folks last week and was reminded that a fair bit of work was done around JVM analysis in OracleAS 10.1.3 Application Server Control.&lt;br /&gt;&lt;br /&gt;Check these screen shots below out:&lt;br /&gt;&lt;br /&gt;1. Starting with a quick look at how your heap is doing on your OracleAS instance (remember if you browse my blog, I am running a 6 instance OC4J OracleAS cluster on my laptop).  On this one I have two JVMs running this OC4J:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ZzeakfnWdl4/RXOGnphFyYI/AAAAAAAAAAk/xHDzZ5AIeXI/s1600-h/JVM1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_ZzeakfnWdl4/RXOGnphFyYI/AAAAAAAAAAk/xHDzZ5AIeXI/s320/JVM1.gif" alt="" id="BLOGGER_PHOTO_ID_5004491626656418178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;2. At the bottom of this page, there is a more detailed link to look at the 2 JVM's that that summarized heap usage represents taking me down to statistics summarizing each JVM:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_ZzeakfnWdl4/RXOGrJhFyZI/AAAAAAAAAAs/5GElIcXrbHQ/s1600-h/JVM2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_ZzeakfnWdl4/RXOGrJhFyZI/AAAAAAAAAAs/5GElIcXrbHQ/s320/JVM2.gif" alt="" id="BLOGGER_PHOTO_ID_5004491686785960338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;3. Then I can click on that JVM and see more breakdowns on CPI, active threads, response and load.  At the bottom of this page there is one more button which asks me whether I am using Java SE 5.0 which in turns I can turn on specific MBeans to monitor it.  Before clicking that I have to configure OracleAS to monitor those Mbeans as an optional performance monitoring option.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_ZzeakfnWdl4/RXOGzJhFyaI/AAAAAAAAAA0/b-njZlk0pL8/s1600-h/JVM3.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_ZzeakfnWdl4/RXOGzJhFyaI/AAAAAAAAAA0/b-njZlk0pL8/s320/JVM3.gif" alt="" id="BLOGGER_PHOTO_ID_5004491824224913826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;4. In the server properties, it is a one click option to start up monitoring of the Java SE 5.0 Mbeans:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ZzeakfnWdl4/RXOHEZhFybI/AAAAAAAAAA8/aWeWFykPdGs/s1600-h/JVM4.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_ZzeakfnWdl4/RXOHEZhFybI/AAAAAAAAAA8/aWeWFykPdGs/s320/JVM4.gif" alt="" id="BLOGGER_PHOTO_ID_5004492120577657266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;5. And when I return to the last page I couldn't show before I see more detailed analysis of the threads, memory pools,  resource usage, number of classes loaded amongst others:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ZzeakfnWdl4/RXOJv5hFycI/AAAAAAAAABE/o1XdAM5Z1pg/s1600-h/JVM5.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_ZzeakfnWdl4/RXOJv5hFycI/AAAAAAAAABE/o1XdAM5Z1pg/s320/JVM5.gif" alt="" id="BLOGGER_PHOTO_ID_5004495066925222338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_ZzeakfnWdl4/RXOJy5hFydI/AAAAAAAAABM/ymnLk1oInG8/s1600-h/JVM6.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_ZzeakfnWdl4/RXOJy5hFydI/AAAAAAAAABM/ymnLk1oInG8/s320/JVM6.gif" alt="" id="BLOGGER_PHOTO_ID_5004495118464829906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Would be very interested in other metrics and performance issues you would like to see - my personal area of interest that I see customers facing is capturing this kind of information sensibly for analysis in a cluster versus on a per JVM basis ... which one of my JVMs is misbehaving and how can I now get a sensible thread dump to do the analysis.&lt;br /&gt;&lt;br /&gt;Your views on the utility of this in your management console and what you really need versus surfacing well known metrics would be great. Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-1397698771828813872?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/1397698771828813872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=1397698771828813872&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/1397698771828813872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/1397698771828813872'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/12/oracleas-jvm-analysis-in-application.html' title='OracleAS JVM Analysis in Application Server Control'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_ZzeakfnWdl4/RXOGnphFyYI/AAAAAAAAAAk/xHDzZ5AIeXI/s72-c/JVM1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-1824468629320866566</id><published>2006-12-02T22:04:00.000-08:00</published><updated>2006-12-02T22:30:47.558-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OC4J'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Application Server'/><title type='text'>OC4J HTTP Server on OracleAS 10.1.3.1</title><content type='html'>Here's a deep in the muck kind  of post for those who  want to  know the  gory internals of Oracle Application Server and two ways of having an HTTP server set up on it.&lt;br /&gt;&lt;br /&gt;Oracle provides an HTTP server out of the box if you download OC4J stand-alone - the 80M download here - &lt;a href="http://www.oracle.com/technology/software/products/ias/index.html"&gt;http://www.oracle.com/technology/software/products/ias/index.html&lt;/a&gt;.  If you choose the second download (470M) along with what we call the SOA Suite (BPEL PM, Web Services Manager, Oracle Rules and our new ESB), you will get the managed environment owned by Oracle Process Manager and Notification Service (OPMN) and Oracle HTTP Server - a slight derivate of Apache HTTP Server packaged with Oracle DB RSFs amongst other things.&lt;br /&gt;&lt;br /&gt;Sometimes people like to use the OC4J HTTP server which is extremely lightweight, written in Java and does great for high performance smaller environments or even popular in larger environments if you throw a hardware load balancer in front of several OC4J containers - emulating what OHS does out of the box.  We have an install option for this lighter weight approach, shown here, where you get our J2EE server  with  the OC4J HTTP server rather than OHS (the OHS one been the first and second choices, OC4J HTTP being the highlighted choice):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ZzeakfnWdl4/RXJqx5hFyWI/AAAAAAAAAAM/N8_X-vbT3Hs/s1600-h/j2eeserver.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_ZzeakfnWdl4/RXJqx5hFyWI/AAAAAAAAAAM/N8_X-vbT3Hs/s320/j2eeserver.gif" alt="" id="BLOGGER_PHOTO_ID_5004179541447788898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;But of course what almost invariably happens is that you choose the first and second choice and then realize you don't want the OHS listener - maybe too much to manage or in production you expect to use generic Apache, SunOne or IIS ... whatever it is - and decide to revert back to the OC4J HTTP server.   While it isn't exactly hard, it isn't exactly perfectly intuitive either.  So here's how to do it:&lt;br /&gt;&lt;br /&gt;1. Shut down your application server:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ORACLE_HOME\opmn\bin\opmnctl stopall&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Go to your &lt;span style="font-family:courier new;"&gt;$ORACLE_HOME\opmn\conf\opmn.xml&lt;/span&gt; and find the line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;ias-component id="HTTP_Server"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and replace it with:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;ias-component id="HTTP_Server" status="disabled" &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What you have done here is turned off the Oracle HTTP Server&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Now lets turn on the OC4J HTTP Listener.   Go to&lt;span style="font-family: courier new;"&gt;  $ORACLE_HOME\opmn\conf\opmn.xml&lt;/span&gt; and find the line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;port id="default-web-site" range="12501-12600" protocol="ajp"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and change it to&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;port id="default-web-site" &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;range="80"&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; protocol=&lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;"http"&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I am assuming you want it on port 80 here; choose the appropriate HTTP port for your machine.  You can also do this in Application Server Control screen shown below but you have to make sure OracleAS is running and then after making the change, bounce the OC4J instance you are doing this on. Frankly speaking, it is probably easier just to edit the file when the server is stopped for this kind of surgery.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_ZzeakfnWdl4/RXJt6phFyXI/AAAAAAAAAAU/iG3E3RXDQTM/s1600-h/oc4jhttp.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_ZzeakfnWdl4/RXJt6phFyXI/AAAAAAAAAAU/iG3E3RXDQTM/s320/oc4jhttp.gif" alt="" id="BLOGGER_PHOTO_ID_5004182990306527602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4.  Lastly, edit the file&lt;span style="font-family:courier new;"&gt; $ORACLE_HOME/j2ee&lt;/span&gt;&lt;oc4j_instance_name&gt;&lt;span style="font-family:courier new;"&gt;/config/default-web-site.xml&lt;/span&gt; and you will see a line like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;web-site xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd" &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt; protocol="ajp13" port="0" &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;display-name="OC4J 10g (10.1.3) Default Web Site" schema-major-version="10" schema-minor-version="0" &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Noted the bolded lines here - we need to make the default web site wire up to the ports and protocol in opmn.xml as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;web-site xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd" &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt; protocol="http" port="80" &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;display-name="OC4J 10g (10.1.3) Default Web Site" schema-major-version="10" schema-minor-version="0" &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5. Re-start the server:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ORACLE_HOME/opmn/bin/opmnctl startall&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now your server should be happily using the Java based OC4J HTTP listener and not using the Apache based Oracle HTTP Server.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/oc4j_instance_name&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-1824468629320866566?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/1824468629320866566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=1824468629320866566&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/1824468629320866566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/1824468629320866566'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/12/oc4j-http-server-on-oracleas-10131.html' title='OC4J HTTP Server on OracleAS 10.1.3.1'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_ZzeakfnWdl4/RXJqx5hFyWI/AAAAAAAAAAM/N8_X-vbT3Hs/s72-c/j2eeserver.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-2263839305186507662</id><published>2006-11-23T11:54:00.001-08:00</published><updated>2006-11-23T18:54:57.578-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application Server'/><title type='text'>Job Statistics - Product and Technology Choices for the Future</title><content type='html'>As a result of looking at Rick Hightower's blog on jobs for Spring and Hibernate - &lt;a href="http://jroller.com/page/RickHigh?entry=stack_of_choice_jsf_hibernate"&gt;http://jroller.com/page/RickHigh?entry=stack_of_choice_jsf_hibernate&lt;/a&gt; - it seemed like playing with Indeed Jobs could almost be as entertaining as a video game (for about 5 minutes!).&lt;br /&gt;&lt;br /&gt;It has some practical bearing on IT professionals because if you are working with a technology or product where jobs are rapidly going to zero and you have a family to feed or rent/mortgage to pay, it is good to think ahead. It is also a way to identify up and comers as Rick did with Spring.&lt;br /&gt;&lt;br /&gt;One problem I had with Indeed engine was how easy it was to come out with misleading results - using "Spring" brought back jobs in places named Spring versus "Spring Java" which brought back jobs more relevant to Spring developers. "Oracle AS" brought back jobs using Oracle in places named or abbreviated "AS".  You yourself may have an opinion or two on whether my take here is valid :-)&lt;br /&gt;&lt;br /&gt;Trying to get something that seemed to bring back meaningful jobs by product, framework and open source, I have several possibly interesting graphs to share. I have my particular bias, like Rick did in his survey, of seeing how healthy the technologies and products I work on are from a job creation perspective.&lt;br /&gt;&lt;br /&gt;The first is "Oracle Application Server", "WebLogic", "WebSphere", "Tomcat", "JBoss" and "Geronimo". I also wanted to transpose the size of the developer market that these server infrastructures represent against the job requirements for some of the commonly used frameworks and technologies so I added in "Spring Java", "Hibernate", "TopLink", "ADF", "BC4J". Here is what I got:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.indeed.com/jobtrends?q=oracle+application+server%2C+jboss%2C+weblogic%2C+websphere%2C+sun+application+server%2C+spring+java%2C+hibernate%2C+adf%2C+bc4j%2C+toplink%2C+tomcat%2C+geronimo"&gt;&lt;span style="text-decoration: underline;"&gt;http://www.indeed.com/jobtrends?q=oracle+application+server%2C+jboss%2C+weblogic%2C+websphere%2C+sun+application+server%2C+spring+java%2C+hibernate%2C+adf%2C+bc4j%2C+toplink%2C+tomcat%2C+geronimo&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and inline:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/3046/4153/1600/426789/jobgraph_appserver.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/3046/4153/320/269612/jobgraph_appserver.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I was happy to see that Oracle Application Server came out on top, followed by WebSphere, WebLogic and Tomcat. JBoss was next and Geronimo at the bottom. Admittedly this is somewhat problematic for all products - e.g. WebSphere is a huge brand encompassing more than the application server and the jobs showed this - calling out WebSphere Application Server like here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.indeed.com/jobtrends?q=oracle+application+server%2C+jboss%2C+weblogic%2C+websphere+application+server%2C+sun+application+server%2C+spring+java%2C+hibernate%2C+adf%2C+bc4j%2C+toplink%2C+tomcat%2C+geronimo"&gt;http://www.indeed.com/jobtrends?q=oracle+application+server%2C+jboss%2C+weblogic%2C+websphere+application+server%2C+sun+application+server%2C+spring+java%2C+hibernate%2C+adf%2C+bc4j%2C+toplink%2C+tomcat%2C+geronimo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/3046/4153/1600/926143/jobgraph_appserveribm.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/3046/4153/320/315118/jobgraph_appserveribm.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;makes Oracle Application Server and WebLogic the two dominant application server job generators out there.  Correspondingly, I could see a slight DBA bias in the Oracle jobs though in general they were pretty reasonably reflective of middleware jobs, frequently being Oracle Application Server Administrators or developers.&lt;br /&gt;&lt;br /&gt;The large size of Oracle Application Server users did match what I also have seen at our own events, as skewed as our own event obviously will be. The data point I compare to is unlike 4 years ago, at OpenWorld where we would have 100 people per room on Oracle Application Server sessions, now, this year depending on the topic you could see 300-400 people sometimes many more, particularly if the topic was SOA oriented.  While this may have been an unusual event - it was an almost overwhelming event in terms of attendance (I believe about 40,000 people!)  literally shutting down streets in San Francisco - it was pretty clear there is a huge community of folks asking about and working with Oracle middleware and naturally there is a matching set of  jobs out there backed up by this graphic.  An Oracle middleware economy so to speak!&lt;br /&gt;&lt;br /&gt;One reason I did the breakout above is to show in terms of job opportunity, it appears the bulk of the jobs still fall into knowing the overall product offering versus just the technology. It is one thing to know JSF or EJB, it is another to be successful on a specific application server. Clearly you will be miles ahead knowing the technology, particularly standards based or defacto standards (ala Spring) but employers will frequently hire you on your specific product domain experience  (e.g. I know how to cluster Oracle Application Server in a highly available infrastructure, versus I know how to build a servlet that does state replication - two related but different tasks).&lt;br /&gt;&lt;br /&gt;Let's dig down in the mess of technologies at the bottom of the above graphic, hidden by the jobs in the server space, so like Rick, we have a better sense of job requirements in the underlying technologies that the upper level application servers support. Here the same thing can be illustrated but I added in JSP, JMS, servlet and EJB to see where these old stalwarts live in the minds of job recruiters:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.indeed.com/jobtrends?q=spring+java%2C+hibernate%2C+adf%2C+bc4j%2C+toplink%2C+jms%2C+ejb%2C+ejb3%2C+jsp%2C+servlet"&gt;&lt;span style="text-decoration: underline;"&gt;http://www.indeed.com/jobtrends?q=spring+java%2C+hibernate%2C+adf%2C+bc4j%2C+toplink%2C+jms%2C+ejb%2C+ejb3%2C+jsp%2C+servlet&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/3046/4153/1600/482584/jobgraph_framework.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/3046/4153/320/11004/jobgraph_framework.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The interesting thing here is those old fashion baseline technologies of Java EE - JSP (the top orange line -- by far above all others), EJB (purple) and JMS (yellow)- still are the largest job requirements out there beyond these emerging frameworks - they are, so to speak, the meat and potatoes you need as a developer (the SQL of middleware).&lt;br /&gt;&lt;br /&gt;Going one level deeper into Rick's analysis, there is absolutely no doubt that Spring, Hiberate and JSF, while the next level down,  seem to be emerging into baseline requirements for developers to know for technology jobs. I think it is reasonable to conclude they are the meat and potatoes of the future:&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;a href="http://www.indeed.com/jobtrends?q=spring+java%2C+hibernate%2C+adf%2C+bc4j%2C+toplink%2C+jsf"&gt;http://www.indeed.com/jobtrends?q=spring+java%2C+hibernate%2C+adf%2C+bc4j%2C+toplink%2C+jsf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/3046/4153/1600/822371/jobgraph_springhibernatjsf.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/3046/4153/320/737929/jobgraph_springhibernatjsf.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The next one I thought I would check out as EJB 3.0, JPA, OpenJPA, TopLink Essentials (the reference implementation for JPA persistence in the Java EE 5.0 Sun reference implementation as well as the JPA persistence provider in Oracle Application Server).  They were hidden in the noise in the above graphic,  possibly indicating they are still battling it out for mindshare and job requirements:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.indeed.com/jobtrends?q=ejb3%2C+jpa%2C+openjpa%2C+ejb+3.0%2C+toplink+essentials"&gt;&lt;span style="text-decoration: underline;"&gt;http://www.indeed.com/jobtrends?q=ejb3%2C+jpa%2C+openjpa%2C+ejb+3.0%2C+toplink+essentials&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/3046/4153/1600/242032/jobgraph_ejb3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/3046/4153/320/275398/jobgraph_ejb3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The numbers are substantially smaller but it is pretty clear since EJB 3.0 finalized several months ago and JPA has become a recognized term for persistence, there is a clear upswing. I suspect in 6 months to a year - particularly if I judge by the volume of e-mail and customers I get around EJB 3.0/JPA, we will see EJB3.0/JPA merge with the other three technologies - Hibernate, JSF, Spring.&lt;br /&gt;&lt;br /&gt;It wouldn't be fair if we didn't do the old fashion .NET versus Java survey so here it is.  I never know what is more valid in terms of comparing because recruiters lump languages with runtimes but for reference I did .NET, J2EE, Java, C# and PHP.&lt;br /&gt;&lt;br /&gt;My personal conclusion based on reading the job descriptions from this query is that they tend to ask for "Java" when they mean "J2EE" or "Java EE" and it appears ".NET" is a great big catchall for all things Microsoft and perhaps not representative of the equivalent in Java/J2EE.  You can make up your own mind and decide what the heck recuiters think when writing job descriptions by looking here ...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.indeed.com/jobtrends?q=php%2C+ruby+on+rails%2C+java%2C+.net%2C+j2ee%2C+c%23"&gt;http://www.indeed.com/jobtrends?q=php%2C+ruby+on+rails%2C+java%2C+.net%2C+j2ee%2C+c%23&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/3046/4153/1600/643166/jobgraphnet.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/3046/4153/320/562507/jobgraphnet.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To me the reality of .NET versus Java/J2EE is developers have to know both rather than one or the other.  Our recent &lt;a href="http://download-uk.oracle.com/docs/cd/B31017_01/core.1013/b28947/toc.htm"&gt;Microsoft Office Interoperability documentation book&lt;/a&gt; which focuses on how Oracle Application Server components integrate with and interoperate with Microsoft, I think more closely represents most developers' reality, though clearly many organizations still like to strategically align with one community or the other.&lt;br /&gt;&lt;br /&gt;Interested in Hibernate on Oracle Application Server? Check out some of these articles:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/tech/java/sash.html"&gt;http://www.oracle.com/technology/tech/java/sash.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/pub/articles/vohra_hibernate.html"&gt;http://www.oracle.com/technology/pub/articles/vohra_hibernate.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Interested in JSF on Oracle Application Server? Check out some of these articles:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://otn.oracle.com/jsf"&gt;http://otn.oracle.com/jsf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Interested in EJB 3.0 and JPA on Oracle Application Server? Check out some of these articles:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://otn.oracle.com/ejb3"&gt;http://otn.oracle.com/ejb3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://otn.oracle.com/jpa"&gt;http://otn.oracle.com/jpa&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;Interested in Spring on Oracle Application Server?  Check out &lt;a href="http://www.oracle.com/goto/spring"&gt;http://www.oracle.com/goto/spring&lt;/a&gt; - many of these articles and how-tos recently arrived also on &lt;a href="http://www.springframework.org/"&gt;http://www.springframework.org&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-2263839305186507662?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/2263839305186507662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=2263839305186507662&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2263839305186507662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2263839305186507662'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/11/job-statistics-product-and-technology.html' title='Job Statistics - Product and Technology Choices for the Future'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-2434131168497612397</id><published>2006-11-03T19:44:00.000-08:00</published><updated>2006-11-23T18:14:19.113-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OC4J'/><category scheme='http://www.blogger.com/atom/ns#' term='OPMN'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Server'/><title type='text'>Java Process and Instance Data From OracleAS</title><content type='html'>In the Oracle Application Server it is standard practice to set up a cluster with multiple application server instances hosting multiple OC4J instances each run atop of multiple JVMs. &lt;br /&gt;&lt;br /&gt;Frequently when executing a specific application instance (servlet/EJB/Web service), it can be useful to have the exact location you are running - which Application Server instance, which specific OC4J instance and sometimes even the exact JVM instance. Sometimes you need this for your application to make some application centric decision, but more often it is useful for debugging when working in large clusters.&lt;br /&gt;&lt;br /&gt;This blog is inspired by Steve Button's work where he built a &lt;a href="http://buttso.blogspot.com/2006/05/instancetrackingfilter-watching-for.html"&gt;very cool utility for session tracking in a cluster&lt;/a&gt; which implicitly revealed this information - he needed it himself while building it to debug as well to show to the user.&lt;br /&gt;&lt;br /&gt;So how do you determine this on Oracle Application Server? There are several system properties that will help you out, specifically:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;oracle.home -  the  physical directory in which your application server is installed&lt;/li&gt;&lt;li&gt;oracle.oc4j.instancename - the name of your OC4J instance &lt;/li&gt;&lt;li&gt;oracle.ons.instancename - your OracleAS  instance name&lt;/li&gt;&lt;li&gt;oracle.ons.indexid - a combination of your OC4J instance name, the group it belongs to and the actual JVM executing it (for example if there is &gt; 1 JVM you have configured as per my &lt;a href="http://mike-lehmann.blogspot.com/2006/09/scaling-oracleas-with-multiple-jvms.html"&gt;previous post&lt;/a&gt; on this topic)&lt;/li&gt;&lt;/ul&gt;On my cluster - I have a lot of AS and OC4J instances running :-) ... but in the picture below you can see that for this sample, I have highlighted the pieces of interest.  In particular,  one of the Oracle Application Server instances is named is soa_javaee.MLEHMANN-LAP. In that instance I have several OC4J instances, one in particular called javaee_1 that is configured to run on top of 2 JVMs. That OC4J instance is grouped together with several others in a synchronized group called javaee_group. If you look to the bottom of the graphic below, you will see this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/3046/4153/1600/619290/cluster1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger2/3046/4153/320/500607/cluster1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;To try out these properties, I deploy a servlet to that OC4J instance javaee_1 and within that servlet I have the following code:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;       out.println("&lt;p&gt;Oracle home name: " + System.getProperty("oracle.home"));&lt;br /&gt;    out.println("&lt;/p&gt;&lt;p&gt;OC4J Instance name: " + System.getProperty("oracle.oc4j.instancename"));&lt;br /&gt;    out.println("&lt;/p&gt;&lt;p&gt;AS Instance name: " + System.getProperty("oracle.ons.instancename"));&lt;br /&gt;    out.println("&lt;/p&gt;&lt;p&gt;Instance:Group:JVM PID: " + System.getProperty("oracle.ons.indexid"));&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;What it spits out the other side in my browser is:&lt;br /&gt;&lt;br /&gt;Oracle home name:    D:\oracle\product\soa_javaee&lt;br /&gt;OC4J Instance name:    javaee_1&lt;br /&gt;AS Instance name:   soa_javaee.MLEHMANN-LAP&lt;br /&gt;Instance:Group:JVM PID:   java_ee1.javaee_group.2&lt;br /&gt;&lt;br /&gt;Pretty useful information ... try it out :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-2434131168497612397?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/2434131168497612397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=2434131168497612397&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2434131168497612397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2434131168497612397'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/11/java-process-and-instance-data-from.html' title='Java Process and Instance Data From OracleAS'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-2388069574795353879</id><published>2006-10-06T21:01:00.000-07:00</published><updated>2006-12-02T22:32:30.698-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application Server Control'/><title type='text'>Process Management in ASControl</title><content type='html'>In OracleAS 10.1.3.0,  there wasn't any gui for editing the process management settings of Oracle Application like there was in 10.1.2.x.  In OracleAS 10.1.3.1 - a patch to 10.1.3.0 - this part of the release gives you that editability back and more.  The underlying OPMN.xml is surfaced via JMX so it is fully programmable as well as surfaced in ASControl.&lt;br /&gt;&lt;br /&gt;This screen shows how you can view and click down to edit port allocation:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/pm1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/pm1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This screen shows the OC4J port management and JDK options:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/pm3.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/pm3.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This screen shows the network and process management port  configuration:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/pm2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/pm2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This tends to be a little less humbling for those who aren't familiar with the underlying XML files that I faithfully subject you to in my various posts :-)&lt;br /&gt;&lt;br /&gt;Like before, download and try it here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/software/products/ias/index.html"&gt;http://www.oracle.com/technology/software/products/ias/index.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-2388069574795353879?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/2388069574795353879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=2388069574795353879&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2388069574795353879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2388069574795353879'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/10/oracle-process-management-in-ascontrol.html' title='Process Management in ASControl'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-1767365298539130798</id><published>2006-10-05T20:18:00.000-07:00</published><updated>2006-11-24T16:41:08.808-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OC4J'/><title type='text'>Creating OC4J Instances in ASControl</title><content type='html'>In OracleAS 10.1.3.0 the OC4J instance creation was available as a command line option as documented here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14432/topology.htm#sthref325"&gt;http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14432/topology.htm#sthref325&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In OracleAS 10.1.3.1 the instance creation, like with OracleAS 10.1.2.x, is available in ASControl again.  Below is a screen shot sequence of what it looks like:&lt;br /&gt;&lt;br /&gt;1. Within Application Server Control instance click on the instance link:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/create1.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/create1.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Click on create OC4J instance:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/create2.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/create2.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. Name it and determine which group of OC4J instances it will join:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/create3.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/create3.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And you are done. Nice and easy :-)&lt;br /&gt;&lt;br /&gt;Try it yourself at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/software/products/ias/index.html"&gt;http://www.oracle.com/technology/software/products/ias/index.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/software/products/ias/soapreview.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-1767365298539130798?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/1767365298539130798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=1767365298539130798&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/1767365298539130798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/1767365298539130798'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/10/creating-oc4j-instances-in-ascontrol.html' title='Creating OC4J Instances in ASControl'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-6799386390744351349</id><published>2006-10-04T11:16:00.000-07:00</published><updated>2006-10-04T12:52:40.840-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OC4J'/><title type='text'>Thread Dump with OracleAS on Windows</title><content type='html'>A colleague, Troy Hedges, asked me today about getting a stack trace of OC4J on Windows for an issue he was having.   My first question was is it OracleAS managed with OPMN or stand-alone?&lt;br /&gt;'&lt;br /&gt;Normally when running &lt;a href="http://www.oracle.com/technology/tech/java/oc4j/1013/index.html"&gt;stand-alone OC4J&lt;/a&gt; on Windows-- because you normally just run it with:&lt;br /&gt;&lt;br /&gt;set JAVA_HOME=&lt;jdk_home&gt;&lt;br /&gt;set PATH=&lt;jdk_home&gt;/bin;%PATH%;&lt;br /&gt;java -jar oc4j.jar&lt;br /&gt;&lt;br /&gt;-- the quick and dirty way to get a thread dump is to hit CTRL-BREAK and voila, thread dump.  This is a nice feature of Java for those intent in seeing what really is hung up in their application.&lt;br /&gt;&lt;br /&gt;However, when you go to the normal Oracle Application Server deployment environment on Windows which uses the Oracle Process Manager OPMN to manage OracleAS, getting a thread dump is a little trickier  because OPMN is a second process which is spawning the JDKs which run each OC4J instance.&lt;br /&gt;&lt;br /&gt;And because there is no kill -3 on Windows likeUnix/Linux you are left trying to figure out how to get a thread dump for a process (OPMN) containing the process you want the thread dump from (an OC4J instance)  .   While OPMN gives you all sorts of great stuff - death detection, process management, clustering etc, this layer adds one more step to debugging that needs to be understood.&lt;br /&gt;&lt;br /&gt;Troy was about 98% there when he asked me - just about when he discovered the sendsignal.exe utility popular for many Windows users - and with it was pretty much done.  I add here a bit of color commentary so others can reproduce what he did.&lt;br /&gt;&lt;br /&gt;Looking under the covers of OPMN -- which we have done in several other posts here  -- you can see that the configuration for the JDK that runs each OC4J instance managed by OPPMNis done inside of the configuration file &amp;lt;ORACLE_HOME&amp;gt;&lt;oracle_home&gt;\opmn\conf\opmn.xml.&lt;br /&gt;&lt;br /&gt;For this example here is the relevant bits from my OPMN.xml:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;ias-component id="cluster_group" status="enabled"&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;   &amp;lt;process-type id="j2ee1" module-id="OC4J" status="enabled"&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;module-data&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;        &amp;lt;category id="start-parameters"&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;data id="java-options" value="-server -Djava.security.policy=$ORACLE_HOME/j2ee/j2ee1/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;/category&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;category id="stop-parameters"&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;data id="java-options" value="-Djava.security.policy=$ORACLE_HOME/j2ee/j2ee1/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;/category&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;       &amp;lt;/module-data&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;start timeout="600" retry="2"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;stop timeout="120"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;restart timeout="720" retry="2"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;port id="default-web-site" range="12501-12600" protocol="ajp"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;port id="rmi" range="12401-12500"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;port id="rmis" range="12701-12800"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;port id="jms" range="12601-12700"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;process-set id="cluster_group" numprocs="1"/&amp;gt;&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;lt;/process-type&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and when you run this you will see in your Windows task manager a process for the OC4J instance -- the javaw.exe highlighted below -- and typically two opmn.exe processes per Application Server instance:&lt;br /&gt;&lt;br /&gt;&lt;/oracle_home&gt;&lt;/jdk_home&gt;&lt;/jdk_home&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/trace2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/trace2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If you end the process from the task manager you will get the pleasure of seeing OPMN in action - it will promptly re-start that OC4J instance.   And if you look at the logs located at:&lt;br /&gt;&lt;br /&gt;&lt;oracle_home&gt;&amp;lt;ORACLE_HOME&amp;gt;\opmn\logs\ias_component_id_name~OC4J instance name~process_set_id_name~JVM_number&amp;gt;.log&lt;br /&gt;&lt;br /&gt;in my case the ias-component id name was cluster_group, the OC4J instance name was j2ee1 and the process set id name was cluster group (from the opmn.xml above) and I had only one JVM running, that translates into:&lt;br /&gt;&lt;br /&gt;D:\soasuite\opmn\logs\cluster_group~j2ee1~cluster_group~1.log&lt;br /&gt;&lt;br /&gt;And wouldn't you know it - no stack trace.   What's up?  Well, it wasn't quite the right signal to OC4J for it to do the stack trace - ending a process in the task manager simply isn't a kill -3. &lt;br /&gt;&lt;br /&gt;Let's make that stack trace happen!  First, make sure that in your start-options for the OC4J instance you do &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; have -Xrs set as a parameter to the JVM:&lt;br /&gt;&lt;br /&gt;&amp;lt;category id="start-parameters"&amp;gt;&lt;br /&gt;&amp;lt;data id="java-options" value="-Xrs ...&lt;br /&gt;&lt;br /&gt;Just remove it and re-start the application server.&lt;br /&gt;&lt;br /&gt;Next download a quick and dirty utility that makes the equivalent of kill -3 on Windows possible - check out:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.latenighthacking.com/projects/2003/sendSignal/"&gt;http://www.latenighthacking.com/projects/2003/sendSignal/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and install the sendSignal.exe&lt;br /&gt;&lt;br /&gt;Then, run it using the PID you see in the task manager above - in my case 10452:&lt;br /&gt;&lt;br /&gt;&lt;/oracle_home&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/trace3.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/trace3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And now you will be rewarded by going back to your OPMN log file (&lt;br /&gt;D:\soasuite\opmn\logs\cluster_group~j2ee1~cluster_group~1.log) with a nice stack trace:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------&lt;br /&gt;06/10/04 11:54:33 Start process&lt;br /&gt;--------&lt;br /&gt;06/10/04 11:55:25 Oracle Containers for J2EE 10g (10.1.3.1.0)  initialized&lt;br /&gt;&lt;br /&gt;--------&lt;br /&gt;06/10/04 12:21:02 Start process&lt;br /&gt;--------&lt;br /&gt;06/10/04 12:21:16 Oracle Containers for J2EE 10g (10.1.3.1.0)  initialized&lt;br /&gt;Full thread dump Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode):&lt;br /&gt;&lt;br /&gt;"HTTPThreadGroup-4" prio=6 tid=0x00862df0 nid=0x272c in Object.wait() [0x0bc1f000..0x0bc1fc98]&lt;br /&gt;at java.lang.Object.wait(Native Method)&lt;br /&gt;- waiting on &lt;0x02af4e60&gt; (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)&lt;br /&gt;at EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:376)&lt;br /&gt;- locked &lt;0x02af4e60&gt; (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)&lt;br /&gt;at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:787)&lt;br /&gt;at  ....&lt;br /&gt;&lt;br /&gt;the rest deleted for brevity.  OPMN ever vigilant will start up another OC4J but you will have what you want, which is a stack trace.  And there you go, stack traces on managed Oracle Application Server instances on Windows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-6799386390744351349?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/6799386390744351349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=6799386390744351349&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/6799386390744351349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/6799386390744351349'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/10/thread-dump-with-oracleas-on-windows.html' title='Thread Dump with OracleAS on Windows'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-9087340218244641641</id><published>2006-10-03T20:55:00.000-07:00</published><updated>2006-10-03T21:10:16.380-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JMX MDB'/><title type='text'>Stopping an MDB via JMX  - Cluster</title><content type='html'>Moving up a tiny bit in sophistication, my next goal was to do my start/stop of my MDB in a cluster.  To illustrate this, I have created a cluster of two OC4J instances each called j2ee1, each in a separate OracleAS instance and they tied together for administrative operations  in a group called cluster_group.&lt;br /&gt;&lt;br /&gt;First let's take a look at this.  You can see on each instance (soa_j2ee and soasuite) I have there is an OC4J instance called j2ee1 (they can be different names but I kept them the same).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbeancluster1.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbeancluster1.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;If I go to the bottom of ASControl and click on cluster_group - the default out of the box is called default_group, but I have customized my configuration - you will be taken to the administrative screen that lets you do administrative operations across multiple OC4J instances simulataneously.    In this case it will be against my two OC4J instances called j2ee1 each on different app server instances:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbeancluster2.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbeancluster2.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Within cluster_group, if I click on administration, I will see that there is a cluster mbean JMX browser that sits underneath this environment:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbeancluster2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbeancluster2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If I drill down on this browser a bit I can see the result of my cluster setup - two JVMProxy's each representing a j2ee1 instance, one on each OracleAS instance:&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbeancluster4.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbeancluster4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;Clicking on one of them you can see that I can get its JVMProxy MBean:&lt;br /&gt;&lt;br /&gt;&lt;span class="x2"&gt;ias:j2eeType=JVMProxy,name=1,J2EEServerGroup=cluster_group,J2EEServer=j2ee1,&lt;br /&gt;ASInstance=soa_j2ee.MLEHMANN-CA&lt;/span&gt;&lt;span class="x2"&gt;&lt;br /&gt;&lt;br /&gt;and the other, differentiated by the OracleAS instance name from the other:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="x2"&gt;ias:j2eeType=JVMProxy,name=1,J2EEServerGroup=cluster_group,J2EEServer=j2ee1,&lt;br /&gt;ASInstance=soasuite.mlehmann-ca.ca.oracle.com&lt;/span&gt;&lt;span class="x2"&gt;&lt;br /&gt;&lt;br /&gt;With that I think we are ready to see if we can update our JMX client from before to walk the cluster and turn off/on the MDB.&lt;br /&gt;&lt;br /&gt;Remember, I have deployed my MDB application myMDB to each one of these servers which you can see if you go to the applications page of the cluster_group where the combined list of applications of both servers is displayed:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbeancluster7.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbeancluster7.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span class="x2"&gt;&lt;br /&gt;The solution is provided by Steve Button again, this time in Groovy code, but the translation to Java is pretty easy from here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://buttso.blogspot.com/2006/05/locating-oc4j-instances-via-opmn.html"&gt;http://buttso.blogspot.com/2006/05/locating-oc4j-instances-via-opmn.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you may be able to interpret, our job is to iterate through our two j2ee1 OC4J instances in cluster_group,  grab the MBean server for each instance and then shut off the MDB like we did for the single instance.   The full client is here&lt;span style="font-weight: bold;"&gt; [1]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First and most importantly, instead of connecting to a specific OC4J instance like we did in the single instance case we connect to the cluster and get its Mbean Server - the trick is instead of going to your OC4J instance name like I did before ("/j2ee1") go to "/cluster".  The term /cluster tells the MBean server to go to the cluster MBean server.   The port used here, again, is the OPMN request port.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;font-family:georgia;font-size:85%;" class="x2"  &gt;JMXConnector clusterConnect = omdb.connect("service:jmx:rmi:///opmn://127.0.0.1:6006/cluster", "oc4jadmin", "welcome1");&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;MBeanServerConnection mbs = clusterConnect.getMBeanServerConnection();&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;&lt;span style="font-family:georgia;"&gt;Then, we query the OC4J server instances in the cluster. I know that my servers of interest are in the J2EEServerGroup cluster_group and I know what I really want is the JVMProxy for each of those OC4J instances. The JVMProxy MBean will give me the methods that return information about where each of the OC4J instance MBean servers are (host and port) thus allowing me to connect to each of them programmatically:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;ObjectName query = new ObjectName("ias:j2eeType=JVMProxy,J2EEServerGroup=cluster_group,*"); Set mbeans = mbs.queryNames(query, null);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next, we need to do some variable set up - a variable for the service URL for each instance, a connection variable for each, an MBean server for each OC4J instance and finally the MessageDrivenBeanMBeanProxy to turn the MDB off/on:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;String serviceURL = "";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;JMXConnector instanceConnect = null;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ObjectName instanceObjectName = null;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MessageDrivenBeanMBeanProxy instanceMDBMBean = null;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MBeanServerConnection instanceMbs = null;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;Next, we walk through the cluster and for each instance instantiate the JVMProxy Proxy MBean (whose naming convention doesn't quite follow my previous recommendation but it is the right MBean):&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;                  for(Iterator iterator = mbeans.iterator(); iterator.hasNext();) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     ObjectName objName = (ObjectName) iterator.next();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;     JVMMBeanProxy jvm =  (JVMMBeanProxy)MBeanServerInvocationHandler.newProxyInstance(mbs,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                          objName, JVMMBeanProxy.class, false);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;From the JVMMBeanProxy we can construct the MBean service URL for that instance:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;              serviceURL = "service:jmx:rmi://" + jvm.getnode() + ":" + jvm.getrmiPort();&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;And then connect to it:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;                             instanceConnect = omdb.connect(serviceURL, "oc4jadmin", "welcome1");&lt;br /&gt;    instanceMbs = instanceConnect.getMBeanServerConnection();&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;Then we can look up our MessageDrivenBean:&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style=";font-family:georgia;font-size:100%;" class="x2"  &gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;               instanceObjectName = new ObjectName("oc4j:j2eeType=MessageDrivenBean,EJBModule=\"myMDB\",J2EEApplication=myMDB,J2EEServer=standalone,name=\"MessageTopicProcessor\"");                instanceMDBMBean = (MessageDrivenBeanMBeanProxy)MBeanServerInvocationHandler.newProxyInstance(instanceMbs, instanceObjectName, MessageDrivenBeanMBeanProxy.class, false);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And last but not least stop it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;instanceMDBMBean.stop();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Running this and browsing the myMDB application shows that all of its MessageProcessor MDB's are stopped as shown below:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbeancluster6.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbeancluster6.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;There you go.  Not a trivial example but works like a champ :-)&lt;br /&gt;&lt;span class="x2"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="x2"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[1] Cluster MBean MDB Stop via JMX&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;ppackage demo.oc4j.jmx;&lt;br /&gt;&lt;br /&gt;import java.net.URL;&lt;br /&gt;&lt;br /&gt;import java.util.ArrayList;&lt;br /&gt;import java.util.Hashtable;&lt;br /&gt;&lt;br /&gt;import java.util.Iterator;&lt;br /&gt;import java.util.Set;&lt;br /&gt;&lt;br /&gt;import javax.management.MBeanServerConnection;&lt;br /&gt;import javax.management.MBeanServerInvocationHandler;&lt;br /&gt;import javax.management.ObjectName;&lt;br /&gt;&lt;br /&gt;import javax.management.remote.JMXConnector;&lt;br /&gt;import javax.management.remote.JMXConnectorFactory;&lt;br /&gt;import javax.management.remote.JMXServiceURL;&lt;br /&gt;&lt;br /&gt;import oracle.oc4j.admin.management.mbeans.proxies.JVMMBeanProxy;&lt;br /&gt;import oracle.oc4j.admin.management.mbeans.proxies.MessageDrivenBeanMBeanProxy;&lt;br /&gt;&lt;br /&gt;public class OperateOnMDBCluster {&lt;br /&gt;public OperateOnMDBCluster() {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private JMXConnector connect (String URL, String username, String password) {&lt;br /&gt;&lt;br /&gt;JMXConnector jmxCon = null;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;&lt;br /&gt;Hashtable credentials = new Hashtable();&lt;br /&gt;credentials.put("login", username);&lt;br /&gt;credentials.put("password", password);&lt;br /&gt;&lt;br /&gt;// Properties required to use the OC4J ORMI protocol&lt;br /&gt;Hashtable env = new Hashtable();&lt;br /&gt;env.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "oracle.oc4j.admin.jmx.remote");&lt;br /&gt;env.put(JMXConnector.CREDENTIALS, credentials);&lt;br /&gt;&lt;br /&gt;JMXServiceURL serviceUrl = new JMXServiceURL(URL);&lt;br /&gt;jmxCon = JMXConnectorFactory.newJMXConnector(serviceUrl, env);&lt;br /&gt;&lt;br /&gt;// Do it!&lt;br /&gt;jmxCon.connect();&lt;br /&gt;&lt;br /&gt;} catch (Exception ex)  {&lt;br /&gt;ex.printStackTrace();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return jmxCon;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt;try  {&lt;br /&gt;OperateOnMDBCluster omdb = new OperateOnMDBCluster();&lt;br /&gt;&lt;br /&gt;JMXConnector clusterConnect = omdb.connect("service:jmx:rmi:///opmn://127.0.0.1:6006/cluster", "oc4jadmin", "welcome1");&lt;br /&gt;&lt;br /&gt;MBeanServerConnection mbs = clusterConnect.getMBeanServerConnection();&lt;br /&gt;&lt;br /&gt;// First get a list of active servers - note the trick of having to&lt;br /&gt;// give it the ias prefix which is part of telling it&lt;br /&gt;ObjectName query = new ObjectName("ias:j2eeType=JVMProxy,J2EEServerGroup=cluster_group,*");&lt;br /&gt;Set mbeans = mbs.queryNames(query, null);&lt;br /&gt;&lt;br /&gt;// Now walk through them and construct the JMX service connection from each&lt;br /&gt;String serviceURL = "";&lt;br /&gt;JMXConnector instanceConnect = null;&lt;br /&gt;ObjectName instanceObjectName = null;&lt;br /&gt;MessageDrivenBeanMBeanProxy instanceMDBMBean = null;&lt;br /&gt;MBeanServerConnection instanceMbs = null;&lt;br /&gt;&lt;br /&gt;for(Iterator iterator = mbeans.iterator(); iterator.hasNext();) {&lt;br /&gt;  ObjectName o = (ObjectName) iterator.next();&lt;br /&gt;  JVMMBeanProxy jvm = (JVMMBeanProxy)MBeanServerInvocationHandler.newProxyInstance(mbs, o, JVMMBeanProxy.class, false);&lt;br /&gt;  serviceURL = "service:jmx:rmi://" + jvm.getnode() + ":" + jvm.getrmiPort();&lt;br /&gt;&lt;br /&gt;  //Now lets get the connection to this specific MBeanServer and get that MDB MBean&lt;br /&gt;  instanceConnect = omdb.connect(serviceURL, "oc4jadmin", "welcome1");&lt;br /&gt;  instanceMbs = instanceConnect.getMBeanServerConnection();&lt;br /&gt;  instanceObjectName = new ObjectName("oc4j:j2eeType=MessageDrivenBean,EJBModule=\"myMDB\",J2EEApplication=myMDB,J2EEServer=standalone,name=\"MessageTopicProcessor\"");&lt;br /&gt;  instanceMDBMBean = (MessageDrivenBeanMBeanProxy)MBeanServerInvocationHandler.newProxyInstance(instanceMbs, instanceObjectName, MessageDrivenBeanMBeanProxy.class, false);&lt;br /&gt;  // And finally stop that sucker&lt;br /&gt;  System.out.println("Stopping MDB on: " + serviceURL);&lt;br /&gt;  instanceMDBMBean.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// ObjectName myMDBObjectName = new ObjectName("oc4j:j2eeType=MessageDrivenBean,EJBModule=\"myMDB\",J2EEApplication=myMDB,J2EEServer=standalone,name=\"MessageTopicProcessor\"");&lt;br /&gt;//&lt;br /&gt;// MDBMBean.start();&lt;br /&gt;&lt;br /&gt;System.out.println("Success!");&lt;br /&gt;&lt;br /&gt;} catch (Exception ex)  {&lt;br /&gt;ex.printStackTrace();&lt;br /&gt;} finally  {&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;table style="width: 675px; height: 33px;" border="0" cellpadding="0" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td align="right" nowrap="nowrap" valign="top" width="1%"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td align="right" valign="top" width="1"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td colspan="1" align="left" valign="top" width="90%"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-9087340218244641641?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/9087340218244641641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=9087340218244641641&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/9087340218244641641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/9087340218244641641'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/10/stopping-mdb-via-jmx-in-cluster.html' title='Stopping an MDB via JMX  - Cluster'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-5879582739754325239</id><published>2006-10-03T18:18:00.000-07:00</published><updated>2006-10-22T20:59:14.833-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JMX MDB'/><title type='text'>Stopping an MDB via JMX - Instance</title><content type='html'>Carrying on my ongoing thread on JMS and MDB, my next task was to figure out how to stop a MDB programmatically. If you browse around in the OracleAS 10.1.3 MBean browser you will see all sorts of operations you might want to perform programmatically and in my case, looking at the MDB I deployed earlier on this week (&lt;a href="http://mike-lehmann.blogspot.com/2006/09/simple-mdb-with-oracle-database-jms.html"&gt;http://mike-lehmann.blogspot.com/2006/09/simple-mdb-with-oracle-database-jms.html&lt;/a&gt;) I was interested MBean operations available on it.&lt;br /&gt;&lt;br /&gt;The trick behind MBeans - at least for starters, is simply finding the darn things.  Fortunately, a lot of standard JMX tools can hook up to Oracle Application Server, including JConsole as Steve Button, Mr. JMX at Oracle, blogged about here - &lt;a href="http://buttso.blogspot.com/2006/06/more-info-on-remote-jconsole.html"&gt;http://buttso.blogspot.com/2006/06/more-info-on-remote-jconsole.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In my case continuing the "take the easiest route" I simply used the MBean browser inside of ASControl.  The steps are illustrated below where I first go to the administrative tab of ASControl, click the System MBean browser and lastly navigate to my MDB application (myMDB) and expand it to find my MDB MessageProcessor and the operations on available on it:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbean1.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbean1.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbean2.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbean2.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbean3.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbean3.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What I was interested in was starting and stopping that MDB within the application itself, and importantly I would like to do it programmatically in a single OC4J instance within an Oracle Applicaiton Server instance.  It turns out this is pretty easy to do once you have a basic understanding of JMX.   I will take the shortest route there rather than generalizing the solution here - just so you can see the bare minimum.&lt;br /&gt;&lt;br /&gt;First you need to know the MBean name - at the top of the ASControl page for MessageTopicProcessor you will see the breakdown of the MDB name in JMX format:&lt;br /&gt;&lt;br /&gt;&lt;span class="x2"&gt;oc4j:j2eeType=MessageDrivenBean,EJBModule="myMDB",J2EEApplication=myMDB,&lt;br /&gt;J2EEServer=standalone,name="MessageTopicProcessor"&lt;br /&gt;&lt;br /&gt;Then you write a bunch of  boiler plate code to hook up to the MBean server and finally the few lines to lookup the Mbean and do the operation.  The full code for doing this is in &lt;span style="font-weight: bold;"&gt;[1].&lt;/span&gt;  The 6 lines that  &lt;/span&gt;&lt;span class="x2"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="x2"&gt;matter are these - they are pretty self explanatory once you see them:&lt;br /&gt;&lt;/span&gt;&lt;span class="x2"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="x2"&gt;First connect to that J2EE instance - in my case called j2ee1 - and get its MBean server.  Note that the OPMN port used - 6006 is the request port of my OracleAS instance:  &lt;/span&gt;&lt;br /&gt;&lt;span class="x2"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;JMXConnector clusterConnect = omdb.connect("service:jmx:rmi:///opmn://127.0.0.1:6006/j2ee1", "oc4jadmin", "welcome1");   &lt;br /&gt;MBeanServerConnection mbs = clusterConnect.getMBeanServerConnection();&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="x2"&gt;Then look up the MessageDrivenBean in the myMDB application:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="x2"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;ObjectName myMDBObjectName = new ObjectName("oc4j:j2eeType=MessageDrivenBean,&lt;br /&gt;                                      EJBModule=\"myMDB\",&lt;br /&gt;                                      J2EEApplication=myMDB,&lt;br /&gt;                                      J2EEServer=standalone,&lt;br /&gt;                                      name=\"MessageTopicProcessor\"");&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="x2"&gt;Then instantiate a local proxy for that MBean:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="x2"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;MessageDrivenBeanMBeanProxy MDBMBean = (MessageDrivenBeanMBeanProxy)MBeanServerInvocationHandler.newProxyInstance(mbs, myMDBObjectName, MessageDrivenBeanMBeanProxy.class, false);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="x2"&gt;And finally, stop it:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="x2"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;MDBMBean.stop();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="x2"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;This is using what is called a dynamic proxy, a feature of JMX 1.2 that OracleAS 10.1.3 supports which gives you the ability to work the MBean methods like ordinary Java methods rather than marshalling up the number of arguments and argument types as previously.&lt;br /&gt;&lt;br /&gt;In general (there turns out to be exceptions),  the way you determine the dynamic proxy is simply take your MBean name you are looking up - in this case MessageDrivenBean and add a "MBeanProxy" on the end of it and away you go.  For J2EEApplication, another common MBean people will want to manipulate, it would be J2EEApplicationMBeanProxy.&lt;br /&gt;&lt;br /&gt;What's nice about dynamic Mbeans is in your IDE you actually will get code insight into the methods available on your OracleAS MBean (assuming you have admin_client.jar in the classpath). Check this out:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbean4.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbean4.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;span class="x2"&gt;&lt;br /&gt;To run this client I just needed to add adminclient.jar to my classpath (it is part of OC4J and JDeveloper in the $ORACLE_HOME\j2ee\home\lib) and away I went.  I have been told that dynamic proxies may still have a dependency on oc4j-internal.jar but am not sure that will stick when 10.1.3.1 goes production.  Note adminclient.jar is also part of the client distributable that you can download from here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/software/products/ias/htdocs/utilsoft_preview.html"&gt;http://www.oracle.com/technology/software/products/ias/htdocs/utilsoft_preview.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the case of MDB, not only can you start and stop them via MBeans in OracleAS 10.1.3.1 you can also control it via an annotation  for enabling and disabling them.  The reason I mention this is that start and stop operations are runtime operations and do not persist - that is if you stop the MDB and then bounce the container the MDB will come back in a started mode.  The enable flag, on the other hand, is a persistent property turning the MDB off or on.&lt;br /&gt;&lt;br /&gt;Using the previous MessageProcessor bean as an example, the  MDB could be deployed as disabled/not-started as follows with the MessageDrivenDeployment property containing an extra "enabled" attribute:&lt;br /&gt;&lt;br /&gt;@MessageDrivenDeployment(resourceAdapter = "simpleOemsRA" enabled="false")&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="x2"&gt;and then later running a client similar to that illustrated, first enabling it and then starting it.  Obviously real life will have permutations but the combination of JMX, JMX Consoles and annotations, the ability to do what you need whether at deployment time or runtime is clearly possible.  Note this particular enable/disable feature is new in OracleAS 10.1.3.1 and is available at a patch to OracleAS 10.1.3.0 for those interested - corresponding to bug 4619599.&lt;/span&gt;&lt;br /&gt;&lt;span class="x2"&gt;&lt;br /&gt;And that's that. Thanks to Steve Button whose JMX code I pillaged down to this tiny sample - in the near future he is working to put out a set of helper classes that generalize the solution below as part of a bigger scripting solution using Groovy on top of JMX.  This was my poor man's way to get a quick and dirty example out and about while they work getting 10.1.3.1 out the door!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[1]  Full Code:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;package demo.oc4j.jmx;&lt;br /&gt;&lt;br /&gt;import java.net.URL;&lt;br /&gt;&lt;br /&gt;import java.util.ArrayList;&lt;br /&gt;import java.util.Hashtable;&lt;br /&gt;&lt;br /&gt;import java.util.Iterator;&lt;br /&gt;import java.util.Set;&lt;br /&gt;&lt;br /&gt;import javax.management.MBeanServerConnection;&lt;br /&gt;import javax.management.MBeanServerInvocationHandler;&lt;br /&gt;import javax.management.ObjectName;&lt;br /&gt;&lt;br /&gt;import javax.management.remote.JMXConnector;&lt;br /&gt;import javax.management.remote.JMXConnectorFactory;&lt;br /&gt;import javax.management.remote.JMXServiceURL;&lt;br /&gt;&lt;br /&gt;import oracle.oc4j.admin.management.mbeans.proxies.JVMMBeanProxy;&lt;br /&gt;import oracle.oc4j.admin.management.mbeans.proxies.MessageDrivenBeanMBeanProxy;&lt;br /&gt;&lt;br /&gt;public class OperateOnMDBInstance {&lt;br /&gt;public OperateOnMDBInstance() {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private JMXConnector connect (String URL, String username, String password) {&lt;br /&gt;&lt;br /&gt; JMXConnector jmxCon = null;&lt;br /&gt;&lt;br /&gt; try {&lt;br /&gt;&lt;br /&gt;     Hashtable credentials = new Hashtable();&lt;br /&gt;     credentials.put("login", username);&lt;br /&gt;     credentials.put("password", password);&lt;br /&gt;&lt;br /&gt;     // Properties required to use the OC4J ORMI protocol&lt;br /&gt;     Hashtable env = new Hashtable();&lt;br /&gt;     env.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "oracle.oc4j.admin.jmx.remote");&lt;br /&gt;     env.put(JMXConnector.CREDENTIALS, credentials);&lt;br /&gt;&lt;br /&gt;     JMXServiceURL serviceUrl = new JMXServiceURL(URL);&lt;br /&gt;     jmxCon = JMXConnectorFactory.newJMXConnector(serviceUrl, env);&lt;br /&gt;&lt;br /&gt;     // Do it!&lt;br /&gt;     jmxCon.connect();&lt;br /&gt;&lt;br /&gt; } catch (Exception ex)  {&lt;br /&gt;     ex.printStackTrace();&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return jmxCon;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt; try  {&lt;br /&gt;   OperateOnMDBInstance omdb = new OperateOnMDBInstance();&lt;br /&gt;&lt;br /&gt;   JMXConnector clusterConnect = omdb.connect("service:jmx:rmi:///opmn://127.0.0.1:6006/j2ee1", "oc4jadmin", "welcome1");   &lt;br /&gt;   MBeanServerConnection mbs = clusterConnect.getMBeanServerConnection();&lt;br /&gt;   ObjectName myMDBObjectName = new ObjectName("oc4j:j2eeType=MessageDrivenBean,EJBModule=\"myMDB\",J2EEApplication=myMDB,J2EEServer=standalone,name=\"MessageTopicProcessor\"");&lt;br /&gt;   MessageDrivenBeanMBeanProxy MDBMBean = (MessageDrivenBeanMBeanProxy)MBeanServerInvocationHandler.newProxyInstance(mbs, myMDBObjectName, MessageDrivenBeanMBeanProxy.class, false);&lt;br /&gt;   MDBMBean.stop();&lt;br /&gt;   System.out.println("Success!");&lt;br /&gt;&lt;br /&gt; } catch (Exception ex)  {&lt;br /&gt;     ex.printStackTrace();&lt;br /&gt; } finally  {&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-5879582739754325239?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/5879582739754325239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=5879582739754325239&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/5879582739754325239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/5879582739754325239'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/10/stopping-mdb-via-jmx.html' title='Stopping an MDB via JMX - Instance'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-2917337478880823810</id><published>2006-09-30T20:00:00.000-07:00</published><updated>2007-02-07T16:33:16.266-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JMS'/><category scheme='http://www.blogger.com/atom/ns#' term='MDB'/><category scheme='http://www.blogger.com/atom/ns#' term='AQ'/><title type='text'>Simple MDB with Oracle Database JMS Provider</title><content type='html'>Continuing in my JMS explorations of late I was asked about clustering MDB on top of   a  simple topic backended by AQ.  My first problem was I could not find a quick and dirty example of an MDB (EJB 3.0) using a JMS topic, the recommended JMS resource adapter approach of OracleAS 10.1.3 and on top of AQ.  A simple hello world was all I was after.&lt;br /&gt;&lt;br /&gt;Give me something very simple and I can go miles because the doc for JMS (&lt;a href="http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#i1085966"&gt;http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#i1085966&lt;/a&gt;) and MDB (&lt;a href="http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14428/mdb30cfg.htm#BCGFGDAI"&gt;http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14428/mdb30cfg.htm#BCGFGDAI&lt;/a&gt;) explains all the advanced stuff and this OTN how-to (&lt;a href="http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-connect-to-oemsjmsd/doc/how-to-connect-to-oemsjmsd.html"&gt;http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-connect-to-oemsjmsd/doc/how-to-connect-to-oemsjmsd.html&lt;/a&gt;) gives a pretty rich example with a lot of detail on what the idiosyncracies are with setup.&lt;br /&gt;&lt;br /&gt;However, despite this being easy, I also wanted quick set up using the tools provided by Oracle that combined setting up the resource adapter, configuring a topic and writing an MDB to process messages into one sequence of steps rather than 3 different tasks. This entry is devoted to getting going fast with such a sample - cobbled together from other similar examples, a bit of new stuff and a bit of begging and pleading from various people who built it all - thanks to Demed Lher (JMS PM), Debu Panda (EJB PM) and the ASControl 10.1.3 folks who made this possible.&lt;br /&gt;&lt;br /&gt;Here goes:&lt;br /&gt;&lt;br /&gt;1. Create a JMS user on your database and grant them AQ rights.  I am using XE and you can tell I have a tough password policy:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;sqlplus sys/welcome1@xe as sysdba&lt;br /&gt;&lt;br /&gt;grant connect, resource, aq_administrator_role to jmsuser identified by jmsuser;&lt;br /&gt;grant execute on sys.dbms_aqadm to jmsuser;&lt;br /&gt;grant execute on sys.dbms_aq to jmsuser;&lt;br /&gt;grant execute on sys.dbms_aqin to jmsuser;&lt;br /&gt;grant execute on sys.dbms_aqjms to jmsuser;&lt;br /&gt;exec dbms_aqadm.grant_system_privilege('ENQUEUE_ANY','jmsuser');&lt;br /&gt;exec dbms_aqadm.grant_system_privilege('DEQUEUE_ANY','jmsuser');&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;2. Create a AQ topic - in this case JMSDEMO_TOPIC:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt; &lt;span style="font-family:courier new;"&gt;sqlplus jmsuser/jmsuser@xe&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;exec dbms_aqadm.create_queue_table(queue_table=&gt;'JMSDEMO_QUEUE_TABLE', queue_payload_type=&gt;'sys.aq$_jms_text_message',multiple_consumers=&gt;true);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;exec dbms_aqadm.create_queue(queue_name=&gt;'JMSDEMO_TOPIC', queue_table=&gt;'JMSDEMO_QUEUE_TABLE');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;exec dbms_aqadm.start_queue(queue_name=&gt;'JMSDEMO_TOPIC');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;commit;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:georgia;"&gt;3. Create a data-source in OracleAS to point to the database user JMSUSER.  I used Application Server Control to do this here by creating a connection pool called oemsdbPool and a data source called oemsdbDS:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsds1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/oemsds1.png" alt="" border="0" /&gt;&lt;/a&gt;Which could also be put directly into your data-sources.xml using this snippet:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&amp;lt;managed-data-source connection-pool-name="oemsdbPool" jndi-name="jndi/oemsdbDS" name="oemsdbDS"/&amp;gt;&lt;br /&gt;&amp;lt;connection-pool name="oemsdbPool"&amp;gt;&lt;br /&gt;&amp;lt;connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="jmsuser" password="jmsuser" url="jdbc:oracle:thin:@//127.0.0.1:1521/xe"/&amp;gt;&lt;br /&gt;&amp;lt;/connection-pool&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;4. In order to use the resource provider approach for my MDB, I need to configure up the OEMS Database provider. Unlike 10.1.3.0 where this was a manual and configuration process, it is a nicely automated procedure in OracleAS 10.1.3.1 (I am using the Developer Preview).&lt;br /&gt;&lt;br /&gt;The following 3 screen shots show how trivial the Application Server Control team have made this.&lt;br /&gt;&lt;br /&gt;a. In the administration tab, click on the OEMS database persistence configuration&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/oemsdb1.png" alt="" border="0" /&gt;&lt;/a&gt;b. Click on the deploy button to deploy it&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/oemsdb2.png" alt="" border="0" /&gt;&lt;/a&gt;c. Name the resource adapter/provider and hook it up to the data source created previously. When you click on finish, you will be asked to restart the default application. Mine never came back so I ended up using opmnctl to do a full OC4J instance re-start ... I believe this is a bug in the developer preview that was fixed after its August release.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ZzeakfnWdl4/RcpvqNY0jAI/AAAAAAAAABs/eQvhnhIaWl8/s1600-h/simpleOems.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_ZzeakfnWdl4/RcpvqNY0jAI/AAAAAAAAABs/eQvhnhIaWl8/s320/simpleOems.gif" alt="" id="BLOGGER_PHOTO_ID_5028954704851536898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can then see and do further configuration of the adapter on the adapters page. From a lot of doc to about a 4 click operation, I have to say the ASControls folks who I have the luck to know reasonably well, did a great simplification job of a complex area!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.  Now for my application clients using the OEMS Database provider, I need to surface my topic with some logical names.  This I found this confusing though correctly documented but again ASControl made short work of exactly the things I needed to do:&lt;br /&gt;&lt;br /&gt;a. Make sure an appropriate connection factory is available by going to the connection factory tab of my newly created resource adapter (picture below), name it (I gave it the adapter name - simpleOemsRA/MyTCF) and give it a private connection pool for simplicity.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb4.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/oemsdb4.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;b.   Name my administered topic object (&lt;span id="objTable"&gt;oracle.j2ee.ra.jms.generic.AdminObjectTopicImpl from the drop down list box&lt;/span&gt;) to provide a JNDI mapping to the physical database topic JMSDEMO_TOPIC and finally hook it up to the resource provider created during deployment.&lt;br /&gt;&lt;br /&gt;This has two parts so here are they are in detail:&lt;br /&gt;&lt;br /&gt;b1. Unlike the OracleAS JMS screen you will see that you do *not* have to provide the JNDI location and JNDI name for the Topic. You just give a JNDI location. You can provide a JNDI name but you would have to manually edit the underlying oc4j-connectors.xml. What this is "encouraging" is the use of autowrapping of the destinations. So enter your JNDI name - I chose &lt;span class="x2"&gt;simpleOemsRA/AutoWrap because this JNDI name will be the "automatic" wrapper for all my topics.  See later  for some details on this.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;b2. Second the screen asks for the resource provider name and defaults it to ojmsrp when you should be using the resource provider name you used when deploying the resource adapter - in our case simpleOemsRP - both b1 and b2 are shown in the screen sequence below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb5.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/oemsdb5.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/autowrap1.0.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/autowrap1.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;To get a sense of some comfort that things are working at this stage, if you go back to the Administer OEMS tab of the Application Server Control you should be able to see the physical AQ JMSDEMO_TOPIC in the list of available topics that are hooked up to the environment like below with a JNDI URL of something like java:comp/resource/simpleOemsRP/Topics/JMSDEMO_TOPIC:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oemsdb8.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/oemsdb8.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="x2"&gt;What's up here?  I can see that from my configuration of my resource provider having a database connection we created earlier it automatically discovered my topic. That's cool!  But what is also interesting is the resolution of the physical JNDI name - &lt;/span&gt;&lt;span id="destinations"&gt;java:comp/&lt;wbr&gt;resource/&lt;wbr&gt;simpleOemsRP/&lt;wbr&gt;Topics/&lt;wbr&gt;JMSDEMO_TOPIC&lt;/span&gt;&lt;span class="x2"&gt; - where did that /Topics/ come from?&lt;br /&gt;&lt;br /&gt;It turns out that is part of how OEMS Database provider queues and topics are surfaced through the resource provider&lt;/span&gt;&lt;span class="x2"&gt; - the prefix /Topics/ and /Queues/ are prefixed on the database queue/topic name. As such, taking an example, a database topic named JMSDEMO_TOPIC will have the physical suffix of Topics/JMSDEMO_TOPIC. Likewise with queues, a database queue named JMSDEMO_QUEUE will have a physical suffix of Queues/JMSDEMO_QUEUE.  This is doc'd more formally just under the table this URL points at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#sthref295"&gt;http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#sthref295&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The end result when working with MDBs and clients, the JNDI location you will use for this example is going to have the logical name of (using my example): &lt;span class="x2"&gt;simpleOemsRA/Autowrap/Topics&lt;/span&gt;/JMSDEMO_TOPIC which in turn will resolve to the physical name  &lt;span class="x2"&gt;java:comp/resource/simpleOemsRP/Topics/JMSDEMO_TOPIC.  &lt;/span&gt;  Check out my MDB at the end of this blog where I provide this setting in the destination name. If you want to manually wrap this in order to obfusticate the JMSDEMO_TOPIC name you can as well but this is not avialable from the ASControl screen.&lt;br /&gt;&lt;br /&gt;5. With that, everything - at least the minimal - is done and it is possible to write an MDB.  Again following the lazy man's approach I will use EJB 3.0 so I can do it all in as little configuration as possible. Mucking around my MDB pretty much wires up to the configuration done above and does a simple printout of the message off the queue.  It looks like the following code at the end of this&lt;span style="font-weight: bold;"&gt; [1] &lt;/span&gt;blog - code liberally stolen from Debu Panda's EJB 3.0 MDB samples at &lt;a href="http://otn.oracle.com/ejb3"&gt;http://otn.oracle.com/ejb3&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;6. As I was doing this in JDeveloper, I simply packaged this guy up in an ear and then used the admin_client deployment tool to deploy it as follows:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;SET JAVA_HOME=d:\jdk150&lt;br /&gt;SET PATH=d:\jdk150\bin&lt;br /&gt;SET ORACLE_HOME=d:\soasuite&lt;br /&gt;java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:opmn://127.0.0.1:6003/home oc4jadmin welcome1 -deploy -file D:\mywork\oemsMDB\deploy\myMDB.ear -deploymentName myMDB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;7. Then of course we need a client to throw messages on the queue.  The easiest way is to write a simple Java client.  Again in the spirit of begging and borrowing code, I have taken a sample from the JMS product manager, Demed LHer and slimmed it down to the bare essentials so it just does that one thing in&lt;span style="font-weight: bold;"&gt; [2]&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;To run that client you simply have to compile it with the right classpath:&lt;br /&gt;&lt;br /&gt;set AS_HOME=D:\soasuite&lt;br /&gt;set DB_HOME=D:\oraclexe\app\oracle\product\10.2.0\server&lt;br /&gt;set JAVA_HOME=D:\jdk150 CLASSPATH=.;%DB_HOME%/RDBMS/jlib/aqapi13.jar;%DB_HOME%/RDBMS/jlib/jmscommon.jar;%DB_HOME%/RDBMS/jlib/xdb.jar;%DB_HOME%/lib/xmlparserv2.jar;%DB_HOME%/jdbc/lib/ojdbc14.jar;%DB_HOME%/jlib/orai18n.jar;%DB_HOME%/jlib/jndi.jar;%J2EE_HOME%/lib/jta.jar&lt;br /&gt;javac -classpath %CLASSPATH% Send.java&lt;br /&gt;java Send "JMSDEMO_TOPIC"&lt;br /&gt;&lt;br /&gt;And there you go.  If you look in your ORACLE_HOME\opmn\logs you should see the MDB sucking the above message off the topic and spitting out the results using its System.out.println.&lt;br /&gt;&lt;br /&gt;I can't say it was trivial, but broken down to its simplest form, hopefully it is a building block that can be generalized for others!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[1] My MDB:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;package demo.mdb;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import java.util.Date;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import javax.ejb.MessageDriven;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import oracle.j2ee.ejb.MessageDrivenDeployment;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import javax.ejb.ActivationConfigProperty;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import javax.jms.Message;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import javax.jms.MessageListener;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import javax.jms.Message;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@MessageDriven(&lt;br /&gt;activationConfig = {&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="ConnectionFactoryJndiName", propertyValue="simpleOemsRA/MyTCF"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="DestinationName", propertyValue="simpleOemsRA/AutoWrap/Topics/JMSDEMO_TOPIC"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="DestinationType", propertyValue="javax.jms.Topic"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="SubscriptionDurability", propertyValue="Durable"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="SubscriptionName", propertyValue="MySubscription"),&lt;br /&gt;@ActivationConfigProperty(&lt;br /&gt;propertyName="messageSelector", propertyValue="RECIPIENT = 'MDB'")&lt;br /&gt;})&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// associate MDB with the database JMS resource adapter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@MessageDrivenDeployment(resourceAdapter = "simpleOemsRA")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * This is a very simple example of a Message-Driven Bean configured to listen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * on an AQ Topic using the generic resource adapter for JMS. It listens to the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * configured Topic and gets notified via an invocation of it's&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * onMessage() method when a message has been posted to the Topic. This&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; * bean simply prints out the contents of the message.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public class MessageTopicProcessor {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    public void onMessage(Message message) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        System.out.println("onMessage() - " + message);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        try {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            String subject = message.getStringProperty("subject");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            String inmessage = message.getStringProperty("message");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            System.out.println("Message received\n\tDate: "&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                    + new java.util.Date() + "\n\tSubject: " + subject&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;                    + "\n\tMessage: " + inmessage + "\n");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        catch (Throwable ex) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            ex.printStackTrace();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;span style="font-family:georgia;"&gt;[2] Sample Database JMS Client&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;*&lt;br /&gt;* If using Oracle XE, the following jar files are required in your classpath to&lt;br /&gt;* run this example:&lt;br /&gt;*&lt;br /&gt;* .;%DB_HOME%/RDBMS/jlib/aqapi13.jar;%DB_HOME%/RDBMS/jlib/jmscommon.jar;&lt;br /&gt;* %DB_HOME%/RDBMS/jlib/xdb.jar;%DB_HOME%/lib/xmlparserv2.jar;&lt;br /&gt;* %DB_HOME%/jdbc/lib/ojdbc14.jar;%DB_HOME%/jlib/orai18n.jar;%DB_HOME%/jlib/jndi.jar;%J2EE_HOME%/lib/jta.jar&lt;br /&gt;*&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// Java infrastructure packages&lt;br /&gt;import java.lang.*;&lt;br /&gt;import java.util.Properties;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.InputStream;&lt;br /&gt;&lt;br /&gt;// JMS packages&lt;br /&gt;import oracle.AQ.*;&lt;br /&gt;import oracle.jms.*;&lt;br /&gt;import javax.jms.*;&lt;br /&gt;&lt;br /&gt;/* -------------------------------------------------------&lt;br /&gt;* Send&lt;br /&gt;* ------------------------------------------------------- */&lt;br /&gt;public class Send&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;// Here's the XML payload to put in a text message&lt;br /&gt;private final static String SOME_XML =&lt;br /&gt;"\n" +&lt;br /&gt;"&lt;ns:name ns="\"&gt;\n" +&lt;br /&gt;"   &lt;data&gt;\n" +&lt;br /&gt;"         &lt;fname&gt;John&lt;/fname&gt;\n" +&lt;br /&gt;"         &lt;middle&gt;W&lt;/middle&gt;\n" +&lt;br /&gt;"         &lt;lname&gt;Doe&lt;/lname&gt;\n" +&lt;br /&gt;"   &lt;/data&gt;\n"+&lt;br /&gt;"&lt;/ns:name&gt;";&lt;br /&gt;&lt;br /&gt;public static void main (String args [])&lt;br /&gt;throws java.sql.SQLException, ClassNotFoundException, JMSException&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; TopicConnectionFactory tcfact  =null;&lt;br /&gt; TopicConnection        tconn   =null;&lt;br /&gt;   Topic                  topic   =null;&lt;br /&gt;   TopicSession           tsess   =null;&lt;br /&gt;   TopicPublisher         publisher  = null;&lt;br /&gt; TopicSubscriber        subscriber = null;&lt;br /&gt;   TextMessage            txtmsg, dtxtmsg;&lt;br /&gt; String                 destName   = "JMSDEMO_TOPIC";&lt;br /&gt; String                 dbHost     = "127.0.0.1";&lt;br /&gt; String                 dbPort     = "1521";&lt;br /&gt; String                 dbSid      = "XE";&lt;br /&gt; String                 dbDriver   = "thin";&lt;br /&gt; String                 dbUser     = "jmsuser";&lt;br /&gt; String                 dbPassword = "jmsuser";&lt;br /&gt;&lt;br /&gt; System.out.println("\n-------------------------------------------------------------");&lt;br /&gt; System.out.println("OEMS.155 - simple JMS Send / JMS 1.02 / Database AQ / no JNDI");&lt;br /&gt; System.out.println("-------------------------------------------------------------");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; // get destination to Send on from command-line&lt;br /&gt; try {&lt;br /&gt;     destName = args[0];&lt;br /&gt; } catch (Exception e) {&lt;br /&gt;     System.out.println("** please provide a destination to send on [" + args.length + "]");&lt;br /&gt;     usage();&lt;br /&gt;     System.exit(0);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; try {&lt;br /&gt;     // get connection factory - we are not going through JNDI here&lt;br /&gt;     tcfact = AQjmsFactory.getTopicConnectionFactory(dbHost, dbSid, Integer.parseInt(dbPort), dbDriver);&lt;br /&gt;     System.out.println("Connection factory = " + tcfact.toString());&lt;br /&gt;     // create connection&lt;br /&gt;   tconn = tcfact.createTopicConnection(dbUser,dbPassword);&lt;br /&gt;     System.out.println("Created connection = " + tconn.toString());&lt;br /&gt;     // create session&lt;br /&gt;       tsess = tconn.createTopicSession(true, Session.CLIENT_ACKNOWLEDGE);&lt;br /&gt;     System.out.println("Created session = " + tsess.toString());&lt;br /&gt;     // start connection&lt;br /&gt;     tconn.start() ;&lt;br /&gt;     System.out.println("started connection");&lt;br /&gt;     // get topic&lt;br /&gt;     topic = ((AQjmsSession)tsess).getTopic(dbUser,destName) ;&lt;br /&gt;     System.out.println("Got topic = " + topic.toString());&lt;br /&gt;     System.out.println("started session = " + tsess.toString());&lt;br /&gt;  &lt;br /&gt; } catch (JMSException e) {&lt;br /&gt;     System.err.println("** JMS: failed starting session. Do not forget to run the SQL scripts to create necessary tables in RDBMS.\n");&lt;br /&gt;     e.printStackTrace();&lt;br /&gt;     System.exit(-1);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; try {&lt;br /&gt;   publisher = tsess.createPublisher(topic);&lt;br /&gt;   txtmsg = tsess.createTextMessage(SOME_XML) ;&lt;br /&gt;   System.out.println("\ndestination: " + topic + "\nmessage    :\n\n" + SOME_XML);&lt;br /&gt;   publisher.publish(topic, txtmsg) ;&lt;br /&gt;   tsess.commit() ;&lt;br /&gt;   System.out.println("\nmessage was sent with ID="+txtmsg.getJMSMessageID());&lt;br /&gt; } catch (Exception e) {&lt;br /&gt;   System.err.println("** Problem publishing messaging:\n");&lt;br /&gt;   e.printStackTrace();&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; // Cleaning up before exiting&lt;br /&gt; try {&lt;br /&gt;   //((AQjmsDestination)topic).stop(tsess, true, true, false);&lt;br /&gt;   tsess.close() ;&lt;br /&gt;   tconn.close() ;&lt;br /&gt; } catch (Exception e) {&lt;br /&gt;   System.err.println("** Problem terminating session and connection:\n");&lt;br /&gt;   e.printStackTrace();&lt;br /&gt; }  &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*-----------------------------------------------------------------------&lt;br /&gt;* usage&lt;br /&gt;* prints program usage&lt;br /&gt;*----------------------------------------------------------------------*/&lt;br /&gt;&lt;br /&gt;private static void usage() {&lt;br /&gt; System.err.println("\nUsage: Send &lt;topic&gt;");&lt;br /&gt; System.err.println("Ex   : Send JMSDEMO_TOPIC");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/topic&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-2917337478880823810?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/2917337478880823810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=2917337478880823810&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2917337478880823810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2917337478880823810'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/simple-mdb-with-oracle-database-jms.html' title='Simple MDB with Oracle Database JMS Provider'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_ZzeakfnWdl4/RcpvqNY0jAI/AAAAAAAAABs/eQvhnhIaWl8/s72-c/simpleOems.gif' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-9216270514390457806</id><published>2006-09-29T14:27:00.000-07:00</published><updated>2006-09-29T14:51:44.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JMS'/><category scheme='http://www.blogger.com/atom/ns#' term='ROUTER'/><title type='text'>Propagating JMS Messages to Multiple Targets</title><content type='html'>I was investigating the Oracle JMS Router (Doc: &lt;a href="http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#sthref378"&gt;http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14427/jms.htm#sthref378&lt;/a&gt; )  for a customer today as  a mechanism for propagating messages from queues and topics to other queues and topics and thought I would point out a couple of things.&lt;br /&gt;&lt;br /&gt;I was trying to implement a picture that looks like the one below using the JMS Router - the JMS router maintains a backlog of jobs that run watching whatever source queues and topics you set up and propagates them to your target destination queues and topics:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/router3.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/router3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What the customer was trying to do was propagate an inbound message to 3 different systems.  The strategy they were looking at was to have a topic and then on each system have an MDB that listened to the topic and moved it into a queue for processing by each system.  The issue with the approach was the number of MDB that had to be written and maintained over time.  With one topic and three target queues this may be a reasonable approach but once you get to dozens of topics each with many targets, writing code gets pretty unreasonable.&lt;br /&gt;&lt;br /&gt;The JMS Router lets you make this a configuration exercise. You simply add a job to the JMS router environment to listen to the inbound topic and tell it which queue you want it propagated to. In this case because there are 3 target queues, I simply need to add 3 jobs.&lt;br /&gt;&lt;br /&gt;How hard is this to do?  Well, in OracleAS 10.1.3 the JMS Router is pre-deployed and ready to go.  It took me about 10 minutes to configure this up - I had a handy Java client for throwing messages at a topic so once configured, I could see it in action pretty quickly using &lt;span style="text-decoration: underline;"&gt;&lt;/span&gt; Hermes as &lt;a href="http://mike-lehmann.blogspot.com/2006/09/i-was-working-with-oracleas-jms-over.html"&gt;discussed in an earlier post&lt;/a&gt;.  You can configure it in two ways:&lt;br /&gt;&lt;br /&gt;1. Edit the jms.xml file and add its configuration&lt;br /&gt;2. Use the MBean browser in OracleAS 10.1.3 to do this&lt;br /&gt;&lt;br /&gt;For a step by step how-to check out this document on OTN:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-use-JMS-router/doc/How-to-Use-JMS-Router.html"&gt;http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-use-JMS-router/doc/How-to-Use-JMS-Router.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For my configuration I have included the bits from jms.xml here - while this looks verbose you will see the configuration is identical per job with one change being the job name and the target queue:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;&lt;br /&gt;&amp;lt;jms-router max-local-concurrency="-1" &amp;gt;&lt;br /&gt;&amp;lt;router-job&lt;br /&gt;  job-name="job1"&lt;br /&gt;  max-retries="16"&lt;br /&gt;  polling-interval="5"&lt;br /&gt;  pause-job="false"&lt;br /&gt;  use-exception-queue="false"&lt;br /&gt;  batch-size="30"&lt;br /&gt;&amp;gt;&lt;br /&gt;  &amp;lt;message-source&amp;gt;OracleASjms/Topics/jms/demoTopic&amp;lt;/message-source&amp;gt;&lt;br /&gt;  &amp;lt;source-connection-factory&amp;gt;OracleASjms/MyCF&amp;lt;/source-connection-factory&amp;gt;&lt;br /&gt;  &amp;lt;message-selector&amp;gt;&amp;lt;/message-selector&amp;gt;&lt;br /&gt;  &amp;lt;subscriber-name&amp;gt;OracleASRouter_job1&amp;lt;/subscriber-name&amp;gt;&lt;br /&gt;  &amp;lt;source-log-queue&amp;gt;OracleASjms/Queues/OracleASRouter_LOGQ&amp;lt;/source-log-queue&amp;gt;&lt;br /&gt;  &amp;lt;message-target&amp;gt;OracleASjms/Queues/jms/demoQueue&amp;lt;/message-target&amp;gt;&lt;br /&gt;  &amp;lt;target-connection-factory&amp;gt;OracleASjms/MyCF&amp;lt;/target-connection-factory&amp;gt;&lt;br /&gt;  &amp;lt;target-log-queue&gt;OracleASjms/Queues/OracleASRouter_LOGQ&amp;lt;/target-log-queue&amp;gt;&lt;br /&gt;  &amp;lt;exception-queue&amp;gt;default&amp;lt;/exception-queue&amp;gt;&lt;br /&gt;&amp;lt;/router-job&amp;gt;&lt;br /&gt;&amp;lt;router-job&lt;br /&gt;  job-name="job2"&lt;br /&gt;  max-retries="16"&lt;br /&gt;  polling-interval="5"&lt;br /&gt;  pause-job="false"&lt;br /&gt;  use-exception-queue="false"&lt;br /&gt;  batch-size="30"&lt;br /&gt;&amp;gt;&lt;br /&gt;  &amp;lt;message-source&gt;OracleASjms/Topics/jms/demoTopic&amp;lt;/message-source&amp;gt;&lt;br /&gt;  &amp;lt;source-connection-factory&amp;gt;OracleASjms/MyCF&amp;lt;/source-connection-factory&amp;gt;&lt;br /&gt;  &amp;lt;message-selector&amp;gt;&amp;lt;/message-selector&amp;gt;&lt;br /&gt;  &amp;lt;subscriber-name&amp;gt;OracleASRouter_job2&amp;lt;/subscriber-name&amp;gt;&lt;br /&gt;  &amp;lt;source-log-queue&amp;gt;OracleASjms/Queues/OracleASRouter_LOGQ&amp;lt;/source-log-queue&amp;gt;&lt;br /&gt;  &amp;lt;message-target&amp;gt;OracleASjms/Queues/jms/demoQueue2&amp;lt;/message-target&amp;gt;&lt;br /&gt;  &amp;lt;target-connection-factory&amp;gt;OracleASjms/MyCF&amp;lt;/target-connection-factory&amp;gt;&lt;br /&gt;  &amp;lt;target-log-queue&amp;gt;OracleASjms/Queues/OracleASRouter_LOGQ&amp;lt;/target-log-queue&amp;gt;&lt;br /&gt;  &amp;lt;exception-queue&amp;gt;default&amp;lt;/exception-queue&amp;gt;&lt;br /&gt;&amp;lt;/router-job&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;jms-router max-local-concurrency="-1" &amp;gt;&lt;br /&gt;&amp;lt;router-job&lt;br /&gt;  job-name="job3"&lt;br /&gt;  max-retries="16"&lt;br /&gt;  polling-interval="5"&lt;br /&gt;  pause-job="false"&lt;br /&gt;  use-exception-queue="false"&lt;br /&gt;  batch-size="30"&lt;br /&gt;&amp;gt;&lt;br /&gt;  &amp;lt;message-source&amp;gt;OracleASjms/Topics/jms/demoTopic&amp;lt;/message-source&amp;gt;&lt;br /&gt;  &amp;lt;source-connection-factory&amp;gt;OracleASjms/MyCF&amp;lt;/source-connection-factory&amp;gt;&lt;br /&gt;  &amp;lt;message-selector&amp;gt;&amp;lt;/message-selector&amp;gt;&lt;br /&gt;  &amp;lt;subscriber-name&amp;gt;OracleASRouter_job3&amp;lt;/subscriber-name&amp;gt;&lt;br /&gt;  &amp;lt;source-log-queue&amp;gt;OracleASjms/Queues/OracleASRouter_LOGQ&amp;lt;/source-log-queue&amp;gt;&lt;br /&gt;  &amp;lt;message-target&amp;gt;OracleASjms/Queues/jms/demoQueue3&amp;lt;/message-target&amp;gt;&lt;br /&gt;  &amp;lt;target-connection-factory&amp;gt;OracleASjms/MyCF&amp;lt;/target-connection-factory&amp;gt;&lt;br /&gt;  &amp;lt;target-log-queue&gt;OracleASjms/Queues/OracleASRouter_LOGQ&amp;lt;/target-log-queue&amp;gt;&lt;br /&gt;  &amp;lt;exception-queue&amp;gt;default&amp;lt;/exception-queue&amp;gt;&lt;br /&gt;&amp;lt;/router-job&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/jms-router&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and a screen shot of me adding one job via the MBean browser here - this defaults a number of parameters so the minimal needed here is just the source message, source connection factory, target destination and target connection factory.  Because I am lazy, this is how I did it -- then once I had one job entered I copied and pasted in jms.xml and res-start the server. Using ASControl this way lets you do it without a re-start as it goes through the proper JMX entry points.  This one begs for a groovy script - more on that later - to automate configuration.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/router2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/router2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you need a simple way to route messages to multiple targets and don't want to be writing a lot of code to make it happen manually, this could be your answer.  Nice to see this baked right into the product with a minimum of fuss or muss to make it work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-9216270514390457806?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/9216270514390457806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=9216270514390457806&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/9216270514390457806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/9216270514390457806'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/jms-router.html' title='Propagating JMS Messages to Multiple Targets'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-2442614053917744025</id><published>2006-09-24T21:10:00.000-07:00</published><updated>2006-09-24T21:23:06.358-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OC4J'/><category scheme='http://www.blogger.com/atom/ns#' term='Cluster'/><title type='text'>Reliable Singleton OC4J Instances on OracleAS</title><content type='html'>I was working on a customer  question this week which revolved around  the ability to  ensure a highly available singleton OC4J instance in OracleAS.  After mucking about and looking around I remembered a feature that is designed to provide exactly this called Service Failover.  It is documented here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download-west.oracle.com/docs/cd/B25221_04/core.1013/b15976/common.htm#sthref631"&gt;http://download-west.oracle.com/docs/cd/B25221_04/core.1013/b15976/common.htm#sthref631&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;but I think a picture illustrates better what I was trying to do and then the implementation of it is a lot easier to follow.  Figure 1 below shows the idea:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/servicefailover1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/servicefailover1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Figure 1: Active Singleton OC4J Instance&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Here you can see the orange OC4J instance named j2ee_1 in an OracleAS instance called soa_j2ee as the singleton, active node.  It is part of a group of OC4J's called singleton_group where there is another stopped OC4J instance called j2ee_1 in an OracleAS called soasuite (for arguments sake on another hardware node assuming that the redundancy we are seeking is to deal with hardware failure).&lt;br /&gt;&lt;br /&gt;When j2ee_1 in  OracleAS instance  soa_j2ee fails,  the action I want is illustrated in figure 2&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/servicefailover2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/servicefailover2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Figure 2: Singleton Instance Failed Over to New Singleton&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;When my singleton OC4J went down, the application server noticed it and immediately started up the backup OC4J in another part of the cluster, the OracleAS instance soasuite.&lt;br /&gt;&lt;br /&gt;Ideally, depending on my requirement for redundancy I could carry this scenario on on many  different nodes.  The question is how?  Turns out it is a very simple feature to implement.&lt;br /&gt;&lt;br /&gt;The trick is with the process service (OPMN) that is watching over an OracleAS cluster.  The lines that start an OC4J instance in the process server XML configuration file (opmn.xml) typically look like this with much of the extra bit deleted for simplicity here:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;ias-component id="singleton_group" status="enabled"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &amp;lt;process-type id="j2ee_1" status="enabled" &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       &amp;lt;module-data&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;          &amp;lt;category id="start-parameters"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;             &amp;lt;data id="java-options" value="-server -Djava.security.policy=$ORACLE_HOME/j2ee/j2ee1/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;             ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       &amp;lt;process-set id="singleton_group" numprocs="1"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &amp;lt;/process-type&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;/ias-component&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The crux of it is OPMN is providing parameters for the JVM(s) that start the application server, port ranges (because there will be many OC4J's running in a cluster) and miscellaneous other settings.&lt;br /&gt;&lt;br /&gt;To turn on a failover policy that says I want 1 and only one of these OC4J instances running in a cluster I simply need to add two parameters:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;service-failover="1" &lt;/span&gt;- to indicate I want only one of these OC4J's in my cluster&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;service-weight="100"&lt;/span&gt; - an arbitrary logical weighting that will give OPMN a preference which of the configured failover instances I want the server to start in the event of a failure of another. A larger number means OPMN will prefer starting the failover instance than one configured with a smaller number&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;For a single OC4J instance configured with this service failover, the configuration looks like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;ias-component id="singleton_group" status="enabled"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &amp;lt;process-type id="j2ee_1" status="enabled"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: courier new;font-size:85%;" &gt; service-failover="1" service-weight="200"&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       &amp;lt;module-data&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;          &amp;lt;category id="start-parameters"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;             &amp;lt;data id="java-options" value="-server -Djava.security.policy=$ORACLE_HOME/j2ee/j2ee1/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;             ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;       &amp;lt;process-set id="singleton_group"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &amp;lt;/process-type&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;/ias-component&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Also note that on the process-set id I removed the numprocs="1" as service-failover does not support numprocs (i.e. multi-JVM).&lt;br /&gt;&lt;br /&gt;The trick on this one is that the OC4J instance name has to be the same (in my case j2ee_1) and the group in which the OC4J instance resides also has to be identical (in my case you can see my group is called singleton_group).&lt;br /&gt;&lt;br /&gt;If you were to look at my other OracleAS instance you would see an identically configured OC4J instance with the same group and same OC4J instance name.  Setting up the topology of groups and OC4J instances is trivial in Application Server Control where these a simple operations as shown below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/groupcreate1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/groupcreate1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oc4jinstance1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/oc4jinstance1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What does it look like operationally?  Well, now you know why I was playing with iHat earlier on in the week ...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/ihat2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/ihat2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What I did to test it was the following:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Started up the application server with the configuration outlined above.  I could see the picture above where the single j2ee_1 was happily running on the soa_j2ee OracleAS instance and stopped correctly on the soasuite OracleAS instance&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Then I went out to the file system $ORACLE_SOA_J2EE_HOME\j2ee\j2ee_1\config and renamed server.xml to dead_server.xml.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Then I ran the application server command:&lt;br /&gt;&lt;br /&gt;opmnctl restartproc ias_component=singleton_group&lt;br /&gt;&lt;br /&gt;to bounce the server on soa_j2ee&lt;/li&gt;&lt;li&gt;Of course when it brought down my j2ee_1 instance on soa_j2ee and then tried to re-start it failed as server.xml is the basic configuration for the Oc4J instance&lt;/li&gt;&lt;li&gt;Almost immediately after that failure, I saw within iHat the backup instance start up.&lt;/li&gt;&lt;/ol&gt;In real life you could configure as many of these backup instances as you want in order to have the right amount of redundancy for your situation ... there is no limit.  I also was using this to solve a singleton problem. You can use it to create doubleton's or tripletons by simply making the service-failover number equal to the number of unique instances you want running in your topology.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-2442614053917744025?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/2442614053917744025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=2442614053917744025&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2442614053917744025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/2442614053917744025'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/reliable-singletons-on-oracleas.html' title='Reliable Singleton OC4J Instances on OracleAS'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-1115426857239918411</id><published>2006-09-21T07:41:00.000-07:00</published><updated>2006-09-19T15:47:42.921-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OC4J'/><category scheme='http://www.blogger.com/atom/ns#' term='Cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='iHat'/><title type='text'>Visualizing Middleware Topologies</title><content type='html'>The other day I was writing about how OracleAS supports multiple JVMs (&lt;br /&gt;&lt;a href="http://mike-lehmann.blogspot.com/2006/09/scaling-oracleas-with-multiple-jvms.html"&gt;http://mike-lehmann.blogspot.com/2006/09/scaling-oracleas-with-multiple-jvms.html&lt;br /&gt;&lt;/a&gt; ) and you will have seen in the pictures (&lt;a href="http://photos1.blogger.com/blogger2/3046/4153/1600/jvm.gif"&gt;http://photos1.blogger.com/blogger2/3046/4153/1600/jvm.gif &lt;/a&gt;and &lt;a href="http://photos1.blogger.com/blogger2/3046/4153/1600/jvm.gif"&gt;http://photos1.blogger.com/blogger2/3046/4153/1600/ascjvm.gif&lt;/a&gt; ) ASControl provides simple configurability and simple viewing of the number of JVMs per OC4J.&lt;br /&gt;&lt;br /&gt;One thing that would be nice to see in the above situation *and* is not in the OracleAS Control 10.1.3 is a local topology viewer (it was available in 10.1.2.0.2).  In OracleAS 10.1.3, you can get this two ways: 1. Go to Grid Control R2 (&lt;a href="http://www.oracle.com/technology/products/oem/index.html"&gt;http://www.oracle.com/technology/products/oem/index.html&lt;/a&gt;) which can manage OracleAS 10.1.3 instances; 2. Look at a very lightweight utility called iHat.&lt;br /&gt;&lt;br /&gt;While GridControl is a incredibly powerful management tool, it does bring along a bit of overhead to my laptop as it really is an enterprise management  tool designed to manage Databases, OracleAS, Ebusiness Suite, Collaboration Suite and as of recently, a large swath of third party software and hardware providers (BEA WebLogic, WebSphere, .NET, a number of load balancers and firewalls amongst others).&lt;br /&gt;&lt;br /&gt;For me wanting to get a quick and dirty topology view - particularly with the multiple JVM feature discussed above - iHat is my favourite lightweight alternative. It is a very lightweight useful tool using Macromedia Flash to visualize the Oracle  Application Server topologies.  It reads the OracleAS process management environment to construct a  view of your basic topology (HTTP server, OC4J’s) but also HTTP request routing relationships and actual runtime processes in the environment.  It is downloadable from here - &lt;a href="http://www.oracle.com/technology/products/ias/utilities/index.html"&gt;http://www.oracle.com/technology/products/ias/utilities/index.html&lt;/a&gt; - a simple zip file that you unzip anywhere, hook it up to a JDK and point it at your OracleAS environment and away you go.&lt;br /&gt;&lt;br /&gt;The picture below shows how my OracleAS instance which contains two OC4J instances each with 2 JVMs – the same configuration shown in my previous post.  As you can also see you get a quick picture of my overall set of OracleAS instances (soa_j2ee, soasuite and soa_web)  each of which I can click on to see a pretty useful visual of what is going on in that instance.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/ihat.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/ihat.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Somewhat even more interesting, you can use this tool to kill processes and see the HA environment in action – whether it be killing the entire instance, a process or a particular JVM.  I use this frequently when showing OracleAS HA and how resilient OracleAS is even running stateful applications where it simply routes around any availability issue and also automatically tries to recover any down instances that may have failed for some reason.&lt;br /&gt;&lt;br /&gt;The pointing at the OracleAS environment is pretty straightforward.  Aside from needing an installation of the application server (managed version), the main trick is finding out the OPMN request port from which iHat is able to discover the OracleAS.  Fortunately in OracleAS 10.1.3.1 the port page for the application server returns like it was there in OracleAS 10.1.2 as shown below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/ports.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/ports.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The port you are looking for is the request port, highlighted here.   If you are running a multiple instance environment you will see several request ports - any one will do.  Once you have it the steps to start up iHat are shown below - as you have can tell my JDK is located at d:\jdk150, I am running it on my local machine and I chose the instance running in my ORACLE_HOME soasuite:&lt;br /&gt;&lt;br /&gt;set JAVA_HOME=d:\jdk150&lt;br /&gt;set PATH=d:\jdk150\bin&lt;br /&gt;set ORACLE_HOME=d:\soasuite&lt;br /&gt;java -classpath %ORACLE_HOME%/opmn/lib/optic.jar;d:\iHAT\ihat.jar oracle.ias.opmn.ihat.WebServer 7778 127.0.0.1:6006&lt;br /&gt;&lt;br /&gt;The 6006 port is my request port and 7778 is the port I chose to run iHat on.  Once I have done that I simply point my browser at http://localhost:7778 and the iHat tool will appear.  This does rely on Flash to be working in your browser which generally is not a problem.&lt;br /&gt;&lt;br /&gt;Check it out - a handy tool for visualizing your application server environment :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-1115426857239918411?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/1115426857239918411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/1115426857239918411'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/visualizing-middleware-topologies.html' title='Visualizing Middleware Topologies'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-3659999776695293235</id><published>2006-09-17T23:04:00.000-07:00</published><updated>2006-09-17T23:29:59.507-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OC4J'/><category scheme='http://www.blogger.com/atom/ns#' term='Discoverer'/><category scheme='http://www.blogger.com/atom/ns#' term='Datasource'/><category scheme='http://www.blogger.com/atom/ns#' term='VPD'/><title type='text'>Virtual Private Database - Discoverer and Java</title><content type='html'>I was out visiting a customer last week and talking about various bits of our technology.  They are heavily dependent in all their new applications on &lt;a href="http://www.oracle.com/technology/deploy/security/db_security/virtual-private-database/index.html"&gt;Oracle Virtual Private Database&lt;/a&gt; as a way of keeping data confidentiality across a shared user population reporting and transacting against that data.  As a result of this they depend on the user identity being propagated through to the database from the middle tier reporting and application layer to enable VPD to do its magic.&lt;br /&gt;&lt;br /&gt;As the product set they were investigating included &lt;a href="http://www.oracle.com/technology/products/ias/portal/index.html"&gt;OracleAS Portal&lt;/a&gt;, &lt;a href="http://www.oracle.com/technology/products/discoverer/index.html"&gt;BI Discoverer&lt;/a&gt; and Oracle Application Server (&lt;a href="http://otn.oracle.com/tech/java/oc4j"&gt;OC4J&lt;/a&gt;) , they had several questions around how their secure, as I came to think of it,  "business intelligence portal" would work:&lt;br /&gt;&lt;br /&gt;1. For reporting they have been prototyping quite successfully with BI Discoverer but now needed to understand if and how BI Discoverer + portal single signon work with VPD&lt;br /&gt;&lt;br /&gt;2. For their custom Java applications, again how do they interact with successfully with VPD&lt;br /&gt;&lt;br /&gt;For the first, it turns out to be quite simple and is well documented.  There is direct integration between the OracleAS Portal single sign on solution and virtual private database.  Here is the documentation:&lt;br /&gt;&lt;br /&gt;&lt;span class="314524403-15092006"&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span style=";font-family:georgia;font-size:100%;"  &gt;&lt;a href="http://download-west.oracle.com/docs/cd/B14099_19/bi.1012/b13918/security2.htm#sthref1008"&gt;http://download-west.oracle.com/docs/cd/B14099_19/bi.1012/b13918/security2.htm#sthref1008&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;For the second, it is slight more technical as the solution naturally is Java centric but fortunately the product management team for OC4J has put together a small sample that pretty much gives the answer in a few lines of code:&lt;br /&gt;&lt;br /&gt;Article:&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ds-proxy/doc/how-to-ds-proxy.html"&gt;http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ds-proxy/doc/how-to-ds-proxy.html&lt;/a&gt;,&lt;br /&gt;&lt;br /&gt;Source:&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ds-proxy/how-to-ds-proxy.zip"&gt;http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ds-proxy/how-to-ds-proxy.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the second example, once the user identity is set on the proxy authentication, all the normal VPD machinery kicks into place and executes as expected.&lt;br /&gt;&lt;br /&gt;This combination of 4 products - OracleAS Portal, Discoverer, Oracle SSO and OC4J - is quite interesting to see work together and can be quite compelling depending on the use case.  Rather than stitching 4 heterogeneous products across 4 different vendors to get a secure business intelligence portal (business issue 1), not only has the product integration being done from the start, the key value this particular customer was after, VPD integration, has also been pre-done literally out of the box (business issue 2 - why I was there).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-3659999776695293235?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/3659999776695293235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/3659999776695293235'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/virtual-private-database-discoverer-and.html' title='Virtual Private Database - Discoverer and Java'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-7441451101702635047</id><published>2006-09-14T21:22:00.000-07:00</published><updated>2006-09-14T21:37:34.527-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JMX MDB'/><category scheme='http://www.blogger.com/atom/ns#' term='JMS'/><category scheme='http://www.blogger.com/atom/ns#' term='Hermes'/><category scheme='http://www.blogger.com/atom/ns#' term='ASControl'/><title type='text'>OracleAS JMS, Hermes and MBeans</title><content type='html'>I was working with OracleAS JMS over the last few days (actually with the Oracle ESB which uses OracleAS JMS under the covers) and wanted to see the message queue contents as well as replay some messages.  Looking around I noticed this recent addition to the &lt;a href="http://www.hermesjms.com/"&gt;Hermes&lt;/a&gt; JMS client - &lt;a href="http://www.hermesjms.com/provider_oracle.html"&gt;instructions for setting up  Hermes to work with OracleAS&lt;/a&gt; and an accompanying viewlet.&lt;br /&gt;&lt;br /&gt;The only problem was that I was not using stand-alone OC4J (the 70M download) but the managed version of OracleAS so the configuration was slightly different.  First thing that changes is you have to add the optic.jar library to the list of libraries so that Hermes can understand the managed OracleAS process management environment (OPMN). The addition to the libraries is shown below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/Hermes1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/Hermes1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;and then when pointing Hermes at my instance, instead of using the ORMI port of stand-alone OC4J (ormi://localhost:23791) as shown on the Hermes site, I had to point at the process management port (typically 6003) so that the cluster of OC4J instances I have running on my laptop could be discovered as shown below (default is the parent application in any particular container):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/hermes2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/hermes2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Once that was done, Hermes operated just like against a stand-alone environment and let me poke around in my queues and topics, replay messages etc:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/hermes3.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/hermes3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Pretty cool.&lt;br /&gt;&lt;br /&gt;Not total satisfied with that, I also wanted to muck around in the OracleAS Control management console and noticed a quick and dirty way to look at queue/topic content in the MBean browser - kind of going behind the scenes of the management console which is built on top of these MBeans.&lt;br /&gt;&lt;br /&gt;Below is a picture sequence of browsing through the MBean browser to a particular queue, entering the bare minimum parameters to query the queue and the resulting output:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbean1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbean1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbean2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbean2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/mbean3.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/mbean3.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Obviously this is the technical backdoor as the majority of the ASControl management console is more focussed around task based interactions of configuring the server (e.g. like JMS queues and topics).  However,  if you happen to need this level of detail or are into very specific administrative scripting using a language like Groovy that is JMX aware,  knowing that OracleAS is fully managable via these MBeans gives you infinite configurability over your application server environment.&lt;br /&gt;&lt;br /&gt;For those not so inclined and more focussed on task based configuration - the goal of ASControl - JMS configurability is available from the console like the example shown below for creating a queues.  Just choose your poison.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/jms1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/jms1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Like with the pluggability of Hermes into OracleAS, a topic for another day, to extend the MBean discussion, will be plugging the JDK JConsole and open source kits like MC4J into this environment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-7441451101702635047?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/7441451101702635047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/7441451101702635047'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/i-was-working-with-oracleas-jms-over.html' title='OracleAS JMS, Hermes and MBeans'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-5254821859483545434</id><published>2006-09-10T21:09:00.000-07:00</published><updated>2006-09-09T09:55:48.656-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><title type='text'>Stopping and Starting SOA Suite Components</title><content type='html'>Recently Oracle put out a preview of the SOA Suite (Overview:  &lt;a href="http://otn.oracle.com/soa"&gt;http://otn.oracle.com/soa&lt;/a&gt;, Download: &lt;a href="http://www.oracle.com/technology/software/products/ias/soapreview.html"&gt;http://www.oracle.com/technology/software/products/ias/soapreview.html&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;The reason this packaging was created is, while all of the components in the SOA Suite in general are available as stand-alone products for those starting tactical projects, what seemed to happen in real life was most implementation projects almost inevitably required each of the components during some point in their lifecycle.  Pre-integrating them and packaging them together eliminates the need to integrate your enabling technologies and lets you focus on creating business value while at the same time letting you only use exactly what you need.&lt;br /&gt;&lt;br /&gt;To give a sense of this here are some simple use cases.  A customer might start with a project to automate a simple business process with BPEL (Oracle BPEL Process Manager) to prove SOA is real and then realize they want to separate out the business rules into a rules engine (Oracle Business Rules) because their business policies frequently change.  Or, after successfully automating a process, they want to secure key services in a managable fashion with WS-Security (Oracle Web Services Manager).  Or, rather than using BPEL to do both the connectivity and process logic, they want a more formal intermediation layer connecting and routing to their backend systems (Oracle ESB).&lt;br /&gt;&lt;br /&gt;To facilitate all approaches - use only one component (buy stand-alone components), grow organically as your project matures (add to your stand-alone buy) or start with all the pieces together, Oracle SOA Suite&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;  was created.  The pieces in the SOA Suite are the Oracle BPEL Process Manager, Oracle Web Services Manager, Oracle Business Rules, Oracle Enterprise Service Bus and Oracle BAM.  This can be run on &lt;a href="http://www.oracle.com/technology/tech/java/oc4j/1013/index.html"&gt;Oracle Application Server&lt;/a&gt; or other application servers and comes along with the &lt;a href="http://www.oracle.com/technology/products/jdev/index.html"&gt;JDeveloper&lt;/a&gt; IDE.  Optional to this is the &lt;a href="http://www.oracle.com/technology/tech/webservices/htdocs/uddi/index.html"&gt;Oracle Service Registry&lt;/a&gt;.  This offering is complemented by those serious about business process management by the &lt;a href="http://www.oracle.com/technologies/soa/bpa-suite.html"&gt;Oracle Business Process Analysis Suite&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A long opening story to get to the subject of this post which is some managability Oracle has added around the components of SOA Suite when installed altogether.  The end result is once you install the SOA Suite - a one click install for developers as this picture shows (more complex deployment topologies available in the advanced install option):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/soasuite.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/soasuite.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;you will find all 5 major components of the SOA Suite (Rules, BPEL PM, WSM and ESB) installed.&lt;br /&gt;&lt;br /&gt;As you might imagine given it is Oracle, each of these products are simply a set of J2EE applications running the the application server you have decided to deploy them on.  Because in the one click install developer mode the SOA Suite is deployed on a single instance of the application server, that can end up being a reasonably large number of J2EE applications (each component is typically 2 or more J2EE applications) with not much to distinguish them should you decide to start or stop one or more of the components.&lt;br /&gt;&lt;br /&gt;To help make this about as trivial as possible, what the Application Server Control console team did was categorize the sub-applications of each SOA component so that when the user goes to do an  application server administrative operation on, for example, the BPEL PM, they see a category called BPEL PM.  And when they go to do an administrative operation on the rules engine, they see a category called Rules. And likewise for Web Services Manager and ESB.   The picture below gives a sense of this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/soasuite_category1.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/soasuite_category1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As you can see it is pretty trivial to select one of the components and start, stop and even undeploy it should you not need it in a particular development or deployment environment.  If you drill down a little further, you will see the underlying applications of each SOA component. If you are an administrator of those components these will be meaningful (e.g. in Web services manager the subcomponents are the core runtime, the management console, the policy manager and the gateway); if not, you likely don't care.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/soasuite_category2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/soasuite_category2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Clearly, this level of detail is typically important to your application server administrator or a technical developer rather than the analyst building rules, processes, policies or bus infrastructure.   As you might imagine, each of these components have a more context aware console that you can get to from the SOA Suite lauch console (below):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/suiteconsole.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/suiteconsole.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;so you can edit business rules, service policies, business processes and service bus characteristics.&lt;br /&gt;&lt;br /&gt;This system view from the application server perspective is a  taste of some of the integration work that was done to make working with these components as a unit, particularly during a development cycle, very clean and easy in the 10.1.3.1 release.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/suiteconsole.gif"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-5254821859483545434?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/5254821859483545434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/5254821859483545434'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/stopping-and-starting-soa-suite.html' title='Stopping and Starting SOA Suite Components'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-6944356547991173220</id><published>2006-09-08T13:17:00.000-07:00</published><updated>2006-09-08T18:13:50.635-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OC4J'/><category scheme='http://www.blogger.com/atom/ns#' term='Cluster'/><category scheme='http://www.blogger.com/atom/ns#' term='JVM'/><title type='text'>Scaling OracleAS with Multiple JVMs</title><content type='html'>An hugely useful capability of Oracle Application Server that has been in the product for a dogs age is what is called multiple processes per OC4J instance.  In OracleAS 10.1.2 you can find it hidden away in the documentation here &lt;a href="http://download-west.oracle.com/docs/cd/B14099_11/core.1012/b14001/optj2ee.htm#CACCHACG"&gt;http://download-west.oracle.com/docs/cd/B14099_11/core.1012/b14001/optj2ee.htm#CACCHACG&lt;/a&gt;&lt;br /&gt;and here &lt;a href="http://download-west.oracle.com/docs/cd/B14099_11/core.1012/b14003/midtiermanage.htm#CACCHFJC"&gt;http://download-west.oracle.com/docs/cd/B14099_11/core.1012/b14003/midtiermanage.htm#CACCHFJC&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In summary what it lets you do is take one configuration set of an OC4J (J2EE Server) and instantiate n - you choose the number - instances of JVMs running that configuration set.  Rather than you as the administrator installing n instances of the application server or manually starting n JVMs, the application server does it for you automatically by taking the parameter you enter for number of JVMs and running the OC4J with that many JVMs.&lt;br /&gt;&lt;br /&gt;The end result is on machines that have large numbers of CPUs, or have huge CPU capacity from multi-core technologies or appliances like what &lt;a href="http://www.azulsystems.com/"&gt;Azul&lt;/a&gt; provides, it is really trivial to have your application, if it is CPU intensive, suck up all those resources for a minimum of adminstrative overhead.  Clearly it gives you some availability too but limited to a single machine - it seldom is used for this (or is as a by product), rather it is to optimize your hardware  It is a single parameter - turn up the number of JVMs or turn them down.  No install, no extra deployment. Nothing.&lt;br /&gt;&lt;br /&gt;Personally this has always seemed like an undermarketed feature of Oracle Application Server as not only does it give "free" scalablity and works for any J2EE application, it is so easy to use relative to what I have seen elsewhere.   It is hugely popular in the Oracle install base because one you see it in action it is a no-brainer to use.  Here's how it works.&lt;br /&gt;&lt;br /&gt;The following picture give a sense of what the number of processes feature does.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/oc4j_multijvm.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/oc4j_multijvm.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;What you see in the outer dark grey box is an Oracle Application Server instance - this is just a process space in which OC4J runs in.  For those in the know this could be thought of as an instance managed by the process manager, Oracle Process Manager (OPMN).  Within that, the lighter grey box,  you can see that there is a OC4J instance called OC4J_home.  What that really is is the configuration set or a set of configuration files associated with this J2EE/Oc4J server - the start up parameters of the server, the J2EE applications deployed to it, the queues, topics, datasources and adapters configured.  An Oc4J configuration instance, so to speak, though that is not official terminology.&lt;br /&gt;&lt;br /&gt;The white box, in the center, is the actual runtime instances of OC4J_home configuration instance.  Within it you can see that there are 4 processes. What that shows is 4 JVMs running the OC4J_home instance and using the identical configuration set underpinning OC4J_home.   If I change a datasource in that OC4J_home instance configuration, all 4 OC4J_home runtime instances know about it.  If I deploy a new application, all 4 OC4J_home runtime instances know about it.   It do my configuration operations once and all instances pick them up.&lt;br /&gt;&lt;br /&gt;How do I turn this on?  Well in OracleAS 10.1.3.1 I simple go to the server configuration page for a particular OC4J instance  and tell the server how many JVMs to run like the picture below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/ascjvm.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/ascjvm.png" alt="" border="0" /&gt;&lt;/a&gt;A single number and hit the apply button.  That's it.&lt;br /&gt;&lt;br /&gt;If I like editing XML I can go to &amp;lt;oracle_home&amp;gt;\opmn\conf\opmn.xml and edit the field called num_procs by the OC4J instance I am interested in but doing it from the console or scripting the change from JMX gracefully handles the startup of the changed configuration.&lt;br /&gt;&lt;br /&gt;Once you have made your change, in OracleAS 10.1.3.1, you can go to any page and it will tell you how many JVM instances are running per OC4J instance as this picture shows (from the cluster topology page:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/jvm.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/jvm.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Pretty cool.  Now in real life you frequently not only want to correctly utilize the CPU resources on your individual machines in the most efficient and operationally simply way possible (this being an example), clearly you also are concerned about availability should disaster strike and you need to fail over gracefully to other machines.&lt;br /&gt;&lt;br /&gt;As the above picture shows most people actually run multiple OC4J instances with multiple JVMs and then distribute them across machines.  The slightly expanded picture of the above screen below shows how not only can you use multiple JVMs on a single machine but you can pretty quickly and easily create groups of OC4J each with the tailored amount of JVMs spanning machine boundaries and application server instances.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/3046/4153/1600/clustergroup2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/3046/4153/320/clustergroup2.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Because I am but a poor man with only one machine I have to simulate 3 application server instances, one for two J2EE servers (soa_j2ee), one for an Apache HTTP server (soa_web) and another for what Oracle calls the SOA Suite (soasuite) containing our BPEL Process Manager, ESB, Rules engine, Web services manager amongst others.  It is a contrived example but shows a simplified environment (imagining each of these instances on separate machines) that could deliver HA while utilizing machine resources effectively with the JVM feature.&lt;br /&gt;&lt;br /&gt;At the bottom, which I suppose is a topic for another writeup, is the grouping feature which lets you group OC4J instances into a logical group that can span machines and OracleAS instances.   Ironically,  despite the seeming complexity of this setup, I would estimate it took me about 40 minutes to set it up - 2o minutes of which was  running the one button click install while the bits were laid  down on my machine.&lt;br /&gt;&lt;br /&gt;From what has always been available as a simple 70 megabyte download - OC4J Stand-alone - (http://www.oracle.com/technology/tech/java/oc4j/10131/index.html) designed for developers (though many use it in production deployments because it is so lightweight and easy to use - corresponding to a single JVM in this writeup) to the full fledged managed version I am running here - Oracle Application Server - (http://www.oracle.com/technology/software/products/ias/soapreview.html) , this is not a bad story that I don't think is told very often or understood but at least a stab at it has been taken here :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-6944356547991173220?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/6944356547991173220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=6944356547991173220&amp;isPopup=true' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/6944356547991173220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/6944356547991173220'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/scaling-oracleas-with-multiple-jvms.html' title='Scaling OracleAS with Multiple JVMs'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34024422.post-115765535732807731</id><published>2006-09-07T11:14:00.000-07:00</published><updated>2006-09-07T12:54:34.226-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OPMN'/><category scheme='http://www.blogger.com/atom/ns#' term='ASControl'/><title type='text'>OracleAS 10.1.3 - Application Server Control</title><content type='html'>With Oracle Application Server 10.1.3, the architecture behind the management console of the server,  Application Server Control (I use ASControl for short here), has changed.  Rather than being installed with every instance of the Application Server that you install, it is  a J2EE application and only enabled on a single instance within your application server cluster yet can manage all OC4J's within that cluster.&lt;br /&gt;&lt;br /&gt;Normally after running the install of 10.1.3, you can go to http://&amp;lt;myhost&amp;gt;:&amp;lt;myport&amp;gt;/em&lt;myhost&gt;&lt;port&gt; and get access to it.  If everything is set up right you will get an image like the one below:&lt;br /&gt;&lt;br /&gt;&lt;/port&gt;&lt;/myhost&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3158/3743/1600/ascontrol.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/3158/3743/320/ascontrol.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is in the ideal world. However you can find yourself messed up a little here.  In the one click install things generally work out of the box as ASControl is enabled by default.  For the advanced install - where people often are setting up more complex topologies (multi-OC4J, special repository configurations etc), you will see that you must specifically select an instance to be the management instance as this screenshot shows from the OracleAS 10.1.3.1 installer:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3158/3743/1600/ascontrol2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/3158/3743/320/ascontrol2.png" alt="" border="0" /&gt;&lt;/a&gt;Where the trouble comes in for many people is that they go down the advanced install route and forget to check this box and then wonder why they can't get to the management console ASControl from their browser.&lt;br /&gt;&lt;br /&gt;It turns out to be pretty straightforward to fix but until you have run into it it can be hard to dig through the documentation (&lt;a href="http://download-east.oracle.com/docs/cd/B25221_04/index.htm"&gt;http://download-east.oracle.com/docs/cd/B25221_04/index.htm&lt;/a&gt; - see the Administrative Guide) to track down the exact steps.  So to help - and remember this is dated to OracleAS 10.1.3.0 or later - here are some suggested steps.&lt;br /&gt;&lt;br /&gt;1. First check to see what the status of the ascontrol application is to run the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;oracle_home&amp;gt;\opmn\bin\opmnctl @cluster status -app&lt;/span&gt;&lt;oracle_home&gt;&lt;br /&gt;&lt;br /&gt;This will produce a table showing what applications are deployed to your Oracle Application Server cluster and which ones are active.  In mine I have cut out the line to show only the status of the ascontrol application.&lt;br /&gt;&lt;br /&gt;&lt;/oracle_home&gt;&lt;span style="font-family:courier new;"&gt;|pid | name      | state   | classification | rtid    | routable |&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;|PID | ascontrol | stopped | external       | g_rt_id | false    |&lt;/span&gt;&lt;br /&gt;&lt;div style="color: rgb(51, 0, 0);"&gt;&lt;span class="578483716-07092006"&gt;&lt;span style="font-size:0;"&gt;&lt;span style=";font-family:Courier New;font-size:85%;"  &gt;&lt;span class="480070717-07092006"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="578483716-07092006"&gt;&lt;span style="font-size:0;"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Courier New;font-size:85%;"  &gt;&lt;span class="480070717-07092006"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div&gt;2. If it is down, you probably want to start it up on a specific instance to get access to it.  Remember you only have to do this on one OC4J instance.  A quick way of doing this is running the following command:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;&amp;lt;oracle_home&amp;gt;\opmn\bin\opmnctl startproc process-type=home application=ascontrol&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note a couple of things here.  First, I removed the @cluster attribute because I want to focus on a single instance within my cluster and second I used the process-type attribute to specifically name an OC4J instance.  In this case I chose "home" as the OC4J instance I wanted to start ASControl on. When you run the status command you will be provided with a listing of all the OC4J instances in your cluster (a less verbose way to see the OC4J instances is to use &lt;span style="font-family:courier new;"&gt;opmnctl @cluster status &lt;/span&gt;and remove the -app option - this will eliminate the status of the applications)&lt;br /&gt;&lt;br /&gt;The reason this command will work is that  ASControl is always deployed to every OC4J instance but is designed to only be started on one.&lt;br /&gt;&lt;br /&gt;3. If all has gone well executing the command opmnctl @cluster status -app will have at least one line that looks like the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;| pid | name      | state   | classification | rtid    | routable |&lt;br /&gt;| PID | ascontrol | started | external       | g_rt_id | false    |&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="578483716-07092006"&gt;&lt;span style="font-size:0;"&gt;&lt;span style="color: rgb(0, 0, 255);font-family:Arial;font-size:85%;"  &gt;&lt;span class="480070717-07092006"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;A quick a dirty way to make this happen independent of the command is to actually edit the xml files that the opmnctl command operates on ... the file is &lt;oracle_home&gt;&amp;lt;oracle_home&amp;gt;\\j2ee\&lt;oc4j_instance_name&gt;\config\\server.xml - now after that command you will see an entry for ascontrol something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="true"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you had manually editted this by hand, you would have had to bounce the server (opmnctl stopall followed by opmnctl startall are the quickest routes) to have it take effect whereas the command line approach dealing with the application only removes this issue.&lt;br /&gt;&lt;br /&gt;4.  Following 3, you may be lucky now and be able to go from your browser to http://&amp;lt;myhost&amp;gt;:&amp;lt;myport&amp;gt;/em.&lt;br /&gt;&lt;br /&gt;However, you may find that your ASControl application was already started (you did not have to follow steps 1-3) and you still can't connect.  Or after following steps 1-3 you still can not connect.  You may have the problem that I am showing in step 2 but did note.&lt;br /&gt;&lt;br /&gt;The last reason for not being able to connect to ASControl through a browser is generally due to  something called the routing id.   Routing ids are a new feature in OracleAS 10.1.3 that let you route HTTP requests to specific instances or groups of OC4J - see: &lt;a href="http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14432/topology.htm#CHDBAAFI"&gt;http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14432/topology.htm#CHDBAAFI&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If it is turned off for your application, even though your application is started, no requests will be routed there.    It is great feature to have fine grained control on how HTTP requests are routed across clusters of OC4J but painful when you just want to connect to one application!&lt;br /&gt;&lt;br /&gt;It is pretty straightforward to fix this by going to the file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;oracle_home&amp;gt;\j2ee\&amp;lt;oc4j_instance_name&amp;gt;\config\default-website.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and editting the line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;web-app application="ascontrol" name="ascontrol" root="/em" startup="true" routing="false"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to be:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;web-app application="ascontrol" name="ascontrol" root="/em" startup="true"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you are an advanced OC4J user you may have a different Web site file name - I am just using the default default-website.xml.&lt;br /&gt;&lt;br /&gt;5. To make sure this takes effect, it would be good to bounce the ASControl application again on the OC4J instance you have chosen to run ASControl (in my case home) by running the commands:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;oracle_home&amp;gt;\opmn\bin\opmnctl stopproc process-type=home application=ascontrol&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;oracle_home&amp;gt;\opmn\bin\opmnctl startproc process-type=home application=ascontrol&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6. By now going to the URL http://&amp;lt;myhost&amp;gt;:&amp;lt;myport&amp;gt;/em should give you some success.  I hope!&lt;br /&gt;&lt;/oc4j_instance_name&gt;&lt;/oracle_home&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34024422-115765535732807731?l=mike-lehmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mike-lehmann.blogspot.com/feeds/115765535732807731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34024422&amp;postID=115765535732807731&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/115765535732807731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34024422/posts/default/115765535732807731'/><link rel='alternate' type='text/html' href='http://mike-lehmann.blogspot.com/2006/09/oracleas-1013-application-server.html' title='OracleAS 10.1.3 - Application Server Control'/><author><name>Mike</name><uri>http://www.blogger.com/profile/04965381170738082226</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.oracle.com/technology/pub/columns/images/lehmann.jpg'/></author><thr:total>0</thr:total></entry></feed>
