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

<channel>
	<title>Legolas in Minas Tirith</title>
	<atom:link href="http://www.javalinux.it/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javalinux.it/wordpress</link>
	<description>Alessio &#38; Stefano ideas</description>
	<lastBuildDate>Wed, 14 Sep 2011 14:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>JBUG Milan: first meeting will focus on AS7</title>
		<link>http://www.javalinux.it/wordpress/2011/09/14/jbug-milan-first-meeting-will-focus-on-as7/</link>
		<comments>http://www.javalinux.it/wordpress/2011/09/14/jbug-milan-first-meeting-will-focus-on-as7/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 14:05:11 +0000</pubDate>
		<dc:creator>Stefano MAESTRI</dc:creator>
				<category><![CDATA[AS7]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[jbossfeed]]></category>
		<category><![CDATA[JBUG]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[speech]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=564</guid>
		<description><![CDATA[We (alessio and me) are going to have a speech on AS7 during the first JBUG Milan&#8217;s meeting next 20 Septmber. If you are around Milan join us it will be a lot of fun. For your convenience I have pasted here the full agenda, but don&#8217;t forget to visit the official group and sign [...]]]></description>
			<content:encoded><![CDATA[<p>We (alessio and me) are going to have a speech on AS7 during the first <a href="http://tech.groups.yahoo.com/group/jbug-milano/" target="_blank">JBUG Milan&#8217;s </a>meeting next 20 Septmber.</p>
<p>If you are around Milan join us it will be a lot of fun. For your convenience I have pasted here the full agenda, but don&#8217;t forget to visit the <a href="http://tech.groups.yahoo.com/group/jbug-milano/" target="_blank">official group and sign in for partecipation</a>.</p>
<blockquote><p><span style="background-color: #ffffff;">9.30: Welcome coffee</span><br />
<span style="background-color: #ffffff;"> 9.45: Welcome and first infos about JBUG</span><br />
<span style="background-color: #ffffff;"> 10.15: JBoss AS7</span><br />
<span style="background-color: #ffffff;"> 11.00: Coffee Break</span><br />
<span style="background-color: #ffffff;"> 11.15: JBoss AS7 and webservices</span><br />
<span style="background-color: #ffffff;"> 12.00: JBoss in cloud with OpenShift</span><br />
<span style="background-color: #ffffff;"> 12.45: Closing</span><br />
<span style="background-color: #ffffff;"> 13.00: luch</span><br />
<span style="background-color: #ffffff;"> 14:00: Hacking AS7</span></p></blockquote>
<p>And don&#8217;t miss the hacking party we will have in the afternoon: Alessio and me will be in the public area of <a href="http://www.europe.redhat.com/about/contact/#Italy" target="_blank">Red Hat office</a> working on JBoss AS7, and would be cool to have you hacking with us. Don&#8217;t leave your laptop at home, join the community and send your first patch in that afternoon.</p>
<p>&nbsp;</p>
<p>And now, for our italian reader, for this italian event&#8230;the post in italian language:</p>
<p>Alessio ed io faremo due presentazioni su AS7 durante il primo meeting del <a href="http://tech.groups.yahoo.com/group/jbug-milano/" target="_blank">JBUG di Milano</a> il prossimo 20 Settembre.</p>
<p>Se passte da Milano, non perdetevi l&#8217;evento, ci divertiremo. Per vostra comodità riporto qui l&#8217;agenda definitiva dell&#8217;incontro, ma non scordatevi di fare un giro sul <a href="http://tech.groups.yahoo.com/group/jbug-milano/" target="_blank">gruppo ufficiale del JBUG ed iscrivetevi all&#8217;evento mandando la mail come indicato in uno dei messaggi.</a></p>
<blockquote><p>9.30: Welcome coffee<br />
9.45: Benvenuto e prime informazioni sul JBUG<br />
10.15: JBoss AS7<br />
11.00: Coffee Break<br />
11.15: JBoss AS7 e i webservices<br />
12.00: JBoss in cloud con OpenShift<br />
12.45: Closing<br />
13.00: Pranzo a buffet<br />
14:00: Sviluppo di AS7</p></blockquote>
<p>E mi raccomando, non perdetevi l&#8217;hacking su AS7 nel pomeriggio. Io ed Alessio ci fermeremo in area pubblica dell&#8217;ufficio <a href="http://www.europe.redhat.com/about/contact/#Italy" target="_blank">Red Hat di Milano</a> a lavorare su JBoss AS7. E sarebbe bello sviluppare insieme a voi. Non dimenticatevi il computer , partecipate alla community mandando il pomeriggio stesso la vostra prima patch <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>See you there!</p>
<p>Ci vediamo li!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2011/09/14/jbug-milan-first-meeting-will-focus-on-as7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create and manage datasources in AS7</title>
		<link>http://www.javalinux.it/wordpress/2011/07/14/how-to-create-an-manage-datasources-in-as7/</link>
		<comments>http://www.javalinux.it/wordpress/2011/07/14/how-to-create-an-manage-datasources-in-as7/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 10:19:15 +0000</pubDate>
		<dc:creator>Stefano MAESTRI</dc:creator>
				<category><![CDATA[AS7]]></category>
		<category><![CDATA[ironjacamar]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=516</guid>
		<description><![CDATA[In this post I&#8217;ll try to describe how to add and configure datasources in AS7, and related concepts like add/configure jdbc drivers and test connection of a created datasource. As you probably already know AS7 has been announced by Red Hat officialy here. I&#8217;ll not go in deep details of what is new, cool and [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;ll try to describe how to add and configure datasources in AS7, and related concepts like add/configure jdbc drivers and test connection of a created datasource.</p>
<p>As you probably already know <a href="http://www.jboss.org/as7.html" target="_blank">AS7 has been announced by Red Hat officialy here</a>. I&#8217;ll not go in deep details of what is new, cool and fast in AS7. Just have a look to the announce page to get a bird eye view of all the cool stuffs you can find there.<br />
Before start with main contets about data source I just want to recall you 2 main concept in AS7 we will have to deal with in this article:</p>
<ol>
<li><em>Modular core: JBoss Modules offers true application isolation, hiding server implementation classes and only loads the classes your application needs. Class loading is concurrent for extreme performance. OSGi support is available the moment you install the application server.</em> <strong>We will learn in this article to create a new module for new jdbc drivers, and we compare this approach to hot deployed driver analyzing plus and minus of each.</strong></li>
<li><em>Elegant administration </em><em>Consistent and powerful management is available, ranging from a polished, user-friendly web console to Java and HTTP APIs to a command line tool to direct XML edits. Configuration data is centralized and user-focused. </em><strong>We will learn in this artcile how to add and manage datasources with all three approaches.</strong></li>
<li><em>Domain management </em><em>JBoss AS 7 can be launched in two different modes. Domain mode allows you to run and manage a multi-server topology. Standalone mode runs a single server instance, a convenience choice for development. Many settings, such as port offsets and network interfaces, can be controlled with a single attribute. Rolling deployments are available. </em><strong>In this article we will discuss how to add and manage datasources in both mode, providing sample for both too. </strong>Domain mode is one of the main new concept and coolest feature to learn about AS7. If you want more info read documentation <a href="https://docs.jboss.org/author/display/AS7/Core+management+concepts" target="_blank">about this concepts here.</a><em><strong><br />
</strong></em></li>
</ol>
<p><span id="more-516"></span></p>
<div><span class="Apple-style-span" style="font-size: 20px; font-weight: bold;">1. Add a driver</span></div>
<div>To be able to add a jdbc datasource you have to configure a jdbc driver. As we will see in driver configuration you will need to specify a driver name (a unique symbolic name in the domain) that will be used by JCA susbsytem to estabilish jdbc connections.</div>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">1.1 Hot deploy driver. Limit and advantages.</span></div>
<div>A driver jar can be hot deployed into standalone or domain. This is the most convenient way to add a driver when you are developing, since it require very few or none configuration, but it have some limits:</div>
<div>
<ul>
<li>We are supporting hot deploy only for jdbc 4 compliant driver. The reason for that is because we get from META-INF metadata the Driver class name. This is cool because it permits zero configuration, but this metadata are standardized only in jdbc 4 specs.</li>
<li>We are not supporting XADataSourceClass at driver level. As you can see from the xsd, we are supporting DriverClass and XADataSourceClass elements both into driver and data-source/xa-data-source elements. Of course one defined into driver element is general and permit you to define just one time. Since there is no spec support for XADataSourceClass metadata in META-INF we can&#8217;t get it during deployment, and you will have to specify it for each xa-datasource you are going to create.</li>
<li>You can hot deploy only drivers with a single jar. For example if you have to work with Oracle optional orai18n.jar for additional charset support you would need a module based driver.</li>
</ul>
<div>Note: in this case the unique symbolic name associated to the driver will be the name of the jar you are using. In my examples it will be mysql-connector-java-5.1.15.jar</div>
</div>
<div>If you are fine with these limit can be convenient to use an hot deployed driver. But how to deploy it?</div>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">1.1.1 Hot deploy copying jar (in standalone mode, not suggested in domain mode)</span></div>
<p>The easiest way to hot deploy a driver in standalone mode is to copy the jar into the $JBOSS_HOME/standalone/deployments (don&#8217;t forget to read the README.located there!). If you are copying a jdbc 4 compliant driver you will get a message like this into console where you have started the standalone server:</p>
<pre style="padding-left: 30px;">12:59:17,663 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "mysql-connector-java-5.1.15.jar"
12:59:18,191 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
12:59:18,291 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "mysql-connector-java-5.1.15.jar"</pre>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">1.1.2 Deploy a driver using jboss-admin.sh command line tool</span></div>
<p><strong>Standalone:</strong> Start the server in standalone mode, open another console, launch the jboss-admin.sh tool. Run these commands:</p>
<pre style="padding-left: 30px;">[standalone@localhost:9999 /] connect
Closed connection to localhost:9999
Connected to standalone controller at localhost:9999
[standalone@localhost:9999 /] deploy /dati/drivers/mysql-connector-java-5.1.15.jar
'mysql-connector-java-5.1.15.jar' deployed successfully.</pre>
<p>You will get an output to server running console identical to one pasted in section 1.1.1.</p>
<p><strong>Domain</strong>: Start the server in domain mode, pen another console, launch the jboss-admin.sh tool. Run these commands:</p>
<pre style="padding-left: 30px;">[standalone@localhost:9999 /] connect
Closed connection to localhost:9999
Connected to domain controller at localhost:9999
[domain@localhost:9999 /] deploy --all-server-groups /dati/drivers/mysql-connector-java-5.1.15.jar
'mysql-connector-java-5.1.15.jar' deployed successfully.</pre>
<p>You will get this output to server running console:</p>
<pre style="padding-left: 30px;">[Server:server-one] 13:07:51,933 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "mysql-connector-java-5.1.15.jar"
[Server:server-two] 13:07:51,934 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting deployment of "mysql-connector-java-5.1.15.jar"
[Server:server-two] 13:07:52,344 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
[Server:server-one] 13:07:52,355 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
[Server:server-two] 13:07:52,441 INFO  [org.jboss.as.server.controller] (pool-1-thread-1) Deployed "mysql-connector-java-5.1.15.jar"
[Server:server-one] 13:07:52,441 INFO  [org.jboss.as.server.controller] (pool-1-thread-1) Deployed "mysql-connector-java-5.1.15.jar"</pre>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">1.1.3 Deploy a driver using web console</span></div>
<p><strong>Standalone</strong>: Start the server in standalone mode. Open your browser at address <a href="http://localhost:9990/console/">http://localhost:9990/console/</a> and follow this steps.</p>
<p><iframe src="http://www.youtube.com/embed/O_C6Y7pQ7go?hl=en&amp;fs=1" frameborder="0" width="425" height="349"></iframe></p>
<p><strong>Domain</strong>: Start the server in domain mode. Open your browser at address <a href="http://localhost:9990/console/">http://localhost:9990/console/</a></p>
<p><iframe src="http://www.youtube.com/embed/7GY_bY0MJ9w" frameborder="0" width="560" height="349"></iframe></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;">Using the web console, don&#8217;t forget to enable the driver, because as you can see from the screen cast you will not get driver deployed and available until it is excplicit enabled.</span></p>
<p>&nbsp;</p>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">1.2 Module drivers. How to create it and why use it.</span></div>
<p>There is another way to set up a driver in AS7: create a module providing classes needed and define the driver at domain level. Doing that you have several advantage in a domain based production environment perspective. You are going to define a driver in a unique place, without limits mentioned in 1.1. It is not so practical only if you are developing and you need to deploy/undeploy drivers for you tests and/or if you are building yourself AS7 from source and you are used to rebuild it quite frequently.</p>
<p>But it&#8217;s very good for a production environment, having drivers present in domain controller runtime state, and also in domain.xml. It is in my humble opinion more clear and easy to maintain for an administrator who will probably try to focus on the domain and server groups and not on single servers.</p>
<p>But how to create a ne module and use it as driver? With 4 simple steps</p>
<ol>
<li>Create the directory structure for the module. For example to create a module for mysql driver:
<pre>cd $JBOSS_HOME
mkdir modules/com/mysql
mkdir modules/com/mysql/jdbc
mkdir modules/com/mysql/jdbc/main</pre>
</li>
<li>Copy the driver(s) jar into the created directory</li>
<li>Create a module.xml file to define dependencies and resources. For our mysql example it looks like that:
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;module xmlns="urn:jboss:module:1.0" name="com.mysql.jdbc"&gt;
  &lt;resources&gt;
    &lt;resource-root path="mysql-connector-java-5.1.15.jar"/&gt;
        &lt;!-- Insert resources here --&gt;
  &lt;/resources&gt;
  &lt;dependencies&gt;
    &lt;module name="javax.api"/&gt;
    &lt;module name="javax.transaction.api"/&gt;
  &lt;/dependencies&gt;
&lt;/module&gt;</pre>
</li>
<li> Add driver to the domain/standalone. You have 2 option here:</li>
<ol>
<li>Edit standalone.xml/domain.xml adding a driver element into datasources subsystem
<pre>[...]
&lt;subsystem xmlns="urn:jboss:domain:datasources:1.0"&gt;</pre>
<pre>            &lt;datasources&gt;
                &lt;datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS"&gt;
                    &lt;connection-url&gt;jdbc:h2:mem:test;DB_CLOSE_DELAY=-1&lt;/connection-url&gt;
                    &lt;driver&gt;h2&lt;/driver&gt;
                    &lt;pool&gt;&lt;/pool&gt;
                    &lt;security&gt;
                        &lt;user-name&gt;sa&lt;/user-name&gt;
                        &lt;password&gt;sa&lt;/password&gt;
                    &lt;/security&gt;
                    &lt;validation&gt;&lt;/validation&gt;
                    &lt;timeout&gt;&lt;/timeout&gt;
                    &lt;statement&gt;&lt;/statement&gt;
                &lt;/datasource&gt;
                &lt;drivers&gt;
                    &lt;driver name="h2" module="com.h2database.h2"&gt;
                        &lt;xa-datasource-class&gt;org.h2.jdbcx.JdbcDataSource&lt;/xa-datasource-class&gt;
                    &lt;/driver&gt;
                    <strong>&lt;driver name="mysql" module="com.mysql.jdbc"&gt; &lt;xa-datasource-class&gt;com.mysql.jdbc.jdbc2.optional.MysqlXADataSource&lt;/xa-datasource-class&gt; &lt;/driver&gt;</strong>
                &lt;/drivers&gt;
            &lt;/datasources&gt;
        &lt;/subsystem&gt;</pre>
<pre>[...]</pre>
</li>
<li> Add it using jboss-admin.sh command line interface
<pre>/subsystem=datasources/jdbc-driver=mysql:add(driver-name="mysql",driver-module-name="com.mysql.jdbc",driver-xa-datasource-class-name="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource")</pre>
</li>
</ol>
</ol>
<p>Then you can use the driver to configure a new datasource. Note that you can specify also xa-datasource-class, and it will be used in every xa-datasource you will configure to use this driver. As said in case you are using deployed driver it&#8217;s not possible at the moment and you have to configure this class name for each xa-datasource.</p>
<p><strong>Note that if you are creating a module using a non jdbc4 compliant driver you HAVE TO SPECIFY also driver class using &lt;driver-class&gt; tag into &lt;driver&gt; of standalone/domain xml. As said in 1.1 this is the only way to use a non jdbc4 compliant driver.</strong></p>
<p><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">1.3 installed-driver-list operation. Use and caveats</span></p>
<p>As said you the driver-name property is important to refer a driver during a datasource configuration. It&#8217;s so important to know which drivers are configured and available in a server/domain. To achieve this we are providina specific operation callable from jboss-admin.sh command line interface and used under the wood by web console during datasource configuration. Here you have an example of this call for a server with just h2 driver configured:</p>
<pre>[standalone@localhost:9999 /] /subsystem=datasources:installed-drivers-list
{
    "outcome" =&gt; "success",
    "result" =&gt; [{
        "driver-name" =&gt; "h2",
        "deployment-name" =&gt; undefined,
        "driver-module-name" =&gt; "com.h2database.h2",
        "module-slot" =&gt; "main",
        "driver-xa-datasource-class-name" =&gt; "org.h2.jdbcx.JdbcDataSource",
        "driver-class-name" =&gt; "org.h2.Driver",
        "driver-major-version" =&gt; 1,
        "driver-minor-version" =&gt; 2,
        "jdbc-compliant" =&gt; true
    }]
}</pre>
<p>There is a caveat in domain mode, since installed drivers  are read from runtime state in a server; state which does not exist on the domain controller. It depends on runtime state in a server because if a driver is in a deployment we have no idea until it is deployed; i.e. until it goes through the deployers which only exist on the server. IOW you will find into the profile only drivers defined in modules, while deployed drivers are present only at local server level. An example should be more clear than any description:</p>
<pre>[domain@localhost:9999 /] /profile=default/subsystem=datasources:installed-drivers-list
{
    "outcome" =&gt; "success",
    "result" =&gt; "no metrics available"
}
[domain@localhost:9999 /] /host=local/server=server-one/subsystem=datasources:installed-drivers-list
{
    "outcome" =&gt; "success",
    "result" =&gt; [{
        "driver-name" =&gt; "h2",
        "deployment-name" =&gt; undefined,
        "driver-module-name" =&gt; "com.h2database.h2",
        "module-slot" =&gt; "main",
        "driver-xa-datasource-class-name" =&gt; "org.h2.jdbcx.JdbcDataSource",
        "driver-class-name" =&gt; "org.h2.Driver",
        "driver-major-version" =&gt; 1,
        "driver-minor-version" =&gt; 2,
        "jdbc-compliant" =&gt; true
    }]
}</pre>
<p><span class="Apple-style-span" style="font-size: 20px; font-weight: bold;">2. Add a local datasource</span></p>
<p>Now that we have learned how to add a new driver we can add a new datasource. Also in this case we have 3 different way to add it: editing xml, using command line interface, or using web console. These examples will be just for standalone mode, to don&#8217;t be too much verbose, leaving domain mode as exercise for readers and get feedbacks from them.</p>
<p>In all cases we are going to create a Mysql datasource using a driver created as module.</p>
<p><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">2.1. Adding a datasource in configuartion xml (standalone.xml)</span></p>
<pre>               &lt;datasource jndi-name="java:jboss/datasources/MySqlDS" enabled="true" use-java-context="true" pool-name="MySqlDS"&gt;
                    &lt;connection-url&gt;jdbc:mysql://localhost:3306/test&lt;/connection-url&gt;
                    &lt;driver&gt;mysql&lt;/driver&gt;
                    &lt;pool&gt;&lt;/pool&gt;
                    &lt;security&gt;
                        &lt;user-name&gt;root&lt;/user-name&gt;
                        &lt;password&gt;&lt;/password&gt;
                    &lt;/security&gt;
                    &lt;validation&gt;&lt;/validation&gt;
                    &lt;timeout&gt;&lt;/timeout&gt;
                    &lt;statement&gt;&lt;/statement&gt;
                &lt;/datasource&gt;</pre>
<p>&nbsp;</p>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">2.2. A<span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">dding a datasource using jboss-admin.sh command line interface</span></span></div>
<pre>/subsystem=datasources/data-source="java:jboss/datasources/MySqlDS2":add(jndi-name="java:jboss/datasources/MySqlDS2",pool-name="MySqlPool",driver-name="mysql",connection-url="jdbc:mysql://localhost:3306/test",user-name="root")</pre>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;"><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">2.3. Adding a datasource using web console</span></span></div>
<p><iframe src="http://www.youtube.com/embed/zz88A3cwrE4?hl=en&amp;fs=1" frameborder="0" width="425" height="349"></iframe></p>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;"><span class="Apple-style-span" style="font-size: 20px; font-weight: bold;">3. Add an xa datasource</span></span></div>
<p>Here you have example of the 3 way to create an xa-datasource in AS7 in domain mode. Don&#8217;t&#8217; forget that we are using a driver created as module and so the xa-datasource-class is defined at driver level. As said in 1.1 if you are using an hot deployed driver don&#8217;t forget to set this class name for each xa-datasource you are going to create.</p>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">3.1. Adding an  xa-datasource in configuartion xml (standalone.xml)</span></div>
<pre>               &lt;xa-datasource jndi-name="java:jboss/datasources/MySqlXADS" enabled="true" use-java-context="true" pool-name="MySqlXADS"&gt;
			    &lt;xa-datasource-property name="ServerName"&gt;localhost&lt;/xa-datasource-property&gt;
			    &lt;xa-datasource-property name="DatabaseName"&gt;test&lt;/xa-datasource-property&gt;
			    &lt;xa-datasource-property name="User"&gt;root&lt;/xa-datasource-property&gt;
			    &lt;xa-datasource-property name="Password"&gt;&lt;/xa-datasource-property&gt;
			    &lt;driver&gt;
				mysql
			    &lt;/driver&gt;
                &lt;/xa-datasource&gt;</pre>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">3.2. Adding an xa-datasource using jboss-admin.sh command line interface</span></div>
<pre>/subsystem=datasources/xa-data-source="java:jboss/datasources/MySqlXADS2":add(jndi-name="java:jboss/datasources/MySqlXADS2",pool-name="MySQLXA_Pool2",enabled=true,xa-data-source-properties = {"ServerName"=&gt;"localhost","DatabaseName"=&gt;"test","User"=&gt;"root"},driver-name="mysql")</pre>
<div><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">3.3. Adding an xa-datasource using web console</span></div>
<p><iframe src="http://www.youtube.com/embed/9MZ-HHXmF30?hl=en&amp;fs=1" frameborder="0" width="425" height="349"></iframe></p>
<p><span class="Apple-style-span" style="font-size: 20px; font-weight: bold;">4. How to test a datasource is correctly working without writing code</span></p>
<p>We provide an operation to test a datasource is able to open a connection to the declared database. You can use it from command line console jboss-admin.sh. It&#8217;s very easy to call:</p>
<pre>/subsystem=datasources/xa-data-source=java\:jboss\/datasources\/MySqlXADS2:test-connection-in-pool</pre>
<p>Positive answer:</p>
<pre>{
    "outcome" =&gt; "success",
    "result" =&gt; [true]
}</pre>
<p>Negative answer:</p>
<pre>{
    "outcome" =&gt; "failed",
    "failure-description" =&gt; "failed to invoke operation: Connection is not valid",
    "rolled-back" =&gt; true
}</pre>
<p><span class="Apple-style-span" style="font-size: 20px; font-weight: bold;">5. Jndi Name<br />
</span></p>
<p>Please note that in current implementation the only valid jndi name for datasources have to start with java:/ or java:jboss/</p>
<p><span class="Apple-style-span" style="font-size: 20px; font-weight: bold;">6. Conclusion</span></p>
<p>Play with it, try something different, ask question and report bugs on <a href="http://community.jboss.org/en/jbossas/as7_users?view=discussions" target="_blank">AS7 user forum</a> or (for more internal things) on <a href="http://community.jboss.org/en/ironjacamar?view=all" target="_blank">IronJacamr User forum</a>.</p>
<p>I&#8217;ll try to answer questions and collect the frequently asked ones in another post here.</p>
<p>Have fun and contribute to <a href="http://www.jboss.org/as7.html" target="_blank">AS7</a> and <a href="http://www.jboss.org/ironjacamar" target="_blank">IronJacamar</a></p>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2011/07/14/how-to-create-an-manage-datasources-in-as7/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Chasing reason for a deadlock in JDK</title>
		<link>http://www.javalinux.it/wordpress/2011/07/11/chasing-reason-for-a-deadlock-in-jdk/</link>
		<comments>http://www.javalinux.it/wordpress/2011/07/11/chasing-reason-for-a-deadlock-in-jdk/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 11:04:20 +0000</pubDate>
		<dc:creator>Alessio SOLDANO</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=505</guid>
		<description><![CDATA[Last week I spent a couple of days on a strange deadlock issue revealed during JBossWS testsuite runs on my Husdon QA environment. This kind of issues usually pops up through a test / section of the software that simply hangs without no evident reason. You don&#8217;t get continuous integration results for a day or [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I spent a couple of days on a strange deadlock issue revealed during JBossWS testsuite runs on my Husdon QA environment.</p>
<p>This kind of issues usually pops up through a test / section of the software that simply hangs without no evident reason. You don&#8217;t get continuous integration results for a day or such, then wonder what&#8217;s happening, go and check Hudson and start thinking and asking yourself what might have gone bad. In my case it was really &#8220;asking yourself&#8221; as of course this happened exactly when I was back from a vacation week and my colleagues that were working on the project were not online <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   (to be honest at the end it turned out not to be their fault at all)</p>
<p>OK, so you start by getting a thread dump to confirm you&#8217;re seeing a deadlock; that&#8217;s a simple &#8220;kill -3 pid&#8221; when running on Linux. Here is mine:</p>
<pre>[junit] Found one Java-level deadlock:
[junit] =============================
[junit] "pool-1-thread-1":
[junit]   waiting to lock monitor 0x000000005d2c60c0 (object 0x00002aaadfb10fd8,
                                          a sun.net.www.protocol.file.Handler),
[junit]   which is held by "main"
[junit] "main":
[junit]   waiting to lock monitor 0x000000005cb02a58 (object 0x00002aaadfb10e38,
                                          a sun.misc.Launcher$AppClassLoader),
[junit]   which is held by "pool-1-thread-1"
[junit]
[junit] Java stack information for the threads listed above:
[junit] ===================================================
[junit] "pool-1-thread-1":
[junit] 	at java.net.URLStreamHandler.getHostAddress(URLStreamHandler.java:412)
[junit] 	- waiting to lock &lt;0x00002aaadfb10fd8&gt; (a sun.net.www.protocol.file.Handler)
[junit] 	at java.net.URLStreamHandler.hostsEqual(URLStreamHandler.java:439)
[junit] 	at sun.net.www.protocol.file.Handler.hostsEqual(Handler.java:117)
[junit] 	at java.net.URLStreamHandler.sameFile(URLStreamHandler.java:396)
[junit] 	at java.net.URLStreamHandler.equals(URLStreamHandler.java:316)
[junit] 	at java.net.URL.equals(URL.java:842)
[junit] 	at java.security.CodeSource.equals(CodeSource.java:135)
[junit] 	at java.util.HashMap.get(HashMap.java:305)
[junit] 	at java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:233)
[junit] 	- locked &lt;0x00002aaadfb11120&gt; (a java.util.HashMap)
[junit] 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
[junit] 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
[junit] 	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
[junit] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
[junit] 	at java.security.AccessController.doPrivileged(Native Method)
[junit] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[junit] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[junit] 	- locked &lt;0x00002aaadfb10e38&gt; (a sun.misc.Launcher$AppClassLoader)
[junit] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[junit] 	- locked &lt;0x00002aaadfb10e38&gt; (a sun.misc.Launcher$AppClassLoader)
[junit] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[junit] 	at org.xnio.nio.AbstractNioChannelThread.cancelKey(AbstractNioChannelThread.java:298)
[junit] 	at org.xnio.nio.NioHandle.cancelKey(NioHandle.java:56)
[junit] 	at org.xnio.nio.AbstractNioStreamChannel.cancelWriteKey(AbstractNioStreamChannel.java:241)
[junit] 	at org.xnio.nio.NioTcpChannel.shutdownWrites(NioTcpChannel.java:164)
[junit] 	at org.xnio.channels.TranslatingSuspendableChannel.shutdownWrites(TranslatingSuspendableChannel.java:358)
[junit] 	at org.xnio.channels.FramedMessageChannel.shutdownWrites(FramedMessageChannel.java:255)
[junit] 	- locked &lt;0x00002aaadfb11978&gt; (a org.xnio.ByteBufferSlicePool$PooledByteBuffer)
[junit] 	at org.jboss.remoting3.remote.RemoteConnection$RemoteWriteListener.send(RemoteConnection.java:267)
[junit] 	- locked &lt;0x00002aaadfb119a0&gt; (a org.jboss.remoting3.remote.RemoteConnection)
[junit] 	at org.jboss.remoting3.remote.RemoteConnection.sendCloseRequest(RemoteConnection.java:164)
[junit] 	at org.jboss.remoting3.remote.RemoteConnection.handleOutboundCloseRequest(RemoteConnection.java:149)
[junit] 	at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAction(RemoteConnectionHandler.java:173)
[junit] 	at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:354)
[junit] 	at org.jboss.remoting3.ConnectionImpl.closeAction(ConnectionImpl.java:48)
[junit] 	at org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:149)
[junit] 	at org.xnio.IoUtils.safeClose(IoUtils.java:134)
[junit] 	at org.jboss.as.protocol.ProtocolChannelClient.close(ProtocolChannelClient.java:176)
[junit] 	at org.xnio.IoUtils.safeClose(IoUtils.java:134)
[junit] 	at org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy$Establishing.requestDone(ManagementClientChannelStrategy.java:138)
[junit] 	at org.jboss.as.protocol.mgmt.ManagementRequest$DelegatingResponseHandler.readResponse(ManagementRequest.java:178)
[junit] 	at org.jboss.as.protocol.mgmt.ManagementChannel$ResponseReceiver.handleResponse(ManagementChannel.java:375)
[junit] 	at org.jboss.as.protocol.mgmt.ManagementChannel$ResponseReceiver.access$400(ManagementChannel.java:357)
[junit] 	at org.jboss.as.protocol.mgmt.ManagementChannel.doHandle(ManagementChannel.java:120)
[junit] 	at org.jboss.as.protocol.ProtocolChannel.handleMessage(ProtocolChannel.java:158)
[junit] 	at org.jboss.remoting3.remote.RemoteConnectionChannel$4.run(RemoteConnectionChannel.java:224)
[junit] 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[junit] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[junit] 	at java.lang.Thread.run(Thread.java:619)
[junit] "main":
[junit] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
[junit] 	- waiting to lock &lt;0x00002aaadfb10e38&gt; (a sun.misc.Launcher$AppClassLoader)
[junit] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[junit] 	at java.net.URL.getURLStreamHandler(URL.java:1144)
[junit] 	at java.net.URL.&lt;init&gt;(URL.java:393)
[junit] 	at java.net.URL.&lt;init&gt;(URL.java:283)
[junit] 	at java.net.URL.&lt;init&gt;(URL.java:306)
[junit] 	at sun.net.www.protocol.file.Handler.openConnection(Handler.java:74)
[junit] 	- locked &lt;0x00002aaadfb10fd8&gt; (a sun.net.www.protocol.file.Handler)
[junit] 	at sun.net.www.protocol.file.Handler.openConnection(Handler.java:55)
[junit] 	- locked &lt;0x00002aaadfb10fd8&gt; (a sun.net.www.protocol.file.Handler)
[junit] 	at java.net.URL.openConnection(URL.java:945)
[junit] 	at sun.net.www.protocol.jar.JarURLConnection.&lt;init&gt;(JarURLConnection.java:66)
[junit] 	at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:24)
[junit] 	at java.net.URL.openConnection(URL.java:945)
[junit] 	at org.apache.cxf.common.logging.JDKBugHacks.doHacks(JDKBugHacks.java:67)
[junit] 	at org.apache.cxf.common.logging.LogUtils.&lt;clinit&gt;(LogUtils.java:66)
[junit] 	at org.apache.cxf.jaxws.spi.ProviderImpl.&lt;clinit&gt;(ProviderImpl.java:61)
[junit] 	at java.lang.Class.forName0(Native Method)
[junit] 	at java.lang.Class.forName(Class.java:247)
[junit] 	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
[junit] 	at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
[junit] 	at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146)
[junit] 	at javax.xml.ws.spi.Provider.provider(Provider.java:106)
[junit] 	at javax.xml.ws.Service.&lt;init&gt;(Service.java:57)
[junit] 	at javax.xml.ws.Service.create(Service.java:687)
[junit] 	at org.jboss.test.ws.jaxws.samples.exception.ExceptionEJB3Helper.getProxy(ExceptionEJB3Helper.java:48)
[junit] 	at org.jboss.test.ws.jaxws.samples.exception.ExceptionHelper.testRuntimeException(ExceptionHelper.java:81)
[junit] 	at org.jboss.test.ws.jaxws.samples.exception.ExceptionTestCase.testRuntimeException(ExceptionTestCase.java:45)
[junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] 	at java.lang.reflect.Method.invoke(Method.java:597)
[junit] 	at junit.framework.TestCase.runTest(TestCase.java:154)
[junit] 	at junit.framework.TestCase.runBare(TestCase.java:127)
[junit] 	at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] 	at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] 	at junit.framework.TestResult.run(TestResult.java:109)
[junit] 	at junit.framework.TestCase.run(TestCase.java:118)
[junit] 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] 	at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
[junit] 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
[junit] 	at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] 	at junit.extensions.TestSetup.run(TestSetup.java:23)
[junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
[junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
[junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
[junit]
[junit] Found 1 deadlock.
</pre>
<p>Confirmed, it was really a deadlock. Not a straightforward one to solve, at least to me, given the blocking part were a bit deep into the JDK (1.6) sources.</p>
<p>A bit of background on what&#8217;s been developed here and which are the game &#8220;players&#8221;: <a href="http://www.jboss.org/jbossws">JBossWS</a> provides and integration layer for running <a href="http://cxf.apache.org/">Apache CXF</a> on top of JBoss Application Server. The testcase being executed above (in thread &#8220;main&#8221;) is a simple standard JAX-WS client application that creates a<em> java.xml.ws.Service</em> instance for consuming an endpoint that&#8217;s deployed on JBoss AS. The &#8220;pool-1-thread-1&#8243; thread should instead be spawned by the remote deployment request that&#8217;s issued by the testsuite to deploy a WS endpoint jar archive on JBoss AS before actually running the client test.</p>
<p>The problem was not easily and consistently reproducible locally, so I used a debugger to force the &#8220;evil&#8221; timing that causes the deadlock: you set a breakpoint on the code executed by both threads above, before each of them goes through one of the &#8220;- locked &lt;&#8230;&gt;&#8221; points. Then have each of them acquire the first lock and you&#8217;re done, sure deadlock when each thread later wants the other lock.</p>
<p>So, carefully analysing the problem I understood what was really happening. The deadlock above is between the system classloader and <em>sun.net.www.protocol.file.Handler</em>, due to their <strong>synchronized</strong> <em>Classloader::loadClass()</em> and <em>Handler::openConnection()/Handler::getHostAddress()</em> methods. During initialization, Apache CXF performs some hacks, including disabling url caching; to achieve that, it opens a new connection as <a href="http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#setDefaultUseCaches%28boolean%29">JDK does not have a static method for setting that</a>, despite the <a href="http://www.docjar.com/html/api/java/net/URLConnection.java.html">flag being actually static</a>. The process of opening a connection goes through the Handler&#8217;s synchronized openConnection() method and in there ends up needing the system classloader for loading a class. Unfortunately, the lock on the system classloader might be taken by another thread invoking the synchronized loadClass() on it and also needing to use the CodeSource for locating the class to be loaded. That eventually ends up in needing the <em>URLStreamHandler</em> / <em>Handler</em> for comparing URL instances.</p>
<p><em>URLStreamHandler</em>? For those not having experience here, Java comes with a <a href="http://java.sun.com/developer/onlineTraining/protocolhandlers/">configurable architecture</a> for resolving URLs. Simplifying things a lot, the URLStreamHandler is created using the specified URLStreamHandlerFactory, which can be configured setting the java.protocol.handler.pkgs system property. Why is this relevant here? Basically because JBoss needs and uses this mechanism for installing his own handler to <a href="http://java.dzone.com/news/jboss-virtual-file-system">deal with <em>vfs</em> URLs</a>. Looking at the code for the configured factory, the returned handler is basically a singleton. Hence the deadlock, regardless of the <em>vfs-aware</em> handler not being needed here.</p>
<p>How to solve the issue? While it might be arguable whether having singleton protocol handler is a good choice or not, I couldn&#8217;t change that quickly and easily, as it was &#8220;out of my area of action&#8221;. I ended up <a href="https://issues.apache.org/jira/browse/CXF-3634">changing the Apache CXF code</a> after having had a chat with Dan Kulp (CXF project lead): instead of actually opening a connection to get an handle to a URLConnection instance for the sake of disabling URL caching, we now simply create a concrete extension of the abstract URLConnection that is only used for setting the static member through its <em>setDefaultUseCaches()</em> non-static method.</p>
<p>The fix is effective for the specific issue I had and in general for reducing the chances of running into deadlock because of Apache CXF. However, few considerations / caveats are still valid:</p>
<ul>
<li>be careful when designing and providing your own protocol handlers, as that can have really unexpected side effects</li>
<li>opening a connection can be time consuming even before URLConnection::connect() due to all the locking that&#8217;s required in there; obviously another reason for checking twice if you really need opening a connection before actually doing that</li>
<li>is JDK really well designed here? (non-static URLConnection.setDefaultUseCaches(..))</li>
</ul>
<p>It&#8217;s been a nice debugging in any case <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 22px; width: 1px; height: 1px; overflow: hidden;">
<pre>[junit] Found one Java-level deadlock:
    [junit] =============================
    [junit] "pool-1-thread-1":
    [junit]   waiting to lock monitor 0x000000005d2c60c0 (object 0x00002aaadfb10fd8, a sun.net.www.protocol.file.Handler),
    [junit]   which is held by "main"
    [junit] "main":
    [junit]   waiting to lock monitor 0x000000005cb02a58 (object 0x00002aaadfb10e38, a sun.misc.Launcher$AppClassLoader),
    [junit]   which is held by "pool-1-thread-1"
    [junit]
    [junit] Java stack information for the threads listed above:
    [junit] ===================================================
    [junit] "pool-1-thread-1":
    [junit] 	at java.net.URLStreamHandler.getHostAddress(URLStreamHandler.java:412)
    [junit] 	- waiting to lock &lt;0x00002aaadfb10fd8&gt; (a sun.net.www.protocol.file.Handler)
    [junit] 	at java.net.URLStreamHandler.hostsEqual(URLStreamHandler.java:439)
    [junit] 	at sun.net.www.protocol.file.Handler.hostsEqual(Handler.java:117)
    [junit] 	at java.net.URLStreamHandler.sameFile(URLStreamHandler.java:396)
    [junit] 	at java.net.URLStreamHandler.equals(URLStreamHandler.java:316)
    [junit] 	at java.net.URL.equals(URL.java:842)
    [junit] 	at java.security.CodeSource.equals(CodeSource.java:135)
    [junit] 	at java.util.HashMap.get(HashMap.java:305)
    [junit] 	at java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:233)
    [junit] 	- locked &lt;0x00002aaadfb11120&gt; (a java.util.HashMap)
    [junit] 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    [junit] 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    [junit] 	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    [junit] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    [junit] 	at java.security.AccessController.doPrivileged(Native Method)
    [junit] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    [junit] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    [junit] 	- locked &lt;0x00002aaadfb10e38&gt; (a sun.misc.Launcher$AppClassLoader)
    [junit] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    [junit] 	- locked &lt;0x00002aaadfb10e38&gt; (a sun.misc.Launcher$AppClassLoader)
    [junit] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    [junit] 	at org.xnio.nio.AbstractNioChannelThread.cancelKey(AbstractNioChannelThread.java:298)
    [junit] 	at org.xnio.nio.NioHandle.cancelKey(NioHandle.java:56)
    [junit] 	at org.xnio.nio.AbstractNioStreamChannel.cancelWriteKey(AbstractNioStreamChannel.java:241)
    [junit] 	at org.xnio.nio.NioTcpChannel.shutdownWrites(NioTcpChannel.java:164)
    [junit] 	at org.xnio.channels.TranslatingSuspendableChannel.shutdownWrites(TranslatingSuspendableChannel.java:358)
    [junit] 	at org.xnio.channels.FramedMessageChannel.shutdownWrites(FramedMessageChannel.java:255)
    [junit] 	- locked &lt;0x00002aaadfb11978&gt; (a org.xnio.ByteBufferSlicePool$PooledByteBuffer)
    [junit] 	at org.jboss.remoting3.remote.RemoteConnection$RemoteWriteListener.send(RemoteConnection.java:267)
    [junit] 	- locked &lt;0x00002aaadfb119a0&gt; (a org.jboss.remoting3.remote.RemoteConnection)
    [junit] 	at org.jboss.remoting3.remote.RemoteConnection.sendCloseRequest(RemoteConnection.java:164)
    [junit] 	at org.jboss.remoting3.remote.RemoteConnection.handleOutboundCloseRequest(RemoteConnection.java:149)
    [junit] 	at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAction(RemoteConnectionHandler.java:173)
    [junit] 	at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:354)
    [junit] 	at org.jboss.remoting3.ConnectionImpl.closeAction(ConnectionImpl.java:48)
    [junit] 	at org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:149)
    [junit] 	at org.xnio.IoUtils.safeClose(IoUtils.java:134)
    [junit] 	at org.jboss.as.protocol.ProtocolChannelClient.close(ProtocolChannelClient.java:176)
    [junit] 	at org.xnio.IoUtils.safeClose(IoUtils.java:134)
    [junit] 	at org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy$Establishing.requestDone(ManagementClientChannelStrategy.java:138)
    [junit] 	at org.jboss.as.protocol.mgmt.ManagementRequest$DelegatingResponseHandler.readResponse(ManagementRequest.java:178)
    [junit] 	at org.jboss.as.protocol.mgmt.ManagementChannel$ResponseReceiver.handleResponse(ManagementChannel.java:375)
    [junit] 	at org.jboss.as.protocol.mgmt.ManagementChannel$ResponseReceiver.access$400(ManagementChannel.java:357)
    [junit] 	at org.jboss.as.protocol.mgmt.ManagementChannel.doHandle(ManagementChannel.java:120)
    [junit] 	at org.jboss.as.protocol.ProtocolChannel.handleMessage(ProtocolChannel.java:158)
    [junit] 	at org.jboss.remoting3.remote.RemoteConnectionChannel$4.run(RemoteConnectionChannel.java:224)
    [junit] 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    [junit] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    [junit] 	at java.lang.Thread.run(Thread.java:619)
    [junit] "main":
    [junit] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
    [junit] 	- waiting to lock &lt;0x00002aaadfb10e38&gt; (a sun.misc.Launcher$AppClassLoader)
    [junit] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    [junit] 	at java.net.URL.getURLStreamHandler(URL.java:1144)
    [junit] 	at java.net.URL.&lt;init&gt;(URL.java:393)
    [junit] 	at java.net.URL.&lt;init&gt;(URL.java:283)
    [junit] 	at java.net.URL.&lt;init&gt;(URL.java:306)
    [junit] 	at sun.net.www.protocol.file.Handler.openConnection(Handler.java:74)
    [junit] 	- locked &lt;0x00002aaadfb10fd8&gt; (a sun.net.www.protocol.file.Handler)
    [junit] 	at sun.net.www.protocol.file.Handler.openConnection(Handler.java:55)
    [junit] 	- locked &lt;0x00002aaadfb10fd8&gt; (a sun.net.www.protocol.file.Handler)
    [junit] 	at java.net.URL.openConnection(URL.java:945)
    [junit] 	at sun.net.www.protocol.jar.JarURLConnection.&lt;init&gt;(JarURLConnection.java:66)
    [junit] 	at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:24)
    [junit] 	at java.net.URL.openConnection(URL.java:945)
    [junit] 	at org.apache.cxf.common.logging.JDKBugHacks.doHacks(JDKBugHacks.java:67)
    [junit] 	at org.apache.cxf.common.logging.LogUtils.&lt;clinit&gt;(LogUtils.java:66)
    [junit] 	at org.apache.cxf.jaxws.spi.ProviderImpl.&lt;clinit&gt;(ProviderImpl.java:61)
    [junit] 	at java.lang.Class.forName0(Native Method)
    [junit] 	at java.lang.Class.forName(Class.java:247)
    [junit] 	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
    [junit] 	at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
    [junit] 	at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146)
    [junit] 	at javax.xml.ws.spi.Provider.provider(Provider.java:106)
    [junit] 	at javax.xml.ws.Service.&lt;init&gt;(Service.java:57)
    [junit] 	at javax.xml.ws.Service.create(Service.java:687)
    [junit] 	at org.jboss.test.ws.jaxws.samples.exception.ExceptionEJB3Helper.getProxy(ExceptionEJB3Helper.java:48)
    [junit] 	at org.jboss.test.ws.jaxws.samples.exception.ExceptionHelper.testRuntimeException(ExceptionHelper.java:81)
    [junit] 	at org.jboss.test.ws.jaxws.samples.exception.ExceptionTestCase.testRuntimeException(ExceptionTestCase.java:45)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [junit] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [junit] 	at junit.framework.TestCase.runTest(TestCase.java:154)
    [junit] 	at junit.framework.TestCase.runBare(TestCase.java:127)
    [junit] 	at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit] 	at junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit] 	at junit.framework.TestResult.run(TestResult.java:109)
    [junit] 	at junit.framework.TestCase.run(TestCase.java:118)
    [junit] 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
    [junit] 	at junit.framework.TestSuite.run(TestSuite.java:203)
    [junit] 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    [junit] 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    [junit] 	at junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit] 	at junit.extensions.TestSetup.run(TestSetup.java:23)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
    [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)
    [junit]
    [junit] Found 1 deadlock.
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2011/07/11/chasing-reason-for-a-deadlock-in-jdk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JBossWS talk @JBUG Munich</title>
		<link>http://www.javalinux.it/wordpress/2011/05/11/jbossws-talk-jbug-munich/</link>
		<comments>http://www.javalinux.it/wordpress/2011/05/11/jbossws-talk-jbug-munich/#comments</comments>
		<pubDate>Wed, 11 May 2011 13:21:28 +0000</pubDate>
		<dc:creator>Alessio SOLDANO</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[jbossws]]></category>
		<category><![CDATA[webserice]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=500</guid>
		<description><![CDATA[I&#8217;m having a talk on JBossWS project next Monday (May, 16th) in Munich. More details, as well as the presentation abstract, available on the JBUG Munich website. If you&#8217;re interested and happen to be around&#8230;]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having a talk on JBossWS project next Monday (May, 16th) in Munich.</p>
<p>More details, as well as the presentation abstract, available on the <a href="http://jbug-munich.org/">JBUG Munich website</a>. If you&#8217;re interested and happen to be around&#8230; <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2011/05/11/jbossws-talk-jbug-munich/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JBossWS 2010 closing balance&#8230; an year of integration</title>
		<link>http://www.javalinux.it/wordpress/2010/12/17/jbossws-2010-closing-balance-2/</link>
		<comments>http://www.javalinux.it/wordpress/2010/12/17/jbossws-2010-closing-balance-2/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 12:26:28 +0000</pubDate>
		<dc:creator>Alessio SOLDANO</dc:creator>
				<category><![CDATA[jboss]]></category>
		<category><![CDATA[jbossws]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[webserice]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=482</guid>
		<description><![CDATA[Before joining Red Hat / JBoss, I used to have closing balance face to face meetings at work before Christmas. Of course I met with my direct boss&#8230; so now I find quite funny to think about writing something similar to a JBossWS 2010 closing balance here, given my boss at that time now happens [...]]]></description>
			<content:encoded><![CDATA[<p>Before joining Red Hat / JBoss, I used to have closing balance face to face meetings at work before Christmas. Of course I met with my direct boss&#8230; so now I find quite funny to think about writing something similar to a JBossWS 2010 closing balance here, given my boss at that time now happens to be the guy I share this blog with and since some months he&#8217;s finally working for Red Hat / JBoss too &#8211; Stefano <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So, what&#8217;s up with <a href="http://jboss.org/jbossws">JBossWS</a> in 2010 ? The project has gone through two major sets of releases. The 3.3.x series kind of finalized the JBossWS move to having the <a href="http://cxf.apache.org/">Apache CXF</a> based stack as its preferred one, <a href="http://community.jboss.org/wiki/AS600M4ReleaseNotes">installed by default on JBoss Application server</a>. Integrating a third-party piece of software is always something non-trivial. And even if the overall quality of what we consume (and contribute to, of course) from Apache is definitely very high, that&#8217;s simply not enough when it comes to integrating: many issues were discovered, <a href="http://jbossws.blogspot.com/2010/02/extending-jbossws-cxfmetro-with-jax-rpc.html">dealt with and solved</a>&#8230; any many are probably still to come.</p>
<p>The type of development you end up doing when providing a solution like JBossWS-CXF is pretty much different from what you are on when developing stuff from scratch. I kind of expected that to be honest. It&#8217;s not that unusual to spend days on looking for the best way of re-using / integrating already existing (or partially available) functionalities, trying to figure out an elegant solution for achieving the goal on JBoss side, while <a href="http://jbossws.blogspot.com/2010/08/implementing-jaxws-22-http-spi-on.html">enriching the third-party side of the software in a way that makes sense regardless of JBoss needs</a>. Sometime I think it&#8217;s like &#8220;plumbing&#8221;. For sure you need to go on constantly swapping your hats, the JBoss employee one and the Apache contributor one, in my case. And given we operate in an open source world here <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> &#8230; you might even find yourself <a href="http://jbossws.blogspot.com/2010/08/comsunnethttpserver-transport-using.html">producing fully vendor agnostic solutions just for the sake of solving your own (JBoss here) problem</a>.</p>
<p>Some might dislike this kind of work, thinking satisfaction can come only from creating your own solutions from scratch, feeling they&#8217;re your own babies. Others might appreciate the integration work, enjoying the  new challenges in this. To be honest, I think this is a really subjective feeling and you can find yourself excited by the achievements you reach in both cases. You should probably try both in any case.</p>
<p>Anyway, back to bringing Apache CXF in JBoss through JBossWS&#8230; implementing the JSR 109 requirements is a good example of integration. Apache CXF provides WS functionalities and successfully verifies those are compliant with the core JCP WS specifications (JSR 224 &#8211; JAXWS, for instance). However CXF of course does not care about all the details on how that&#8217;s supposed to work with a given application server according to the rest of the JavaEE specification, which JSR 109 is a good example of. In an ideal world the missing bits need to live in the integration project (JBossWS here)&#8230; In reality you end up coordinating different needs, reviewing and rationalizing stuff on both sides, to basically make the integration happen and be a success.</p>
<p>The second set of JBossWS 2010 releases has been the 3.4.x series. While the <a href="http://jboss.org/jbossws/news">announcement is recent story</a>, that was a multiple months effort from me and the rest of the team. We went through active collaboration on CXF (Apache contributor hat on <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) to have it implement JAXWS 2.2 and make it <a href="http://www.dankulp.com/blog/?p=242">pass the TCK certifaction testsuite</a> for that. While on that, we implemented the proper integration for passing the corresponding ws modules of JavaEE 6 TCK on JBoss side (with *the* red hat on <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). This all was done while directly targeting development snapshots of Apache CXF, hence with multiple moving targets (JBoss AS, Apache CXF, our own JBossWS integration layer and even the TCK which was not final yet) to track for potential regressions.</p>
<p>At the end of the year I&#8217;m quite satisfied by <a href="http://jbossws.blogspot.com/2010/12/jbossws-340-has-landed.html">what we got</a>. From a job point of view, I&#8217;m just waiting for Santa to come with a nice present&#8230; a <a href="http://community.jboss.org/wiki/AS600FinalStatusExecutiveSummary">final release of JBoss AS 6</a> (I sent him the jbossws maven artifacts to include in the box <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> , he should have got them in time&#8230; despite the snow over north Italy these days).</p>
<p>OK, now it&#8217;s time to start relaxing a bit, to enjoy the Christmas spirit&#8230;  then I&#8217;ll come back with new intentions for the next year, both directly related to JBossWS and <em><strong>not</strong></em>&#8230;</p>
<p>Merry X-mas and happy new year!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2010/12/17/jbossws-2010-closing-balance-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JBoss AS7 Alpha1 Released (What keep me busy last months)</title>
		<link>http://www.javalinux.it/wordpress/2010/11/09/jboss-as7-alpha1-released-what-keep-me-busy-last-months/</link>
		<comments>http://www.javalinux.it/wordpress/2010/11/09/jboss-as7-alpha1-released-what-keep-me-busy-last-months/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 09:36:34 +0000</pubDate>
		<dc:creator>Stefano MAESTRI</dc:creator>
				<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=473</guid>
		<description><![CDATA[Just a cross post for the announce of public availability of the first alpha version new generation of JBoss Application server: http://in.relation.to/Bloggers/AS700Alpha1Released As Title of the post already said I&#8217;ve been lucky working with great people and developer contributing on this release (IronJacamar integration mainly). As you can see from the Jason&#8217;s post and a [...]]]></description>
			<content:encoded><![CDATA[<p>Just a cross post for the announce of public availability of the first alpha version new generation of JBoss Application server:</p>
<p><a href="http://in.relation.to/Bloggers/AS700Alpha1Released" target="_blank">http://in.relation.to/Bloggers/AS700Alpha1Released</a></p>
<p>As Title of the post already said I&#8217;ve been lucky working with great people and developer contributing on this release (<a href="http://www.javalinux.it/wordpress/2010/10/27/iron-jacamar-beta3-is-out/" target="_blank">IronJacamar</a> integration mainly).</p>
<p>As you can see from the <a href="http://in.relation.to/Bloggers/AS700Alpha1Released" target="_blank">Jason&#8217;s post</a> and a lot of tweet about that there is a lot of fun in this release, performance, new kernel based on service and domain administration and deployment. Check it out and give us your feed back through <a href="http://community.jboss.org/en/jbossas/dev/jboss_as7_development?view=documents" target="_blank">public forum</a>.</p>
<p>Have Fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2010/11/09/jboss-as7-alpha1-released-what-keep-me-busy-last-months/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iron Jacamar Beta3 is out</title>
		<link>http://www.javalinux.it/wordpress/2010/10/27/iron-jacamar-beta3-is-out/</link>
		<comments>http://www.javalinux.it/wordpress/2010/10/27/iron-jacamar-beta3-is-out/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 06:37:35 +0000</pubDate>
		<dc:creator>Stefano MAESTRI</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jboss]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=452</guid>
		<description><![CDATA[Just a cross post to announce that my full time job project has been released http://in.relation.to/17567.lace As said in the original post we have worked mainly on AS7 integration in this release, ad it was a lot of fun]]></description>
			<content:encoded><![CDATA[<p>Just a  cross post to announce that my full time job project has been released</p>
<p><a href="http://in.relation.to/17567.lace" target="_blank">http://in.relation.to/17567.lace</a></p>
<p>As said in the original post we have worked mainly on <a href="http://github.com/jbossas/jboss-as" target="_blank">AS7</a> integration in this release, ad it was a lot of fun <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2010/10/27/iron-jacamar-beta3-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sibilla first release: experience a new approach to unit testing</title>
		<link>http://www.javalinux.it/wordpress/2010/10/12/sibilla-first-release-experince-a-new-approach-to-unit-testing/</link>
		<comments>http://www.javalinux.it/wordpress/2010/10/12/sibilla-first-release-experince-a-new-approach-to-unit-testing/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 22:16:05 +0000</pubDate>
		<dc:creator>Stefano MAESTRI</dc:creator>
				<category><![CDATA[ideas]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[testedby]]></category>
		<category><![CDATA[sibilla]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=390</guid>
		<description><![CDATA[abstract: [...] collecting metadata set that represent links between classes under test and test classes (and eventually more fine grained links between methods) and using them for a lot of purposes. Metadata can be collected from different sources: annotations on classes under test, instrumentation of test classes during tests&#8217; execution (in future perhaps even from [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><span style="font-size: small;"><br />
</span></p>
<p>abstract:</p>
<blockquote><p><span style="color: #800000;">[...] <span style="font-size: large;">c</span><em><span style="font-size: large;">ollecting metadata set that represent links between classes under test and test classes (and eventually more fine grained links between methods) and using them for a lot of purposes. Metadata can be collected from different sources: annotations on classes under test, instrumentation of test classes during tests&#8217; execution (in future perhaps even from a dedicated user interface). These metadata can be used for various goals: f</span></em><strong><em><span style="font-size: large;">irst of all it becomes possible to run only the tests that stress just a particular set of classes (for instance the classes changed since last compilation) <span style="font-weight: normal;">[...] We have a Maven plugin, while Eclipse and Hudson ones are in our roadmap.</span></span></em></strong></span></p></blockquote>
<p>Full story:</p>
<p><a href="http://www.javalinux.it/wordpress/2008/10/20/a-new-approach-to-unit-tests/" target="_blank">A while ago I&#8217;ve written a post about a new approach to unit tests</a>; it has been a quite read and discussed post and it gives the momentum for starting a new community discussing about the idea and working on a software project implementing this idea. The project was named TestedBy and  hosted in google code.</p>
<p>That idea has evolved and changed and we have decided to change also the name of the project as a remark of these changes, calling it <a href="http://sibilla.javalinux.it" target="_blank">SibillaTest</a>. Why Sibilla? Because, as you can read in this post and you can get trying our samples, Sibilla (italian name for Cumae Sybil) is always able to prophesy and predict which tests you need to run.</p>
<p>This post has been written to announce the release of a first beta version of <a href="http://sibilla.javalinux.it" target="_blank">SibillaTest</a> and describe how our thoughts about the original idea have changed in these months and how they have been  implemented in <a href="http://sibilla.javalinux.it" target="_blank">SibillaTest</a>.<br />
I&#8217;m going to recall the main concepts of the original idea, If you haven&#8217;t read the <a href="http://www.javalinux.it/wordpress/2008/10/20/a-new-approach-to-unit-tests/" target="_blank">original blog would be nice to take a look to it</a>, to its numerous comments and also to the update I&#8217;ve posted few days after. If you are interested in all the genesis of the project you could also have a look to the discussions continued in <a href="http://groups.google.com/group/testedby-dev">our forum</a></p>
<p>Generally speaking what I&#8217;ve depicted in my old blog post was a system to keep annotations in classes under test pointing test classes (or in some case to specific test methods). Advantage of this approach were mainly 2:</p>
<p>• Design By Contract (viewing test as contract definition). The sugar here was the opportunity to put TestedBy annotation also on super classes (even if they are abstract or even interfaces) and inherit test annotations.<br />
• Run only tests stressing a specific class. IOW run test stressing a class of your interest (i.e just compiled) giving you the confidence you aren&#8217;t breaking test suite without running the entire suite itself.</p>
<p>The main concerns about this approach was about code cluttering putting a lot of annotations in production code (of course you could have a lot of test stressing a class or even a method).</p>
<p>So we have changed a bit the focus from an annotation centric approach to a more general metadata<br />
approach. The idea is to collect a set of metadata that represent link between classes under test and test classes (and eventually more fine grained links between methods) and use them for a lot of purposes.<br />
The pluses of this approach are mainly two:</p>
<p>• Metadata can be collected from different sources: annotations , instrumentation of test during test execution, maybe in the future from a dedicated  user interface.<br />
• Metadata can be serialized and/or used in a second step for various goals: run &#8220;right&#8221; tests of course will remain a central feature, but also<br />
&#8220;graphical&#8221; representation, code navigation in IDE, more dynamic use of it</p>
<p style="text-align: center;">
<p style="text-align: left;">I&#8217;m trying to keep this post not too long trying to keep your attention focused on the usefulness of SibillaTest,  I&#8217;m going to describe in this the feature already implemented in SibillaTest. But, of course, we have a lot of ideas that will be developed in next future that we would like to discuss with the community and maybe have some contribution from the community. Here you have a mind map depicting a lot of these working areas to get you an idea. I<a href="http://github.com/maeste/SibillaTest/wiki/IdeasDescription" target="_blank">f you are interested in a more detailed description of them you  can find a page in our wiki describing it.</a></p>
<p><img class="size-full wp-image-396 aligncenter" title="tb" src="http://www.javalinux.it/wordpress/wp-content/uploads/2010/04/tb.png" alt="" width="525" height="194" /></p>
<p>So, what is SibillaTest today?<em><a name="Short_description:"></a></em></p>
<blockquote><p><em><a name="Short_description:"></a></em><em> aims at changing the point of view regarding test classes and classes under test. What </em><em>we get is the focus being moved to the classes under test; from those classes, which of course are the most important ones of your projects, we obtain links to your test classes and test methods. In other words we define the classes and methods&#8217; contract using tests, while also keeping track of tests that need to be run when a class/method under test has been modified. This is possible by collecting metadata sets that represent links between classes under test and test classes (and eventually more fine grained links between methods) and using them for a lot of purposes. Metadata can be collected from different sources: annotations on classes under test, instrumentation of test classes during tests&#8217; execution (in future perhaps even from a dedicated user interface). These metadata can be used for various goals: </em><em><strong>first of all it becomes possible to run only the tests that stress just a particular set of classes (for instance the classes changed since last compilation)</strong></em><em>, moreover a graphical representation of classes&#8217; links can be derived. We have a Maven plugin, while Eclipse and Hudson ones are in our roadmap. Further cool idea around this is supporting generic tests to inject on existing production code (to verify commonly situation like don&#8217;t accept null parameters) and mock verification (are your mocks respecting the contract you have defined on mocked classes with your tests?)</em></p></blockquote>
<p>Practically speaking in this beta release we have:</p>
<ul>
<li><a href="http://github.com/maeste/SibillaTest" target="_blank">a core </a> supporting both annotation based metadata definition and instrumentation of classes during test execution to collect metadata. With annotation we support metadata on test stressing a whole hierarchy of classes/interfaces: you can define tests to be run against all implementation of your interface and SibillaTest take care of it Instrumentation do the magic of knowing which test is stressing particular classes and run only tests needed to validate last changed classes (i.e just compiled)</li>
<li><a href="http://github.com/maeste/SibillaMavenPlugin"> a maven plugin</a> (docs here) you can use to run test stressing only last changed classes.</li>
<li>support of Junit tests (not yet testng or other frameworks)</li>
</ul>
<p><a href="http://github.com/maeste/SibillaMavenPlugin/wiki" target="_blank">In our wiki you can find some documentation of how to include Sibilla into your maven project</a>, how to run it and documentation about our annotations if you decide to give TestedBy design by contract approach a try. <span style="font-size: medium;"><strong><a href="http://github.com/maeste/SibillaSamples" target="_blank">Here you can also find a small project with trivial classes under test and test classes using SibillaTest to run them. Check it out and give it a try&#8230;it&#8217;s the key to understand the idea and to say &#8220;wow it&#8217;s cool!&#8221; <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </a></strong></span></p>
<p>Have a look and send us comment through this blog or, much better, <a href="http://github.com/maeste/SibillaTest/issues" target="_blank">through our issue tracker</a> and/or <a href="http://groups.google.com/group/sibillatest" target="_blank">our forum</a>. We have also an<a href="irc://irc.freenode.net/sibilla" target="_blank"> IRC channel </a><strong><a href="irc://irc.freenode.net/sibilla" target="_blank">#sibilla</a></strong><a href="irc://irc.freenode.net/sibilla" target="_blank"> active on FreeNode</a> for discussions and suggestions.</p>
<p><a href="http://repo2.maven.org/maven2/it/javalinux/sibilla/" target="_blank">Artifact are available</a> on maven central repository, <a href="http://github.com/maeste/SibillaMavenPlugin/wiki">see the docs too.</a></p>
<p>Some other post with detailed descriptions of instrumentation and annotation based metadata and their use and plans for next versions will follow during next days. Moreover we will discuss on <a href="http://groups.google.com/group/sibillatest" target="_blank">forum</a> and post here also plans of integration with the very cool <a href="http://www.jboss.org/arquillian" target="_blank">Arquillian</a> (<a href="http://twitter.com/aslakknutsen/status/26729527708#" target="_blank">I had a very interesting discussion</a> about that with <a href="http://twitter.com/aslakknutsen" target="_blank">Aslak</a> at last <a href="http://www.jboss.org/events/JUDCon/JUDCon2010Berlin.html" target="_blank">JUDCon</a>)&#8230;.</p>
<p>&#8230;.stay tuned.</p>
<p>Of course if anyone is interested to join us and help (especially for eclipse plugin) please write us.</p>
<p>Stay tuned, join us and show some love around on the net!</p>
<p style="text-align: center;"><a href="http://sibilla.javalinux.it" target="_blank"><span style="font-size: large;">http://sibilla.javalinux.it</span></a></p>
<p style="text-align: center;"><span style="font-size: small;">(</span><a href="http://groups.google.com/group/sibillatest" target="_blank"><span style="font-size: small;">Forum</span></a><span style="font-size: small;"> &#8211; </span><a href="irc://irc.freenode.net/sibilla"><span style="font-size: small;">IRC</span></a><span style="font-size: medium;"><span style="font-size: small;"> &#8211; </span><a href="http://github.com/maeste/SibillaTest"><span style="font-size: small;">GitHub</span></a><span style="font-size: small;"> &#8211; </span><a href="http://github.com/maeste/SibillaSamples" target="_blank"><span style="font-size: small;">Sample(github)</span></a><span style="font-size: small;"> &#8211; </span><a href="http://github.com/maeste/SibillaMavenPlugin" target="_blank"><span style="font-size: small;">Maven Plugin(github)</span></a><span style="font-size: small;"> &#8211; </span><a href="https://twitter.com/SibillaTest"><span style="font-size: small;">@SibillaTest on twitter</span></a><span style="font-size: small;"> &#8211; </span><a href="http://github.com/maeste/SibillaTest/issues" target="_blank"><span style="font-size: small;">issues</span></a><span style="font-size: small;">)</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2010/10/12/sibilla-first-release-experince-a-new-approach-to-unit-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geek&#8217;s run in Berlin (or just a beer after run)</title>
		<link>http://www.javalinux.it/wordpress/2010/10/05/geeks-run-in-berlin-or-just-a-beer-after-run/</link>
		<comments>http://www.javalinux.it/wordpress/2010/10/05/geeks-run-in-berlin-or-just-a-beer-after-run/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 11:18:27 +0000</pubDate>
		<dc:creator>Stefano MAESTRI</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[spare time]]></category>
		<category><![CDATA[testedby]]></category>
		<category><![CDATA[wise]]></category>
		<category><![CDATA[judcon]]></category>
		<category><![CDATA[running]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=446</guid>
		<description><![CDATA[As you know I&#8217;ll be in Berlin Thursday and Friday for JUDCon talinkg about wise. I&#8217;d like to use this opportunity to meet some of you and having great talks about Wise, SibillaTest (aka TestedBy), or any other geek&#8217;s argument&#8230;you know what non-geek calls crazy. Where and when ca you find me? Well check on [...]]]></description>
			<content:encoded><![CDATA[<p>As you know I&#8217;ll be in Berlin Thursday and Friday for <a href="http://www.jboss.org/events/JUDCon/JUDCon2010Berlin.html">JUDCon</a> <a href="http://www.javalinux.it/wordpress/2010/09/27/wise-will-be-at-judcon-berlin-7-8-october/">talinkg about wise</a>.<br />
I&#8217;d like to use this opportunity to meet some of you and having great talks about <a href="http://www.jboss.org/wise">Wise</a>, <a href="http://sibilla.javalinux.it">SibillaTest</a> (aka TestedBy), or any other geek&#8217;s argument&#8230;you know what non-geek calls crazy.<br />
Where and when ca you find me? Well check on <a href="http://www.tripit.com/trip/public/id/323D49B97193" target="_blank">tripit</a> when I&#8217;ll arrive and where I&#8217;ll stay.<br />
I&#8217;ll be of course at <a href="http://community.jboss.org/wiki/JUDCon2010BerlinHackfest/" target="_blank">JUDCon&#8217;s HackFest</a>, but I&#8217;m more than open to plan other talks over a German beer.<br />
Would you have a run with me? I&#8217;ll run in Berlin for sure Friday and maybe also Thursday in the morning (if I find friends running with me, I&#8217;ll run for sure Thursday too).<br />
I have in mind more or less 10km of easy running (1h or so) to take a look to the city, since I&#8221;ve never stayed in Berlin and it seems I&#8217;ll not have more spare time to take a look around. <a href="http://www.gmap-pedometer.com/?r=4085453">More precisely I&#8217;d like to take this run.</a><br />
Write me if you want to join me both for a run or a beer, we can agree meeting point and time. For German people: write me also if you see something wrong in the planned run&#8230;something like &#8220;too more traffic here&#8221;&#8230;or &#8220;too more gangsters there!!&#8221; <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>See you in Berlin</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2010/10/05/geeks-run-in-berlin-or-just-a-beer-after-run/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another passion: running (post celebrating my first 1000km)</title>
		<link>http://www.javalinux.it/wordpress/2010/10/01/another-passion-running-post-celebrating-my-first-1000km/</link>
		<comments>http://www.javalinux.it/wordpress/2010/10/01/another-passion-running-post-celebrating-my-first-1000km/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 21:33:11 +0000</pubDate>
		<dc:creator>Stefano MAESTRI</dc:creator>
				<category><![CDATA[spare time]]></category>

		<guid isPermaLink="false">http://www.javalinux.it/wordpress/?p=442</guid>
		<description><![CDATA[Hi, I&#8217;ve written here very rarely of other passions I have apart technology, java and distributed system. I&#8217;ve written just one time I think about my passion for Wine and Food (well I&#8217;m italian men!). I&#8217;ve never written here about my passion for sports and the recent maniacal passion for running (just something on twitter). [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;ve written here very rarely of other passions I have apart technology, java and distributed system. <a href="http://www.javalinux.it/wordpress/2009/10/25/another-passion-wines-and-food/">I&#8217;ve written just one time I think about my passion for Wine and Food </a>(well I&#8217;m italian men!).</p>
<p>I&#8217;ve never written here about my passion for sports and the recent maniacal passion for running (just something on <a href="http://www.twitter.com/maeste">twitter</a>). But this morning I&#8217;ve reached an important goal I can&#8217;t resist to share with a rapid blog post: <strong>1000, <span style="font-size: x-large;">one</span></strong><strong><span style="font-size: xx-large;"> thousand!</span></strong><strong> kilometers</strong>. When just 9 months ago I&#8217;ve started my runner&#8217;s career 1000 km seemed to me a goal too far and to hard to get. Today I&#8217;m running something like 60/65 km per week and 1000kms isn&#8217;t a goal, but a starting point.</p>
<p>I know you can&#8217;t understand me and I seem completely mad to you. It was exactly what I thought about runners 10 months ago <img src='http://www.javalinux.it/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , but I can assure you I&#8217;m not mad, and running I&#8217;m feeling much much better that months ago both with my body and with my mind. <a href="http://www.javalinux.it/wordpress/2009/03/25/book-review-pragmatic-thinking-and-learning/">Running could be considered meditation on movement</a>. Trust me it is!</p>
<p>I run everywhere I am, so<a href="http://www.javalinux.it/wordpress/2010/09/27/wise-will-be-at-judcon-berlin-7-8-october/"> I&#8217;ll run in Berlin at early morning before next JUDCon</a>&#8230;would you join me? We could have a nice geek talk during our run!</p>
<p>I look forward for this geek run (maybe I&#8217;ll make a dedicated post about this geek run&#8230;but feel free to contact me immediately if you are interested)</p>
<p>Have fun running and hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javalinux.it/wordpress/2010/10/01/another-passion-running-post-celebrating-my-first-1000km/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
