<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5508944150741454216</id><updated>2011-08-03T12:56:30.445+02:00</updated><category term='Arquillian'/><category term='Seam2'/><category term='JBoss'/><category term='Java'/><category term='SOA'/><category term='Maven'/><category term='DB'/><category term='ESB'/><category term='misc'/><category term='Testing'/><title type='text'>Tech and Tips</title><subtitle type='html'>This is my notepad to remember what I did so I can reuse it later.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-6164538179206532641</id><published>2011-08-02T16:05:00.000+02:00</published><updated>2011-08-02T16:05:21.653+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Hibernate/JPA Identity Generators</title><content type='html'>While googling for some answer regarding JPA identity generators and how they behave according to which DB you use, I found this &lt;a href="http://blog.eyallupu.com/2011/01/hibernatejpa-identity-generators.html"&gt;very nice blog post&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;Very informative!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-6164538179206532641?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/6164538179206532641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2011/08/hibernatejpa-identity-generators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/6164538179206532641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/6164538179206532641'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2011/08/hibernatejpa-identity-generators.html' title='Hibernate/JPA Identity Generators'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-2885849537019590581</id><published>2011-05-31T17:44:00.001+02:00</published><updated>2011-05-31T17:45:22.351+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><title type='text'>SOAPUI and dynamic XML values</title><content type='html'>I am currently using SOAPUI to load test an application via web services.&lt;br /&gt;In order to do that, I need to be able to change the value of some XML elements on the fly.&lt;br /&gt;Here is how you can do that:&lt;br /&gt;- Create a Test Suite&lt;br /&gt;- Create a Test Case (which will contains Test Steps)&lt;br /&gt;- Your first test step will be a SOAP request called TestReq1&lt;br /&gt;- In the Test Case Editor, you can create a Setup Script&lt;br /&gt;&lt;br /&gt;Here is the Groovy script I use to set the value of one element dynamically (in this case the element attribute called Version):&lt;br /&gt;&lt;pre class="prettyprint"&gt;def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)&lt;br /&gt;def holder = groovyUtils.getXmlHolder("TestReq1#Request")&lt;br /&gt;holder.setNodeValue("//@Version","7.2")&lt;br /&gt;holder.updateProperty()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;At the moment the script is not so useful since it dynamically sets the element to the same value. But there are several strategies to use different values each time, from reading from a file or a DB to writing a little generator in Groovy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Another thing which is useful with SOAPUI is to be able to create a mock-up response which is dynamically created according to the incoming data. Once you have created your mock-up service, here is how to fetch data from the request and paste it in the response. First the incoming XML and then the Groovy script changing the response (in this example both the request and the response have a Version attribute on an element and we simply return the value we get in):&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:abc="http://my.project.com/abc"&amp;gt;&lt;br /&gt;   &amp;lt;soapenv:Header/&amp;gt;&lt;br /&gt;   &amp;lt;soapenv:Body&amp;gt;&lt;br /&gt;      &amp;lt;abc:customerApp Version="${version}" /&amp;gt;&lt;br /&gt;   &amp;lt;/soapenv:Body&amp;gt;&lt;br /&gt;&amp;lt;/soapenv:Envelope&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;def holder = new com.eviware.soapui.support.XmlHolder(mockRequest.requestContent)&lt;br /&gt;context.version = holder["//@Version"]&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-2885849537019590581?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/2885849537019590581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2011/05/soapui-and-dynamic-xml-values.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/2885849537019590581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/2885849537019590581'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2011/05/soapui-and-dynamic-xml-values.html' title='SOAPUI and dynamic XML values'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-5971821308877725131</id><published>2011-03-28T13:51:00.000+02:00</published><updated>2011-03-28T13:51:20.450+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DB'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><title type='text'>Testing Databases with JUnit and Hibernate</title><content type='html'>Here a 3 part blog post showing how to use JUnit and Hibernate (and Hypersonic) to test your database layer. Often using an ORM makes this superfluous but in some cases it can be an interesting to do.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.schauderhaft.de/2011/03/13/testing-databases-with-junit-and-hibernate-part-1-one-to-rule-them/"&gt;Part 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blog.schauderhaft.de/2011/03/20/testing-databases-with-junit-and-hibernate-part-2-the-mother-of-all-things/"&gt;Part 2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blog.schauderhaft.de/2011/03/27/testing-databases-with-junit-and-hibernate-part-3-cleaning-up-and-further-ideas/"&gt;Part 3&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-5971821308877725131?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/5971821308877725131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2011/03/testing-databases-with-junit-and.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/5971821308877725131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/5971821308877725131'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2011/03/testing-databases-with-junit-and.html' title='Testing Databases with JUnit and Hibernate'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-175101520940255344</id><published>2011-03-23T10:05:00.001+01:00</published><updated>2011-03-23T10:05:37.208+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Arquillian'/><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><title type='text'>Socket connection error when using remote JBoss AS</title><content type='html'>I spent most if the afternoon on this problem yesterday and I thought I &lt;br /&gt;could just share the solution since this might be a good tip for everyone... &lt;br /&gt;&lt;br /&gt;I have Arquillian tests which used to run flawlessly and which stopped &lt;br /&gt;working out of the blue! The problem was, according to the JUnit logs, a &lt;br /&gt;socket connection error when using remote JBoss AS. &lt;br /&gt;&lt;br /&gt;After a lot of searching and great help from Aslak Knutsen on &lt;br /&gt;#jbosstesting, I found out that the problem was in /etc/hosts!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More info and the solution &lt;a href="http://community.jboss.org/wiki/WhydoIgetasocketconnectionerrorwhenusingremoteJBossAS"&gt;from JBoss community&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-175101520940255344?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/175101520940255344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2011/03/socket-connection-error-when-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/175101520940255344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/175101520940255344'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2011/03/socket-connection-error-when-using.html' title='Socket connection error when using remote JBoss AS'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-5265411094972160070</id><published>2011-02-28T08:14:00.000+01:00</published><updated>2011-02-28T08:14:41.511+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><title type='text'>Improving your laptop battery life</title><content type='html'>- &lt;br /&gt;According to &lt;a href="http://www.thinkwiki.org/wiki/Maintenance#Battery_treatment"&gt;this page&lt;/a&gt;, you should avoid charging your laptop if its battery is nearly full. Indeed, it destroys your battery capacity in the long run.&lt;br /&gt;&lt;br /&gt;Running Ubuntu on a Thinkpad (mine is a T510), you can set up the thresholds for when to start and stop charging yourself.&lt;br /&gt;&lt;br /&gt;Here is how:&lt;br /&gt;# aptitude install tp-smapi-dkms &lt;br /&gt;# modprobe tp_smapi&lt;br /&gt;# echo 40 &amp;gt; /sys/devices/platform/smapi/BAT0/start_charge_thresh &lt;br /&gt;# echo 70 &amp;gt; /sys/devices/platform/smapi/BAT0/stop_charge_thresh &lt;br /&gt;# cat /sys/devices/platform/smapi/BAT0/*_charge_thresh&lt;br /&gt;&lt;br /&gt;Then to have the settings loaded at each startup:&lt;br /&gt;# apt-get install sysfsutils&lt;br /&gt;And add the following in /etc/sysfs.conf&lt;br /&gt;# For a LiIon battery in a Thinkpad&lt;br /&gt;devices/platform/smapi/BAT0/start_charge_thresh = 50&lt;br /&gt;devices/platform/smapi/BAT0/stop_charge_thresh =85&lt;br /&gt;&lt;br /&gt;All the info is &lt;a href="http://www.thinkwiki.org/wiki/Tp_smapi"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Once you are done are reboot the machine, you will need to run the "modprobe tp_smapi" command to be able to access /sys/devices/platform/smapi&lt;br /&gt;-&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-5265411094972160070?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/5265411094972160070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2011/02/improving-your-laptop-battery-life.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/5265411094972160070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/5265411094972160070'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2011/02/improving-your-laptop-battery-life.html' title='Improving your laptop battery life'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-890262073513869540</id><published>2011-02-23T11:17:00.000+01:00</published><updated>2011-02-23T11:17:26.697+01:00</updated><title type='text'>Arquillian testing - JBoss 5.1.0 - EJB3</title><content type='html'>I started using &lt;a href="http://www.jboss.org/arquillian"&gt;Arquillian&lt;/a&gt; to test my business logic code directly in my running JBoss 5.1 instance, and after some fighting I got it working pretty nicely!&lt;br /&gt;&lt;br /&gt;So here is what I had to do:&lt;br /&gt;1. Add a profile for running the Arquillian Integration tests in Maven&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;profiles&amp;gt;&lt;br /&gt;   &amp;lt;profile&amp;gt;&lt;br /&gt;      &amp;lt;id&amp;gt;it&amp;lt;/id&amp;gt;&lt;br /&gt;      &amp;lt;activation&amp;gt;&lt;br /&gt;        &amp;lt;activeByDefault&amp;gt;false&amp;lt;/activeByDefault&amp;gt;&lt;br /&gt;      &amp;lt;/activation&amp;gt;&lt;br /&gt;      &amp;lt;build&amp;gt;&lt;br /&gt;        &amp;lt;defaultGoal&amp;gt;verify&amp;lt;/defaultGoal&amp;gt;&lt;br /&gt;        &amp;lt;plugins&amp;gt;&lt;br /&gt;          &amp;lt;plugin&amp;gt;&lt;br /&gt;            &amp;lt;artifactId&amp;gt;maven-failsafe-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;            &amp;lt;version&amp;gt;2.6&amp;lt;/version&amp;gt;&lt;br /&gt;            &amp;lt;executions&amp;gt;&lt;br /&gt;              &amp;lt;execution&amp;gt;&lt;br /&gt;                &amp;lt;goals&amp;gt;&lt;br /&gt;                  &amp;lt;goal&amp;gt;integration-test&amp;lt;/goal&amp;gt;&lt;br /&gt;                &amp;lt;/goals&amp;gt;&lt;br /&gt;              &amp;lt;/execution&amp;gt;&lt;br /&gt;            &amp;lt;/executions&amp;gt;&lt;br /&gt;          &amp;lt;/plugin&amp;gt;&lt;br /&gt;        &amp;lt;/plugins&amp;gt;&lt;br /&gt;        &amp;lt;testResources&amp;gt;&lt;br /&gt;            &amp;lt;testResource&amp;gt;&lt;br /&gt;                &amp;lt;directory&amp;gt;src/test/resources&amp;lt;/directory&amp;gt;&lt;br /&gt;            &amp;lt;/testResource&amp;gt;&lt;br /&gt;        &amp;lt;/testResources&amp;gt;&lt;br /&gt;      &amp;lt;/build&amp;gt;&lt;br /&gt;      &amp;lt;dependencies&amp;gt;&lt;br /&gt;        &amp;lt;dependency&amp;gt;&lt;br /&gt;            &amp;lt;groupId&amp;gt;org.jboss.arquillian.container&amp;lt;/groupId&amp;gt;&lt;br /&gt;            &amp;lt;artifactId&amp;gt;arquillian-jbossas-remote-5.1&amp;lt;/artifactId&amp;gt;&lt;br /&gt;            &amp;lt;version&amp;gt;1.0.0.Alpha4&amp;lt;/version&amp;gt;&lt;br /&gt;            &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;          &amp;lt;/dependency&amp;gt;&lt;br /&gt;        &amp;lt;dependency&amp;gt;&lt;br /&gt;          &amp;lt;groupId&amp;gt;org.jboss.jbossas&amp;lt;/groupId&amp;gt;&lt;br /&gt;          &amp;lt;artifactId&amp;gt;jboss-as-client&amp;lt;/artifactId&amp;gt;&lt;br /&gt;          &amp;lt;version&amp;gt;5.1.0.GA&amp;lt;/version&amp;gt;&lt;br /&gt;          &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;&lt;br /&gt;        &amp;lt;/dependency&amp;gt;&lt;br /&gt;      &amp;lt;/dependencies&amp;gt;&lt;br /&gt;    &amp;lt;/profile&amp;gt;  &lt;br /&gt;&amp;lt;/profiles&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;2. Make sure you are using the &lt;b&gt;correct version of the javassist library in your business logic project. It has to be version 3.10.0.GA.&lt;/b&gt; The one coming with JBoss AS 5.1.0 GA is older (3.9.0) and will not work properly!&lt;br /&gt;&lt;br /&gt;3. Write your test classes and run them using "mvn -Pit"!&lt;br /&gt;&lt;br /&gt;4. Here is an example of a simple class just calling a EJB3 SLSB (test-persistence.xml has to be in src/test/resources together with jndi.properties):&lt;br /&gt;&lt;pre class="prettyprint"&gt;import javax.naming.Context;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;&lt;br /&gt;import junit.framework.Assert;&lt;br /&gt;import myclasses.ejb.actions.interfaces.AuthenticatorLocal;&lt;br /&gt;import myclasses.ejb.valueobjects.RequestorInfo;&lt;br /&gt;&lt;br /&gt;import org.jboss.arquillian.api.Deployment;&lt;br /&gt;import org.jboss.arquillian.junit.Arquillian;&lt;br /&gt;import org.jboss.shrinkwrap.api.ArchivePaths;&lt;br /&gt;import org.jboss.shrinkwrap.api.ShrinkWrap;&lt;br /&gt;import org.jboss.shrinkwrap.api.spec.JavaArchive;&lt;br /&gt;import org.junit.Test;&lt;br /&gt;import org.junit.runner.RunWith;&lt;br /&gt;&lt;br /&gt;@RunWith(Arquillian.class)&lt;br /&gt;public class AuthenticatorBeanIT {&lt;br /&gt; @Deployment&lt;br /&gt; public static JavaArchive createDeployment() {&lt;br /&gt;  return ShrinkWrap.create(JavaArchive.class, "testAuthenticatorBean.jar")&lt;br /&gt;  .addClasses(AuthenticatorBean.class, AuthenticatorLocal.class, RequestorInfo.class)&lt;br /&gt;  .addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; @Test&lt;br /&gt; public void isAuthenticatedTest() throws Exception {&lt;br /&gt;  Context ctx = new InitialContext();&lt;br /&gt;  AuthenticatorLocal auth;&lt;br /&gt;&lt;br /&gt;  Object obj = ctx.lookup("AuthenticatorBean/local");&lt;br /&gt;&lt;br /&gt;  auth = (AuthenticatorLocal) obj;&lt;br /&gt;  RequestorInfo req = new RequestorInfo();&lt;br /&gt;&lt;br /&gt;  // Trying with a valid user (according to import.sql!)&lt;br /&gt;  req.setRequestorId("0123456789");&lt;br /&gt;  req.setPassword("secret");&lt;br /&gt;  Assert.assertTrue(auth.isAuthenticated(req));&lt;br /&gt;  &lt;br /&gt;  // Trying with a invalid user&lt;br /&gt;  req.setRequestorId("0123456789");&lt;br /&gt;  req.setPassword("incorrect");  &lt;br /&gt;  Assert.assertFalse(auth.isAuthenticated(req));&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;5. Here is an example of a class persisting something to the DB and cleaning up after itself (Note: you have to lookup the EntityManager and EntityTransaction yourself. They can not be injected since you are not in an EJB(:&lt;br /&gt;&lt;pre class="prettyprint"&gt;import java.util.ArrayList;&lt;br /&gt;import java.util.Date;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;import javax.persistence.EntityManager;&lt;br /&gt;import javax.persistence.EntityManagerFactory;&lt;br /&gt;import javax.persistence.EntityTransaction;&lt;br /&gt;import javax.persistence.Query;&lt;br /&gt;&lt;br /&gt;import junit.framework.Assert;&lt;br /&gt;import myclasses.ejb.actions.interfaces.MyClassLocal;&lt;br /&gt;import myclasses.ejb.valueobjects.Info;&lt;br /&gt;&lt;br /&gt;import org.jboss.arquillian.api.Deployment;&lt;br /&gt;import org.jboss.arquillian.junit.Arquillian;&lt;br /&gt;import org.jboss.shrinkwrap.api.ArchivePaths;&lt;br /&gt;import org.jboss.shrinkwrap.api.ShrinkWrap;&lt;br /&gt;import org.jboss.shrinkwrap.api.spec.JavaArchive;&lt;br /&gt;import org.junit.Test;&lt;br /&gt;import org.junit.runner.RunWith;&lt;br /&gt;&lt;br /&gt;@RunWith(Arquillian.class)&lt;br /&gt;public class BarCodeBoardingPassBeanIT {&lt;br /&gt; @Deployment&lt;br /&gt; public static JavaArchive createDeployment() {&lt;br /&gt;  return ShrinkWrap.create(JavaArchive.class, "testBarCodeBoardingPassBean.jar")&lt;br /&gt;  .addClasses(MyClassLocal.class)&lt;br /&gt;  .addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; @Test&lt;br /&gt; public void persistBoardingPassInfoTest() throws Exception {&lt;br /&gt;  Context ctx = new InitialContext();&lt;br /&gt;  MyClassLocal mcl;&lt;br /&gt;&lt;br /&gt;  Object obj = ctx.lookup("MyClasssBean/local");&lt;br /&gt;&lt;br /&gt;  mcl = (MyClassLocal) obj;&lt;br /&gt;  &lt;br /&gt;  Info info = new Info("XXX");&lt;br /&gt;  mcl.persistInfo(info);&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  // Now checking that the data is properly persisted in the DB&lt;br /&gt;  EntityManagerFactory emFactory = (EntityManagerFactory) ctx.lookup("java:/myTestEntityManagerFactory");&lt;br /&gt;  EntityManager em = emFactory.createEntityManager();&lt;br /&gt;  EntityTransaction tx = em.getTransaction();&lt;br /&gt;  tx.begin();&lt;br /&gt;&lt;br /&gt;  Query query = em.createQuery("From Info where text=:info");&lt;br /&gt;  query.setParameter("info", "XXX");&lt;br /&gt;  runQuery(query);&lt;br /&gt;  &lt;br /&gt;  // Cleaning up&lt;br /&gt;  query = em.createQuery("delete from Info where text=:info");&lt;br /&gt;  query.setParameter("info", "XXX");&lt;br /&gt;  query.executeUpdate();&lt;br /&gt;  &lt;br /&gt;  tx.commit();&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; private void runQuery(Query query) {&lt;br /&gt;  try {&lt;br /&gt;   query.getSingleResult();&lt;br /&gt;   Assert.assertTrue(true);&lt;br /&gt;  } catch (Exception e) {&lt;br /&gt;   Assert.assertTrue(false);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;6. For the previous test class to work you need a persistence.xml which looks like this:&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"&lt;br /&gt;    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"&lt;br /&gt;    version="1.0"&amp;gt;&lt;br /&gt;&lt;br /&gt;     &amp;lt;persistence-unit name="myTestPU" transaction-type="RESOURCE_LOCAL" &amp;gt;&lt;br /&gt;        &amp;lt;provider&amp;gt;org.hibernate.ejb.HibernatePersistence&amp;lt;/provider&amp;gt;&lt;br /&gt;        &amp;lt;non-jta-data-source&amp;gt;java:/myAppDS&amp;lt;/non-jta-data-source&amp;gt;&lt;br /&gt;        &amp;lt;properties&amp;gt;&lt;br /&gt;            &amp;lt;property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/&amp;gt;&lt;br /&gt;            &amp;lt;property name="hibernate.current_session_context_class" value="jta"/&amp;gt;&lt;br /&gt;            &amp;lt;property name="hibernate.show_sql" value="true"/&amp;gt;&lt;br /&gt;            &amp;lt;property name="hibernate.format_sql" value="true"/&amp;gt;&lt;br /&gt;            &amp;lt;property name="hibernate.default_schema" value="public"/&amp;gt;&lt;br /&gt;            &amp;lt;property name="hibernate.hbm2ddl.auto" value="validate" /&amp;gt;&lt;br /&gt;            &amp;lt;property name="jboss.entity.manager.factory.jndi.name" value="java:/myTestEntityManagerFactory"/&amp;gt;&lt;br /&gt;            &lt;br /&gt;        &amp;lt;/properties&amp;gt;&lt;br /&gt;    &amp;lt;/persistence-unit&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/persistence&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-890262073513869540?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/890262073513869540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2011/02/arquillian-testing-jboss-510-ejb3.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/890262073513869540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/890262073513869540'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2011/02/arquillian-testing-jboss-510-ejb3.html' title='Arquillian testing - JBoss 5.1.0 - EJB3'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-1307548503582554785</id><published>2010-11-05T15:40:00.014+01:00</published><updated>2010-11-07T21:07:06.662+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><title type='text'>Test syntax and xml publishing</title><content type='html'>Use &lt;a href="http://formatmysourcecode.blogspot.com/"&gt;this little page to format the XML code for you&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;#! /bin/env python&lt;br /&gt;def python_funct():&lt;br /&gt;   a = a + b&lt;br /&gt;   print "Hello Highlighted code"&lt;br /&gt;&lt;br /&gt;class Foo(Bar):&lt;br /&gt;   pass&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;pre class="source-code"&gt;&lt;code&gt;&amp;lt;Location /svn&amp;gt;&lt;br /&gt;&lt;br /&gt;  # Uncomment this to enable the repository&lt;br /&gt;  DAV svn&lt;br /&gt;&lt;br /&gt;  # The following three lines allow anonymous read, but make&lt;br /&gt;  # committers authenticate themselves.  It requires the 'authz_user'&lt;br /&gt;  # module (enable it with 'a2enmod').&lt;br /&gt;  #&amp;lt;LimitExcept GET PROPFIND OPTIONS REPORT&amp;gt;&lt;br /&gt;  Require valid-user&lt;br /&gt;  #&amp;lt;/LimitExcept&amp;gt; &lt;br /&gt;&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-1307548503582554785?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/1307548503582554785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2010/11/test-syntax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/1307548503582554785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/1307548503582554785'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2010/11/test-syntax.html' title='Test syntax and xml publishing'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-4375847494871127250</id><published>2010-08-23T10:51:00.000+02:00</published><updated>2010-08-23T10:51:38.585+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='ESB'/><title type='text'>How to update Smooks in JBoss ESB</title><content type='html'>The latest JBoss SOA platform (5.0) uses JBoss ESB 4.7 (https://www.jboss.com/products/platforms/soa/components/) which itself uses Smooks 1.2.3 (http://docs.jboss.org/jbossesb/docs/4.7/manuals/html/ReleaseNotes.html)&lt;br /&gt;The latest and greatest Smooks is 1.3.1 and contains certain new features.&lt;br /&gt;So if you absolutely need them in your JBoss Soa Platform 5.0, you will have to update Smooks manually. To do so, download the zip file from  http://downloads.sourceforge.net/smooks/smooks-1.3.1.zip, unpack it and replace all the milyn-* from $JBOSS_ESB_HOME/server/default/deployers/esb.deployer/lib/ with the ones from the lib folder in the zip file.&lt;br /&gt;&lt;br /&gt;Warning: This configuration is most likely not supported in case you need support from Red Hat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-4375847494871127250?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/4375847494871127250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2010/08/how-to-update-smooks-in-jboss-esb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/4375847494871127250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/4375847494871127250'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2010/08/how-to-update-smooks-in-jboss-esb.html' title='How to update Smooks in JBoss ESB'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-3267612650109824885</id><published>2010-06-14T15:29:00.012+02:00</published><updated>2010-11-07T21:05:21.685+01:00</updated><title type='text'>Agilo for Scrum</title><content type='html'>I found a tool called &lt;a href="http://www.agile42.com/cms/pages/agilo/"&gt;Agilo&lt;/a&gt; (built on of Trac) which looks promising as a Scrum tool. It supports most of the Scrum features and is actually quite nice to use.&lt;br /&gt;&lt;br /&gt;&lt;h1 id="HereisadescriptionregardinghowtoinstallAgilo"&gt;&lt;span style="font-size: large;"&gt;Here is a  description regarding how to install Agilo&lt;/span&gt;&lt;/h1&gt;I used a lot of information from the following pages (mostly for Hardy  but can be reused): &lt;br /&gt;&lt;a class="ext-link" href="http://trac.edgewall.org/wiki/0.11/TracOnUbuntu"&gt;&lt;span class="icon"&gt;&amp;nbsp;&lt;/span&gt;http://trac.edgewall.org/wiki/0.11/TracOnUbuntu&lt;/a&gt;  &lt;br /&gt;&lt;a class="ext-link" href="http://trac.edgewall.org/wiki/0.10.4/TracOnUbuntuHardy"&gt;&lt;span class="icon"&gt;&amp;nbsp;&lt;/span&gt;http://trac.edgewall.org/wiki/0.10.4/TracOnUbuntuHardy&lt;/a&gt;  &lt;br /&gt;&lt;a class="ext-link" href="http://trac.edgewall.org/wiki/TracUbuntuMultipleProjects"&gt;&lt;span class="icon"&gt;&amp;nbsp;&lt;/span&gt;http://trac.edgewall.org/wiki/TracUbuntuMultipleProjects&lt;/a&gt;  &lt;br /&gt;&lt;a class="ext-link" href="http://anantgarg.com/2009/03/25/subversion-trac-multiple-projects/"&gt;&lt;span class="icon"&gt;&amp;nbsp;&lt;/span&gt;http://anantgarg.com/2009/03/25/subversion-trac-multiple-projects/&lt;/a&gt;  &lt;br /&gt;&lt;a class="ext-link" href="http://www.agile42.com/cms/pages/download-install/"&gt;&lt;span class="icon"&gt;&amp;nbsp;&lt;/span&gt;http://www.agile42.com/cms/pages/download-install/&lt;/a&gt;  &lt;br /&gt;&lt;a class="ext-link" href="http://specialbrands.net/2010/01/12/agilo-a-scrum-tool-agile-scrum/"&gt;&lt;span class="icon"&gt;&amp;nbsp;&lt;/span&gt;http://specialbrands.net/2010/01/12/agilo-a-scrum-tool-agile-scrum/&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;Now for the step by step install (all commands are run as root!):&lt;br /&gt;&lt;br /&gt;&lt;b&gt;We start from a fresh Ubuntu 10.04 Lucid Lynx server&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="FirstweaddApacheandsometools"&gt;First we add Apache and some tools&lt;/h2&gt;&lt;i&gt;apt-get install apache2 libapache2-mod-python libapache2-svn  python-setuptools subversion python-subversion python-simplejson&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="Thenweinstalltrac"&gt;Then we install trac&lt;/h2&gt;&lt;i&gt;apt-get install trac&lt;/i&gt;&lt;br /&gt;&lt;h2 id="ThenweconfigureTrac"&gt;Then we configure Trac&lt;/h2&gt;&lt;i&gt;mkdir /var/lib/trac&lt;/i&gt;&lt;br /&gt;&lt;i&gt;chown www-data:www-data /var/lib/trac&lt;/i&gt;&lt;br /&gt;&lt;i&gt;ln -s /var/lib/trac/ /trac&lt;/i&gt;&lt;br /&gt;&lt;i&gt;vi /etc/apache2/sites-available/trac&lt;/i&gt; and add this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;VirtualHost *&amp;gt;&lt;br /&gt;ServerAdmin user@email.com&lt;br /&gt;ServerName you.servername.com&lt;br /&gt;DocumentRoot /var/www&lt;br /&gt;ErrorLog /var/log/apache2/error.trac.log&lt;br /&gt;CustomLog /var/log/apache2/access.trac.log combined&lt;br /&gt;&lt;br /&gt;&amp;lt;location /trac&amp;gt;&lt;br /&gt;SetHandler mod_python&lt;br /&gt;PythonInterpreter main_interpreter&lt;br /&gt;PythonHandler trac.web.modpython_frontend&lt;br /&gt;PythonOption TracEnvParentDir /var/lib/trac&lt;br /&gt;PythonOption TracUriRoot /trac&lt;br /&gt;PythonOption PYTHON_EGG_CACHE /tmp&lt;br /&gt;&amp;lt;/location&amp;gt;&lt;br /&gt;# use the following for one authorization for all projects &lt;br /&gt;# (names containing "-" are not detected):&lt;br /&gt;&amp;lt;LocationMatch "/trac/[[:alnum:]]+/login"&amp;gt;&lt;br /&gt;AuthType Basic&lt;br /&gt;AuthName "trac"&lt;br /&gt;AuthUserFile /etc/apache2/dav_svn.passwd&lt;br /&gt;Require valid-user&lt;br /&gt;&amp;lt;/LocationMatch&amp;gt;&lt;br /&gt;&amp;lt;/VirtualHost *&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;i&gt;a2dissite default&lt;/i&gt;&lt;br /&gt;&lt;i&gt;a2ensite trac&lt;/i&gt;&lt;br /&gt;&lt;i&gt;/etc/init.d/apache2 reload&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="ThenweconfigureSVNeventhoughwewillnotuseitinthisproject...:"&gt;Then  we configure SVN:&lt;/h2&gt;&lt;i&gt;mkdir /var/lib/svn&lt;/i&gt;&lt;br /&gt;&lt;i&gt;svnadmin create /var/lib/svn/theproject&lt;/i&gt;&lt;br /&gt;&lt;i&gt;chown -R www-data /var/lib/svn&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="ThenwecreatetheTracsitefortheproject:"&gt;Then we create the Trac  site for the project:&lt;/h2&gt;&lt;i&gt;trac-admin /var/lib/trac/theproject initenv&lt;/i&gt;&lt;br /&gt;&lt;i&gt;chown -R www-data /var/lib/trac&lt;/i&gt;&lt;br /&gt;&lt;i&gt;vi /etc/apache2/mods-available/dav_svn.conf&lt;/i&gt; and add this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&amp;lt;location /svn&amp;gt;&lt;br /&gt;# Uncomment this to enable the repository&lt;br /&gt;DAV svn&lt;br /&gt;&lt;br /&gt;# Set this to the path to your repository&lt;br /&gt;#SVNPath /var/lib/svn&lt;br /&gt;# Alternatively, use SVNParentPath if you have multiple repositories under&lt;br /&gt;# under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...).&lt;br /&gt;# You need either SVNPath and SVNParentPath, but not both.&lt;br /&gt;SVNParentPath /var/lib/svn&lt;br /&gt;#Provides directory listing of repositories&lt;br /&gt;SVNListParentPath On&lt;br /&gt;&lt;br /&gt;# Basic Authentication is repository-wide.  It is not secure unless&lt;br /&gt;# you are using https.  See the 'htpasswd' command to create and&lt;br /&gt;# manage the password file - and the documentation for the&lt;br /&gt;# 'auth_basic' and 'authn_file' modules, which you will need for this&lt;br /&gt;# (enable them with 'a2enmod').&lt;br /&gt;AuthType Basic&lt;br /&gt;AuthName "Subversion Repository"&lt;br /&gt;AuthUserFile /etc/apache2/dav_svn.passwd&lt;br /&gt;AuthzSVNAccessFile /etc/apache2/authz_svn.access&lt;br /&gt;&lt;br /&gt;Require valid-user&lt;br /&gt;&amp;lt;/location&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;i&gt;/etc/init.d/apache2 reload&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 id="NowAgilo"&gt;Now Agilo&lt;/h2&gt;Download and unpack Agilo Source Code and then run:&lt;br /&gt;&lt;i&gt;python setup.py install&lt;/i&gt;&lt;br /&gt;&lt;i&gt;vi /trac/theproject/conf/trac.ini&lt;/i&gt; and make sure that you have  these lines&lt;br /&gt;&lt;br /&gt;[components]&lt;br /&gt;agilo.* = enabled&lt;br /&gt;webadmin.* = enabled&lt;br /&gt;&lt;br /&gt;Then run:&lt;br /&gt;&lt;i&gt;trac-admin /var/lib/trac/theproject upgrade&lt;/i&gt;&lt;br /&gt;&lt;i&gt;/etc/init.d/apache2 reload&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Add the AccountManager plugin &lt;a class="ext-link" href="http://trac-hacks.org/wiki/AccountManagerPlugin"&gt;&lt;span class="icon"&gt;&amp;nbsp;&lt;/span&gt;http://trac-hacks.org/wiki/AccountManagerPlugin&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;Then you have to configure the access control for Trac (we use the same  users for SVN and Trac): &lt;br /&gt;&lt;i&gt;htpasswd -cm /etc/apache2/dav_svn.passwd &lt;theuser&gt; &lt;username&gt;&lt;/username&gt;&lt;/theuser&gt;&lt;/i&gt; - &lt;b&gt;NB:  the -c creates the file so use it only once&lt;/b&gt;&lt;br /&gt;&lt;i&gt;vi /etc/apache2/authz_svn.access&lt;/i&gt; and have something like this:&lt;br /&gt;&lt;br /&gt;[theproject:/]&lt;br /&gt;theuser = rw&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;trac-admin /trac/theproject permission remove anonymous BROWSER_VIEW  CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW REPORT_SQL_VIEW  REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_CREATE TICKET_MODIFY  TICKET_VIEW TIMELINE_VIEW WIKI_CREATE WIKI_MODIFY WIKI_VIEW&lt;/i&gt;&lt;br /&gt;&lt;i&gt;trac-admin /trac/theproject permission add TRAC_ADMIN theadminuser&lt;/i&gt;&lt;br /&gt;&lt;i&gt;/etc/init.d/apache2 restart&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;YOU ARE DONE! &lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to add new users (as root)&lt;/b&gt;:&lt;br /&gt;&lt;i&gt;htpasswd -m /etc/apache2/dav_svn.passwd theuser&lt;/i&gt; (use -c for  the first time to create the file)&lt;br /&gt;&lt;i&gt;vi /etc/apache2/authz_svn.access&lt;/i&gt; and add the new user there with  rw&lt;br /&gt;&lt;i&gt;/etc/init.d/apache2 reload&lt;/i&gt;&lt;br /&gt;&lt;i&gt;trac-admin /trac/theproject permission add theuser  the_perm&lt;/i&gt; with THE_PERM being TEAM_MEMBER, PRODUCT_OWNER,  SCRUM_MASTER or TRAC_ADMIN&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to increase the default attachment size for documents the  wiki&lt;/b&gt;&lt;br /&gt;Change max_size value in the [attachment] section of the trac.ini of  your site &lt;br /&gt;More info on the online doc which comes with every new Trac site!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-3267612650109824885?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/3267612650109824885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2010/06/agilo-for-scrum.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/3267612650109824885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/3267612650109824885'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2010/06/agilo-for-scrum.html' title='Agilo for Scrum'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-7280594813047472443</id><published>2010-03-24T11:06:00.000+01:00</published><updated>2010-03-24T11:06:15.916+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><title type='text'>JBoss and web-console</title><content type='html'>I have been fighting with my JBoss 4.3 for a good hour now just because I want to access the web console located at htpp://localhost:8080/web-console/.&lt;br /&gt;The problem is that no matter what I set for the user in the config file, it is not taken into account.&lt;br /&gt;So here is how I got it to work:&lt;br /&gt;- Go to $JBOSS_HOME/server/default/conf/props&lt;br /&gt;- Add the files web-console-users.properties and web-console-roles.properties&lt;br /&gt;- Edit&amp;nbsp; $JBOSS_HOME/server/default/conf/login-config.xml and make sure that the path to the 2 files above looks like props/web-console-*.properties.&lt;br /&gt;&lt;br /&gt;For some fishy reasons, if you have the files right under conf/ and login-config.xml properly referring to them, it will not work. You have to have them in conf/props/ and update the reference in login-config.xml.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-7280594813047472443?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/7280594813047472443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2010/03/jboss-and-web-console.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/7280594813047472443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/7280594813047472443'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2010/03/jboss-and-web-console.html' title='JBoss and web-console'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-5102080256629822775</id><published>2010-03-16T17:51:00.001+01:00</published><updated>2010-03-16T17:58:53.233+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Seam2'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>Seamgen to Maven</title><content type='html'>As a follow-up of my previous post, I generated a Seam 2.1.2 project via seamgen and tried to make it work in the maven structure I made earlier.&lt;br /&gt;The biggest problem was with the config files and have richfaces properly working. But I managed and the tar of the project is &lt;a href="http://btcorp.dyndns.org/Tools/blogspotfiles/seamgen4co2mvn.tar"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The files I had to change where persistence.xml, pages.xml, web/pom.xml, web.xml and components.xml. &lt;br /&gt;&lt;br /&gt;Now download it, unpack, copy your Java classes and webapp generated by seamgen where they belong, run "mvn clean install package" and you should be able to deploy the .ear file without any problems (given that you have the corresponding *ds.xml file)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-5102080256629822775?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/5102080256629822775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2010/03/seamgen-to-maven.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/5102080256629822775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/5102080256629822775'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2010/03/seamgen-to-maven.html' title='Seamgen to Maven'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5508944150741454216.post-6419580213032463947</id><published>2010-03-10T16:54:00.000+01:00</published><updated>2010-03-10T17:08:30.726+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Seam2'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>Seam 2.0 and Maven</title><content type='html'>Since I am playing with Maven and Seam, I had to manage to create a Seam 2.0  project which can be built with Maven (Seam 3.0 will be fully mavenized).&lt;br /&gt;&lt;br /&gt;So here is what I found...&lt;br /&gt;All you need to know is here:&lt;br /&gt;&lt;a class="moz-txt-link-freetext" href="http://seamframework.org/Documentation/IsThereAMaven2ProjectTemplateForSeamApplications"&gt;http://seamframework.org/Documentation/IsThereAMaven2ProjectTemplateForSeamApplications&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first link  (&lt;a class="moz-txt-link-freetext" href="http://kasper.eobjects.dk/2009/04/seam-ejbs-and-ear-packaging-in-maven.html"&gt;http://kasper.eobjects.dk/2009/04/seam-ejbs-and-ear-packaging-in-maven.html&lt;/a&gt;)  works out of the box and uses sub-projects for the different modules (and  Eclipse is ok with that!) but I am a bit unsure regarding the test part. &lt;span style="font-style: italic;"&gt;&lt;/span&gt;It should work fine from the command line though.&lt;br /&gt;&lt;br /&gt;The second link (&lt;a class="moz-txt-link-freetext" href="http://www.smies.com/blog/?p=30"&gt;http://www.smies.com/blog/?p=30&lt;/a&gt;) seems to have the test part  built in but I have not tested it yet. It also uses a flat structure for the  project which is a bit less nice...&lt;br /&gt;&lt;br /&gt;So after a bit of work, I improved Kasper's setup so that the project now  has a persistence unit defined (remember to add a proper *ds.xml file in your deploy folder) and is also able to do some sort of hot-deploy. You can get the tar file &lt;a href="http://btcorp.dyndns.org/Tools/blogspotfiles/jm-mvn-seam.v3.final.tar"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For the hot-deploy part, I used something described here  (&lt;a class="moz-txt-link-freetext" href="http://relation.to/Bloggers/FastAndIncrementalPackagingInJBossTools"&gt;http://relation.to/Bloggers/FastAndIncrementalPackagingInJBossTools&lt;/a&gt;) which  copies files automatically upon changes from your workspace to your deploy  folder (or any other folder of your choosing) according to some rules so you can  filter the files you do not want.&lt;br /&gt;This JBoss Tools might be interesting in other cases as well...&lt;span class="moz-smiley-s1"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So to have the hot-deploy working, I configured the Project archives like this:&lt;br /&gt;- one exploded archive for the ear&lt;br /&gt;- one exploded archive for the jar, exploded inside the ear above&lt;br /&gt;- one exploded archive for the war, exploded inside the ear above, and with 2  file sets (one taking all from web/src/main/webapp (aka the xhtml files) and the  other taking all from web/target/JMSeamExample-web-1.0 minus **/*.*html  (basically only the libs)).&lt;br /&gt;An explanatory picture can be found &lt;a href="http://btcorp.dyndns.org/Tools/blogspotfiles/ProjectArchiveSetup.png"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If one changes a Java class, the best is to right click on the project in  Project archives and  choose "Build full" to force a redeploy. Otherwise for  xhtml files it happens by itself.&lt;br /&gt;I know it is not has seamless as with the out of the box seam-gen integration  but it is not too bad.&lt;span class="moz-smiley-s1"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5508944150741454216-6419580213032463947?l=minibiti.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://minibiti.blogspot.com/feeds/6419580213032463947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://minibiti.blogspot.com/2010/03/seam-20-and-maven.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/6419580213032463947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5508944150741454216/posts/default/6419580213032463947'/><link rel='alternate' type='text/html' href='http://minibiti.blogspot.com/2010/03/seam-20-and-maven.html' title='Seam 2.0 and Maven'/><author><name>Bambitroll</name><uri>http://www.blogger.com/profile/05842518643786066659</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
