<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title></title>
	<atom:link href="http://techzen.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://techzen.wordpress.com</link>
	<description>Pondering on compassion that is greater than rationality</description>
	<lastBuildDate>Thu, 26 Nov 2009 06:01:11 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='techzen.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/b774efe8deb98eb991e294393b21648a?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title></title>
		<link>http://techzen.wordpress.com</link>
	</image>
			<item>
		<title>javascript</title>
		<link>http://techzen.wordpress.com/2009/11/26/javascript-4/</link>
		<comments>http://techzen.wordpress.com/2009/11/26/javascript-4/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 05:44:16 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1268</guid>
		<description><![CDATA[Best way to call javascript in ahref tag is to add href=&#8221; &#8221; and onlick=&#8221;jsFunction(); return false;&#8221;
the false returning ensures the link in href is not evaluated. No need to add label called javascript: to the jsFunction call since that is verbose and not used internally in our function either.
      [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1268&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Best way to call javascript in ahref tag is to add href=&#8221; &#8221; and onlick=&#8221;jsFunction(); return false;&#8221;</p>
<p>the false returning ensures the link in href is not evaluated. No need to add label called javascript: to the jsFunction call since that is verbose and not used internally in our function either.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1268/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1268&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/26/javascript-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>DDD</title>
		<link>http://techzen.wordpress.com/2009/11/21/ddd/</link>
		<comments>http://techzen.wordpress.com/2009/11/21/ddd/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 13:31:34 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1258</guid>
		<description><![CDATA[Here are some points from Evan&#8217;s talk on Domain Design from the site: DDD

Creative collaboration of domain experts and software experts
Exploration and experimentation
Emerging model shaping a ubiquitous language
Explicit context boundaries
Focus relentlessly on the core domain

So basically DDD defines the &#8220;values&#8221; that should dictate the software design.
A domain model is not a particular diagram; it is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1258&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here are some points from Evan&#8217;s talk on Domain Design from the site:<a href="http://domaindrivendesign.org/library/evans_2009_1" target="_blank"> DDD</a></p>
<ul>
<li>Creative collaboration of domain experts and software experts</li>
<li>Exploration and experimentation</li>
<li>Emerging model shaping a ubiquitous language</li>
<li>Explicit context boundaries</li>
<li>Focus relentlessly on the core domain</li>
</ul>
<p>So basically DDD defines the <strong>&#8220;values&#8221;</strong> that should dictate the software design.</p>
<p>A domain model is not a particular diagram; it is the <strong><span style="color:#ff0000;">idea</span></strong><span style="color:#ff0000;"> </span>that the diagram is intended to convey. It is not just the knowledge in a domain expert’s head; it is a <span style="color:#ff0000;"><strong>rigorously organized and selective abstraction</strong></span> of that knowledge. A diagram can represent and communicate a model, as can carefully written code, as can an English sentence.</p>
<div id="_mcePaste"><strong><span style="color:#800080;">Find order in this seemingly chaotic amount of information. Order to the point that the system is described in an intense precision and clarity.</span></strong></div>
<div><strong><span style="color:#800080;"><br />
</span></strong></div>
<div><strong><span style="color:#800080;"></p>
<div><span style="color:#000000;font-weight:normal;">Domain experts know their area of expertise well, but they organize and use their knowledge in a specific way, which is not always the best to be implemented into a software system.</span></div>
<div><span style="color:#000000;font-weight:normal;"><br />
</span></div>
<div><span style="font-weight:normal;"><span style="color:#000000;">Those concepts may come out unpolished and disorganized, but nonetheless they are essential for understanding the domain. You need to learn as much as possible about the domain from the experts. And by putting the right questions, and <em><span style="text-decoration:underline;">processing the information in the right way,</span></em> you and the experts will start to sketch a view of the domain, a domain model. This view is neither complete nor correct, but it is the start you need. Try to figure out the essential concepts of the domain.</span></span></div>
<div><span style="font-weight:normal;"><span style="color:#000000;"></p>
<div><strong>The Ubiquitous Language</strong>: A core principle of domain-driven design is to use a language based on the model. Since the model is the common ground, the place where the software meets the domain, it is appropriate to use it as the building ground for this language.</div>
<div><em>How do we approach the transition from model to code</em></div>
<div>Closely relate domain modeling and design. The model should be constructed with an eye open to the software and design considerations. Tightly relating the code to an underlying model gives the code meaning and makes the model relevant. Analyst must do some code and Coder must learn to express a model through the code.</div>
<div><strong></p>
<div><span style="font-weight:normal;"></p>
<div><strong><span style="color:#ff0000;">Code becomes an expression of the model </span></strong></div>
<div>
<div><strong><span style="color:#800080;">Partition a complex program into LAYERS. Develop  a design within each LAYER that is cohesive and that depends only on the layers below.</span></strong></div>
</div>
<div>UI -&gt;  Application (no state/ no b/s logic here &#8211; only application state )    -&gt;  Domain (only b/s logic)  -&gt; Infrastructure (DB/ui library handling etc)</div>
<div>When domain-related code is mixed with the other layers, it becomes extremely difficult to see and think about.</div>
<div>
<div>Superficial changes to the UI can actually change business logic. To change a business rule may require meticulous tracing of UI code, database code, or other program elements. Implementing coherent, model-driven objects becomes impractical</div>
<div>
<div><span style="color:#800080;"><strong><br />
</strong></span></div>
<div>
<div><span style="text-decoration:underline;">ENTITY</span>:      Implementing entities in software means creating <strong>identity</strong>.</div>
<div>
<div>Recommended to select as entities only those objects which conform to the entity definition. And make the rest of the objects <span style="text-decoration:underline;">VALUE OBJECTS</span>. Recommended that value objects be <strong>immutable</strong></div>
<div><strong><br />
</strong></div>
</div>
<div><span style="text-decoration:underline;">SERVICE</span> : Important behavior of the domain, operation stateless, does not naturally belong to entity,vo and refers to objects in domain</div>
</div>
<div>Segregating service in a specific layer is a tricky process that needs to be done.</div>
<div><span style="text-decoration:underline;">MODULES: </span>Group similar classes together (software code should have a high level of cohesion and a low level of coupling) Communicational cohesion is achieved when parts of the module operate on the same data. Functional cohesion is achieved when all parts of the module work together to perform a well-defined task.</div>
<div><span style="text-decoration:underline;">Interfaces </span>of modules accessed by other modules. Instead of calling three objects of a module, it is better to access one interface, because it reduces coupling. Low coupling reduces complexity, and <em><span style="text-decoration:underline;">increases maintainability.</span></em></div>
<div></div>
<div><span style="color:#008080;"><strong>DOMAIN OBJECT PATTERN</strong></span></div>
<div>
<div></div>
<div><span style="text-decoration:underline;">AGGREGATES</span></div>
<div>Defines object ownership and boundaries.</div>
<div></div>
<div><em>Clean up actions</em></div>
<div>
<div>1. Associations which are not essential for the model should be removed. They may exist in the domain, but they are not necessary in our model, so take them out.</div>
<div>
<div>2. Multiplicity can be reduced by adding a constraint</div>
<div>
<div>3. Bidirectional associations can be transformed in unidirectional ones</div>
</div>
<div></div>
</div>
<div></div>
</div>
<div></div>
<div>
<div>Difficult to guarantee the consistency of changes to objects in a model with complex associations. Enforce the invariants ( Rules which have to be maintained whenever data changes)</div>
<div></div>
</div>
<div>
<p>&nbsp;</p>
<div>Factories and Repositories are two design patterns which help us</div>
<div>deal with object creation and storage.</div>
<p>&nbsp;</p>
</div>
</div>
<div><strong><span style="color:#800080;"><br />
</span></strong></div>
</div>
</div>
<div>Context</div>
<p>&nbsp;</p>
<p></span></div>
<p></strong>
<p>&nbsp;</p>
</div>
<p>&nbsp;</p>
<p></span></span></div>
<p></span></strong>
<p>&nbsp;</p>
</div>
<div>Bounded Context</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1258/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1258&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/21/ddd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>Amazing Quote!!</title>
		<link>http://techzen.wordpress.com/2009/11/20/amazing-quote/</link>
		<comments>http://techzen.wordpress.com/2009/11/20/amazing-quote/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 13:34:35 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[quote]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1255</guid>
		<description><![CDATA[Smart, experienced people become incompetent through loss of hands-on practice.
- Eric Evans (Domain Driven Design)
Amazing. Was completely blow away with this quote today which confirmed my understanding of  the role of an architect and its significance. Go ahead , read this article now  
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1255&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote><p>Smart, experienced people become incompetent through loss of hands-on practice.</p>
<p>- Eric Evans (Domain Driven Design)</p>
<p>Amazing. Was completely blow away with this quote today which confirmed my understanding of  the role of an architect and its significance. Go ahead , read this <a href="http://domaindrivendesign.org/library/evans_2004_2">article </a>now <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1255/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1255&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/20/amazing-quote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>PGT</title>
		<link>http://techzen.wordpress.com/2009/11/20/pgt/</link>
		<comments>http://techzen.wordpress.com/2009/11/20/pgt/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 06:46:36 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[CAS]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1246</guid>
		<description><![CDATA[Introduction to PGT:
Proxy authentication.  It&#8217;s designed specifically for applications authenticating on behalf users.  In such scenario your Web application would receive a Proxy Granting Ticket (PGT) when validating its Service Ticket and use that PGT to request Proxy Tickets to present to the Web Services.  Your XFire Web Services would then validate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1246&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Introduction to PGT:<br />
Proxy authentication.  It&#8217;s designed specifically for applications authenticating on behalf users.  In such scenario your Web application would receive a Proxy Granting Ticket (PGT) when validating its Service Ticket and use that PGT to request Proxy Tickets to present to the Web Services.  Your XFire Web Services would then validate those Procy Tickets directly with CAS.  This should eliminate the need to pass username/password more than once, which is why you are implementing SSO.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1246/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1246&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/20/pgt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>JMX</title>
		<link>http://techzen.wordpress.com/2009/11/13/jmx/</link>
		<comments>http://techzen.wordpress.com/2009/11/13/jmx/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 04:45:25 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1197</guid>
		<description><![CDATA[ModelMBean can be created by using any simple POJO.
ModelMBeanInfo = Interface, MBeanInfo     = Class
I was wondering &#8211; why does the MBeanInfo class not implement the ModelMBeanInfo interface?. MBeanInfo class does implement some methods defined in ModelMBeanInfo interface but not all the methods &#8211; like getDescriptors etc is not implemented, and in addition to that there [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1197&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>ModelMBean can be created by using any simple POJO.</p>
<p>ModelMBeanInfo = Interface, MBeanInfo     = Class</p>
<p>I was wondering &#8211; why does the MBeanInfo class not implement the ModelMBeanInfo interface?. MBeanInfo class does implement some methods defined in ModelMBeanInfo interface but not all the methods &#8211; like getDescriptors etc is not implemented, and in addition to that there are other methods like fastGetAttributes.</p>
<blockquote><p>Java resources wishing to be manageable instantiate the ModelMBean using the MBeanServer&#8217;s <strong>createMBean </strong>method. The resource then sets the ModelMBeanInfo and Descriptors for the ModelMBean instance</p>
<p>A Java object cannot be registered in the MBeanServer unless it is a JMX compliant MBean. By instantiating a ModelMBean, resources are guaranteed that the MBean is valid. MBeanException and RuntimeOperationsException must be thrown on every public method. This allows for wrapping exceptions from distributed communications (RMI, EJB, etc.)</p>
<p>The contents of the <code>MBeanInfo</code> for a Dynamic MBean are determined by its <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/DynamicMBean.html#getMBeanInfo()"><code>getMBeanInfo()</code></a> method. This includes Open MBeans and Model MBeans, which are kinds of Dynamic MBeans.</p></blockquote>
<p>We need the following class instances</p>
<div id="_mcePaste">
<pre class="brush: java;">
&lt;div&gt;ModelMBeanOperationInfo[] ops;
ModelMBeanAttributeInfo[] atts ;
ModelMBeanConstructorInfo[] cons;
ModelMBeanNotificationInfo[] notifs;
</pre>
<p>mmbinfo (intfc), mbinfo (class), mmbinfosupport (implementation of mmbinfo)</p>
<pre class="brush: java;">

  return new ModelMBeanInfoSupport( &quot;javax.management.modelmbean.ModelMBeanInfo&quot;, &quot;description&quot;, atts, cons, ops, notifs, desc );
  ObjectName mName = new ObjectName(&quot;JMXBookAgent:name=Modeled&quot;);
  client.createMBean( &quot;javax.management.modelmbean.RequiredModelMBean&quot;, mName );
 </pre>
<p>﻿Now once you have created an object of MMBISupport then you use it in the call of it&#8217;s setter method <span style="color:#ff6600;">setModelMBeanInfo <span style="color:#000000;">and only the is your bean ready to be used by other clients.</span></span></p>
<p><span style="color:#ff6600;"><span style="color:#000000;">So the sequence is:</span></span></p>
<p><span style="color:#ff6600;"><span style="color:#000000;">1. Create  an object of mmbiSupport and populate it (myInfo).</span></span></p>
<p><span style="color:#ff6600;"><span style="color:#000000;">2. Call the createBean method and pass it your ObjectName. (Registration)</span></span></p>
<p><span style="color:#ff6600;"><span style="color:#000000;">3. Call the setModelMBeanInfo method to set myInfo (Op. Exposer)</span></span></p>
<p><span style="color:#ff6600;"><span style="color:#000000;">4. Call the <span style="font-family:'Lucida Grande', Verdana, Arial, 'Bitstream Vera Sans', sans-serif;white-space:pre-wrap;">setManagedResource method to set POJO instance.</span></span></span></p>
<pre class="brush: java;">

String[] sig = { &quot;java.lang.Object&quot;, &quot;java.lang.String&quot; };
Object[] params = { obj, &quot;ObjectReference&quot; };
client.invoke( mName, &quot;setManagedResource&quot;, params, sig );
</pre>
<p><a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanInfo.html">Java 5.0 JMX Api Doc</a></p>
<p>Useful class for building  - <a href="http://www.javadocexamples.com/java_source/jmxbook/ch7/ModelMBeanInfoBuilder.java." target="_blank">ModelMBeanInfoBuilder.java</a></p>
<p>Code for  creating ModelMbean</p>
<pre class="brush: java;">
  //Step 1: Create your object
			DBModel mypojo = new DBModel();

			//Step 2: Expose it through ModelMBeanInfo
		    ModelMBeanInfoBuilder builder = new ModelMBeanInfoBuilder();
		    //Descriptor attDesc = builder.buildAttributeDescriptor( &quot;MyAttribute&quot;, null, &quot;always&quot;, &quot;10&quot;, null, &quot;getMyAttribute&quot;, null, &quot;10&quot; );
		    Descriptor attDesc = builder.buildAttributeDescriptor( &quot;MaxConn&quot;,&quot;Max Connection&quot;,&quot;never&quot;,&quot;0&quot;,&quot;0&quot;,&quot;getTotalConn&quot;,null,&quot;-1&quot;);
		    builder.addModelMBeanAttribute( &quot;MaxConn&quot;, &quot;java.lang.Integer&quot;, true, false, false, &quot;Get the max connection&quot;, attDesc );
Descriptor opGetDesc = builder.buildOperationDescriptor( &quot;getTotalConn&quot;, null, &quot;getter&quot;, null, null, &quot;mypackage.jmx.DBModel&quot;, &quot;10&quot; );
		    builder.addModelMBeanMethod( &quot;getTotalConn&quot;, null, null, null, &quot;&quot;, &quot;java.lang.String&quot; , MBeanOperationInfo.INFO, opGetDesc );
		    Descriptor mbeanDesc = builder.buildMBeanDescriptor( &quot;DB&quot;, &quot;SampleDBModel&quot;, &quot;never&quot;, &quot;-1&quot;, null ,null, null, null );
		    ModelMBeanInfo myinfo = builder.buildModelMBeanInfo( mbeanDesc );

		    //Step 3: Register it
		    ObjectName oname = new ObjectName(dbDomainName);
		    MBeanServer mbs;
		    List mbsArl = MBeanServerFactory.findMBeanServer(null);
			if(mbsArl.size() &gt; 0)
			{
				mbs = (MBeanServer)mbsArl.get(0);
				System.out.println(&quot;Got existing mbean server . . . .&quot;);
			}
			else
				mbs = ManagementFactory.getPlatformMBeanServer();

                     /mbs.createMBean(&quot;javax.management.modelmbean.RequiredModelMBean&quot;, oname);
		     RequiredModelMBean modelmbean =	new RequiredModelMBean( myinfo );
		    // Associate it with the resource (a TestBean instance)
		    modelmbean.setManagedResource(  mypojo, &quot;objectReference&quot;);
		    //modelmbean.setModelMBeanInfo(myinfo);

         	    mbs.registerMBean(modelmbean, oname);
                            /* The below code does not work ! - so have commented it */
                              mbs.createMBean(&quot;javax.management.modelmbean.RequiredModelMBean&quot;, oname);
				//Step 4: Call the setters for our POJO and INFO objects.

				//Set our POJO
			    String[] sig = { &quot;java.lang.Object&quot;, &quot;java.lang.String&quot; };
			    Object[] params = { mypojo, &quot;ObjectReference&quot; };
			    mbs.invoke( oname, &quot;setManagedResource&quot;, params, sig );

				//Set our INFO
			    sig = new String[ 1 ];
			    sig[ 0 ] = &quot;javax.management.modelmbean.ModelMBeanInfo&quot; ;
			    params = new Object[ 1 ];
			    params[ 0 ] = myinfo;
			    mbs.invoke( oname, &quot;setModelMBeanInfo&quot;, params, sig ); */
</pre>
</div>
<p>PersistPeriod: Specifies the number of seconds that the OnTimer or NoMoreOftenThan persistence policies use. If you do not specify this attribute in the MBeanType or</p>
<p>MBeanAttribute elements, the assumed value is 0.If PersistPolicy is set to OnTimer, then the attribute is persisted when the number of seconds expires. If PersistPolicy is set to</p>
<p>NoMoreOftenThan, then persistence is constrained to happen not more often than the specified number seconds.<br />
Note: When specified in the MBeanType element, this value overrides any setting within an individual MBeanAttribute subelement.</p>
<p>PersistPolicy: Specifies how persistence will occur</p>
<p>Never. The attribute is never stored. This is useful for highly volatile data or data that only has meaning within the context of a session or execution period.<br />
OnTimer. The attribute is stored whenever the MBean type&#8217;s persistence timer, as defined in the PersistPeriod attribute, expires.<br />
OnUpdate. The attribute is stored every time the attribute is updated.<br />
NoMoreOftenThan. The attribute is stored every time it is updated unless the updates are closer together than the PersistPeriod. This mechanism helps prevent temporarily highly</p>
<p>volatile data from affecting performance.<br />
OnUnregister, that means that the value of the attribute is persisted when the MBean containing it is unregistered from the MBean Server</p>
<p>currencyTimeLimit: How long an attribute value is valid before needing to be refreshed.<br />
0 = a seconds value</p>
<p>If you do not specify this attribute in the MBeanType or MBeanAttribute elements, the assumed value is Never. Note: When specified in the MBeanType element, this value overrides any setting within an individual MBeanAttribute subelement.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1197/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1197&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/13/jmx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>Forces</title>
		<link>http://techzen.wordpress.com/2009/11/12/forces/</link>
		<comments>http://techzen.wordpress.com/2009/11/12/forces/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 01:20:59 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[learn]]></category>
		<category><![CDATA[poetry]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1204</guid>
		<description><![CDATA[Knots of my imagination,
Tears me away from my bonds of Present,
Shreds  &#8211; self respect and dignity,
Real self &#8211; lost in the mundane thoughts,
Fake mountains of past and future.
Obstructing my view of life.
Blind, enslaved,
Despising my own imagination,
Watching,
Glasses shattered around,
- Mistaks of the past.
I remember, how these broke,
I remember, how I gently shaped them,
With every hope [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1204&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="font:times 9pt;"><em>Knots of my imagination,<br />
Tears me away from my bonds of Present,<br />
Shreds  &#8211; self respect and dignity,<br />
Real self &#8211; lost in the mundane thoughts,<br />
Fake mountains of past and future.<br />
Obstructing my view of life.</em></span></p>
<p><em>Blind, enslaved,<br />
Despising my own imagination,<br />
Watching,<br />
Glasses shattered around,<br />
- Mistaks of the past.</p>
<p>I remember, how these broke,<br />
I remember, how I gently shaped them,<br />
With every hope and every dream,<br />
That I could possibly spawn.</p>
<p>These worn out dusty shoes,<br />
Of my imagination,<br />
Can take me no longer,<br />
To new places.</p>
<p>Awaken, dearest,<br />
Listen no more to lies,<br />
Spoken by ignorance.<br />
That flows in your veins.</p>
<p>And now,<br />
I see through my imagination,<br />
Walk through the shattered pieces,<br />
Careful not to trample on them again,<br />
And make my way out,</p>
<p>To breath the fresh air.<br />
and the livliness,<br />
completeness.<br />
opportunity,<br />
of the present.</p>
<p></em></p>
<p><em>Fragrance of the beautiful flowers,<br />
Calls me.<br />
Come dearest, Come to this beautiful present.<br />
We are here.<br />
Waiting for you.<br />
Gently. Purely .<br />
Ever Yours.<br />
</em></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1204&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/12/forces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>Swaraj</title>
		<link>http://techzen.wordpress.com/2009/11/11/swaraj/</link>
		<comments>http://techzen.wordpress.com/2009/11/11/swaraj/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 04:01:23 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[sahaja]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1193</guid>
		<description><![CDATA[स्वराज   हमारा   जन्मसिद्ध  अधिकार हैं !
~~~~
आत्मा का प्रकाश शारीर में,
~~~~
निर्विचारिता मस्तिष्क में
~~~~
Swaraj is my birthright and I shall have it. Freedom from the slavery of thoughts &#8211; and guidance from the light of Atma. That is our path in this life. 


       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1193&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="font-size:14pt;"><span style="color:#800000;"><strong>स्वराज   हमारा   जन्मसिद्ध  अधिकार हैं !</strong></span></span></p>
<p><span style="font-size:17pt;"><span style="color:#800000;"><strong>~~~~</strong></span></span></p>
<p><span style="font-size:11pt;"><span style="color:#800000;"><span style="color:#008000;"><strong>आत्मा का प्रकाश शारीर में,</strong></span></span></span></p>
<p><span style="font-size:11pt;"><span style="color:#800000;"><span style="color:#008000;">~~~~</span></span></span></p>
<p><span style="font-size:11pt;"><span style="color:#800000;"><span style="color:#008000;"><strong>निर्विचारिता मस्तिष्क में</strong></span></span></span></p>
<p><span style="font-size:medium;"><span style="color:#008000;">~~~~</span></span></p>
<p><span style="font-size:medium;">Swaraj is my birthright and I shall have it. Freedom from the slavery of thoughts &#8211; and guidance from the light of Atma. That is our path in this life. </span></p>
<div><span style="font-family:Arial, Helvetica, sans-serif;font-size:medium;"><span style="line-height:21px;white-space:pre-wrap;"><br />
</span></span></div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1193&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/11/swaraj/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>Jboss JMX with Hyperic</title>
		<link>http://techzen.wordpress.com/2009/11/09/jboss-jmx-with-hyperic/</link>
		<comments>http://techzen.wordpress.com/2009/11/09/jboss-jmx-with-hyperic/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 09:56:38 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[hyperic]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[jmx]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1185</guid>
		<description><![CDATA[One of the uses of JMX is for exposing any data across remotely.
If you need to use Jboss and Hyperic for JMX configuration then following configurations are required:
1. Select a property to be exposed. To test: take Catalina:type=StringCache , this is existing by default.
2. In Hyperic you can create the plugin .xml file either in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1185&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One of the uses of JMX is for exposing any data across remotely.<br />
If you need to use Jboss and Hyperic for JMX configuration then following configurations are required:</p>
<p>1. Select a property to be exposed. To test: take Catalina:type=StringCache , this is existing by default.<br />
2. In Hyperic you can create the plugin .xml file either in the /hq-plugins folder or  in the /hq/agent-4.1.3/bundles/agent-4.1.3-1067/pdk plugins folder.</p>
<p>3. The plugin xml file for String cache jmx  attr named: cacheSize in the file customjmx-plugin.xml  is below:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;plugin name=&quot;customjmx&quot; package=&quot;org.hyperic.hq.product.jmx&quot;&gt;
  &lt;classpath&gt;
    &lt;include name=&quot;pdk/lib/mx4j&quot;/&gt;
  &lt;/classpath&gt;

  &lt;config name=&quot;jmx&quot; type=&quot;global&quot;&gt;
    &lt;option name=&quot;jmx.url&quot;
            description=&quot;JMX URL to MBeanServer&quot;
            default=&quot;service:jmx:rmi:///jndi/rmi://machineName:12345/jmxrmi&quot;/&gt;
  &lt;/config&gt;

&lt;property name=&quot;BEAN_NAME&quot;
            value=&quot;Catalina:type=StringCache&quot;/&gt;
&lt;server name=&quot;jboss_jmx&quot;&gt;
          &lt;property name=&quot;PROC_HOME_PROPERTY&quot; value=&quot;program.name=testJboss.sh&quot;/&gt;
          &lt;property name=&quot;PROC_MAIN_CLASS&quot; value=&quot;org.jboss.Main&quot;/&gt;
	  &lt;plugin type=&quot;autoinventory&quot;
		class=&quot;org.hyperic.hq.product.jmx.MxServerDetector&quot;/&gt;
	&lt;plugin type=&quot;measurement&quot;
			class=&quot;org.hyperic.hq.product.jmx.MxMeasurementPlugin&quot;/&gt;
          &lt;metric name=&quot;cacheSize&quot;
                  template=&quot;${BEAN_NAME}:cacheSize&quot;
                  alias=&quot;cacheSize&quot;
                  indicator=&quot;true&quot;/&gt;
 &lt;/server&gt;
&lt;/plugin&gt;
</pre>
<p>Hyperic uses SIGAR for discovering processes and the <a href="http://support.hyperic.com/display/SIGAR/PTQL">PTQL </a>is the process table query language used.<br />
Launch sigar using java -jar sigar.jar and test the ptql in this prompt.</p>
<p>The important thing to know is that arguments to ps command can be seen through pargs &lt;process_id&gt; and then knowing that -D is appended by default when the main class is defined and then the final sigar cmd becomes:</p>
<p>ps  State.Name.sw=java,Args.*.eq=org.jboss.Main,Args.*.re=-Dprogram.name=testJboss.sh</p>
<p>Where the value program.name=testJboss.sh is defined in the customjmx-plugin.xml in the PROC_HOME_PROPERTY value.</p>
<p>Also, recall that if you need to associate your custom Mbean with jboss mbean viewer &#8211; then you need to register your mbean in the jboss specific mbean server whose instances can be found through the following<a href="http://www.jboss.org/community/wiki/FindMBeanServer"> defined ways.</a></p>
<p>Also, to expose the jboss mbeans &#8211; to jconsole &#8211; follow the steps <a href="http://www.jboss.org/community/wiki/JBossMBeansInJConsole">detailed</a> here.</p>
<p>I modified the run.conf with the following java opts.</p>
<p>JAVA_OPTS=&#8221;-Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false  -Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl &#8220;</p>
<p>&nbsp;</p>
<p>To test if your plugin works:</p>
<pre class="brush: java;">
java -jar /home/hyp/hq/agent-4.1.3/bundles/agent-4.1.3-1067/pdk/lib/hq-product.jar -Dplugins.include=customjmx  -m discover -a metric -Dlog=DEBUG
</pre>
<p>It took some time &#8211; to identify this &#8211; mainly because of incomplete(and incorrect!_) documentation which is the evil part of using open source &#8211; the good thing was &#8211; the hyperic forum is definitely alive</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1185&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/09/jboss-jmx-with-hyperic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>Jboss JMX Url</title>
		<link>http://techzen.wordpress.com/2009/11/04/jm/</link>
		<comments>http://techzen.wordpress.com/2009/11/04/jm/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 09:20:46 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1180</guid>
		<description><![CDATA[Hostname: name of machine where jboss is running
portnumber : is the port of jmxremote property and NOT jni and NOT RMI port defined in jboss-service.xml file.
So if you need to connect to jboss mbean through jconsole: add the following the run.conf file JAVA_OPTS
 -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl
And then you can connect either remotely: localhost:12345
OR [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1180&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hostname: name of machine where jboss is running<br />
portnumber : is the port of jmxremote property and NOT jni and NOT RMI port defined in jboss-service.xml file.</p>
<p>So if you need to connect to jboss mbean through jconsole: add the following the run.conf file JAVA_OPTS</p>
<p> -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl</p>
<p>And then you can connect either remotely: localhost:12345</p>
<p>OR </p>
<p>through the JMX service url</p>
<p>service:jmx:rmi:///jndi/rmi://HostName:portnumber/jmxrmi</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1180&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/11/04/jm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
		<item>
		<title>Auth</title>
		<link>http://techzen.wordpress.com/2009/10/29/auth/</link>
		<comments>http://techzen.wordpress.com/2009/10/29/auth/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 10:21:36 +0000</pubDate>
		<dc:creator>techzen</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://techzen.wordpress.com/?p=1175</guid>
		<description><![CDATA[The identities of a user(username, SSN, employeeID, etc.) are stored as java.security.Principal objects in the Subject Principals set. The roles assigned to a user are also stored in the Principals set, but they are stored in named role sets using java.security.acl.Group instances. The Group interface is a subinterface of java.security.Principal. A Group is a collection [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1175&subd=techzen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The identities of a user(username, SSN, employeeID, etc.) are stored as java.security.Principal objects in the Subject Principals set. The roles assigned to a user are also stored in the Principals set, but they are stored in named role sets using java.security.acl.Group instances. The Group interface is a subinterface of java.security.Principal. A Group is a collection of Principals and or Groups. There can be any number of role sets assigned to a Subject. Currently the JBossSX framework uses two well known roles sets named &#8220;Roles&#8221; and &#8220;CallerPrincipal&#8221;. The &#8220;Roles&#8221; set is the set of Principals for the named roles as known in the application domain the Subject has been assigned. This role set is used by methods like the EJBContext.isCallerInRole(String) which is used by EJBs to see if the current caller belongs to the named application domain role. The CallerPrincipal role set consists of the Principal identity assigned to the user in the application domain. It is used by the EJBContext.getCallerPrincipal() method to allow the application domain to map from the operation environment identity to a user identity suitable for the application. If a Subject does not have a CallerPrincipal role set then the application identity is that of the operational environment identity.</p>
<p>extend  UsernamePasswordLoginModule<br />
validatePassword (Authenticates user against LDAP)<br />
getRoleSets (This adds the user role that was found in LDAP and you must hve valid role as well.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techzen.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techzen.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techzen.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techzen.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techzen.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techzen.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techzen.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techzen.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techzen.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techzen.wordpress.com/1175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techzen.wordpress.com&blog=3437533&post=1175&subd=techzen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techzen.wordpress.com/2009/10/29/auth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">techzen</media:title>
		</media:content>
	</item>
	</channel>
</rss>