<?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-3305419975676030648</id><updated>2011-12-30T16:10:16.365+01:00</updated><category term='technology'/><category term='nexus'/><category term='jcr'/><category term='tools'/><category term='installation'/><category term='solder'/><category term='ecm'/><category term='jboss seam'/><category term='development'/><category term='junit'/><category term='daniel'/><category term='glassfish'/><category term='maven'/><category term='bartosz'/><category term='service'/><category term='general'/><category term='query'/><category term='erik jan'/><category term='osgi'/><category term='jrebel'/><category term='andreas'/><category term='basil'/><category term='webcast'/><category term='ejb'/><category term='javaone'/><category term='spring'/><category term='devoxx'/><category term='portal'/><category term='cdi'/><category term='domenico'/><category term='phuong'/><category term='bea'/><category term='eclipse'/><category term='jee'/><category term='piyush'/><category term='wls'/><category term='maven 3'/><category term='jackrabbit'/><category term='applicationserver'/><category term='jsf2'/><category term='cloud computing'/><category term='java'/><category term='stefan'/><category term='howto'/><category term='programming'/><category term='thomas'/><category term='pencast'/><category term='cdi extension'/><category term='jason van zyl'/><category term='sylvain'/><category term='oracle'/><category term='openworld'/><category term='webservice'/><category term='rest'/><category term='hello world'/><category term='people'/><category term='integration'/><category term='appengine'/><category term='jpa'/><category term='chris'/><category term='jboss'/><category term='arquillian'/><category term='summary'/><category term='ubuntu'/><category term='douglas'/><category term='testing'/><category term='jazoon'/><category term='content'/><category term='forge'/><category term='conferences'/><category term='balz'/><category term='google'/><title type='text'>CTP Java Competence</title><subtitle type='html'>Cambridge Technology Partners Switzerland</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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>66</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-5434980091165110955</id><published>2011-11-22T11:25:00.000+01:00</published><updated>2011-11-22T11:25:00.673+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jpa'/><category scheme='http://www.blogger.com/atom/ns#' term='arquillian'/><category scheme='http://www.blogger.com/atom/ns#' term='query'/><category scheme='http://www.blogger.com/atom/ns#' term='solder'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><category scheme='http://www.blogger.com/atom/ns#' term='cdi'/><title type='text'>CDI Query Module First Alpha Released!</title><content type='html'>&lt;br /&gt;It's been some months now since we started &lt;a href="http://ctpjava.blogspot.com/2011/04/cdi-extension-for-query-generation.html"&gt;exploring CDI extensions&lt;/a&gt; as a small&amp;nbsp;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, Verdana, sans-serif; font-size: 14px;"&gt;exercise&lt;/span&gt;. As it turned out, the exercise forged into something usable which we're pushing now in the open as a first Alpha shot.&lt;br /&gt;&lt;br /&gt;So I'm happy to announce the availability of the &lt;a href="http://ctpconsulting.github.com/query"&gt;CDI Query Module&lt;/a&gt; on &lt;a href="http://search.maven.org/#search%7Cga%7C1%7Ccdi-query" target="_blank"&gt;Maven Central&lt;/a&gt;! The module helps you creating JPA queries with much less boilerplate, and is of course leveraging the CDI extension API as well as &lt;a href="http://seamframework.org/Seam3/Solder"&gt;Seam Solder&lt;/a&gt;. Some of the feature highlights are:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Query By Name&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Assuming you have a Person entity which looks probably similar to this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="java" name="code"&gt;@Entity&lt;br /&gt;public class Person { &lt;br /&gt;&lt;br /&gt;    ... // primary key etc. skipped&lt;br /&gt;&lt;br /&gt;    @Getter @Setter&lt;br /&gt;    private String firstName;&lt;br /&gt;    &lt;br /&gt;    @Getter @Setter&lt;br /&gt;    private String lastName;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can simply create a DAO interface to query for Persons:&lt;br /&gt;&lt;br /&gt;&lt;pre class="java" name="code"&gt;@Dao&lt;br /&gt;public interface PersonDao extends EntityDao&amp;lt;Person, Long&amp;gt; {&lt;br /&gt;&lt;br /&gt;    Person findByFirstNameAndLastName(String firstName, String lastName);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This interface does not need to be implemented. A client can just inject it, call the interface method and in the background, the JPA query is automatically created and executed. To create the query, the method name is analyzed and matching the name to entity properties.&lt;br /&gt;&lt;br /&gt;&lt;pre class="java" name="code"&gt;public class PersonAction {&lt;br /&gt;&lt;br /&gt;    @Inject&lt;br /&gt;    private PersonDao personDao;&lt;br /&gt;    &lt;br /&gt;    public void lookup() {&lt;br /&gt;        person = personDao.findByFirstNameAndLastName(firstName, lastName);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note that the base interface contains also a couple of other methods which you might also expect from an entity DAO. Ideally, you should not need to inject an EntityManager anymore.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Query by Query Strings and Named Queries&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Of course matching property names is not extremely safe to refactorings (some more validation support here is on the roadmap) - if you like to have more control over your JPA queries, you can also annotate the method with the query to execute:&lt;br /&gt;&lt;br /&gt;&lt;pre class="java" name="code"&gt;@Dao&lt;br /&gt;public interface PersonDao extends EntityDao&amp;lt;Person, Long&amp;gt; {&lt;br /&gt;&lt;br /&gt;    @Query("select p from Person p where p.ssn = ?1")&lt;br /&gt;    Person findBySSN(String ssn);&lt;br /&gt;&lt;br /&gt;    @Query(named=Person.BY_FULL_NAME)&lt;br /&gt;    Person findByFullName(String firstName, String lastName);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Criteria API Simplifications&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you're not a big fan of query strings but rather prefer using the JPA 2 criteria API, we also allow to simplify this with a small utility API:&lt;br /&gt;&lt;br /&gt;&lt;pre class="java" name="code"&gt;public abstract class PersonDao extends AbstractEntityDao&amp;lt;Person, Long&amp;gt; {&lt;br /&gt;&lt;br /&gt;    public List&amp;lt;Person&amp;gt; findAdultFamilyMembers(String name, Integer minAge) {&lt;br /&gt;        return criteria()&lt;br /&gt;                    .like(Person_.name, "%" + name + "%")&lt;br /&gt;                    .gtOrEq(Person_.age, minAge)&lt;br /&gt;                    .eq(Person_.validated, Boolean.TRUE)&lt;br /&gt;                    .orderDesc(Person_.age)&lt;br /&gt;                    .createQuery()&lt;br /&gt;                    .getResultList();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;All the code is &lt;a href="http://ctpconsulting.github.com/query" target="_blank"&gt;hosted&lt;/a&gt; and &lt;a href="http://ctpconsulting.github.com/query" target="_blank"&gt;documented&lt;/a&gt; on GitHub. Please:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Give feedback! If you find this useful or actually not so, we're happy to hear what is still missing.&lt;/li&gt;&lt;li&gt;Participate! Forking and creating pull requests are really a breeze on GitHub :-)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Credits:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2010/08/java-people-spotlight-bartek-majsak.html" target="_blank"&gt;Bartek Majsak&lt;/a&gt; for improving the initial code, taking care about quality reports and soon finalizing the stuff on the validation branch ;-) (just kidding, check out Bartek's &lt;a href="https://github.com/arquillian/arquillian-extension-persistence" target="_blank"&gt;cool work on the Arquillian Persistence Module&lt;/a&gt;!)&lt;/li&gt;&lt;li&gt;&lt;a href="http://grails.org/doc/latest/guide/5.%20Object%20Relational%20Mapping%20(GORM).html" target="_blank"&gt;Grails GORM&lt;/a&gt; for inspiring me for this Java implementation&lt;/li&gt;&lt;li&gt;The CDI folks for a really great specification&lt;/li&gt;&lt;li&gt;Last but not least the &lt;a href="http://www.jboss.org/arquillian" target="_blank"&gt;Arquillian guys&lt;/a&gt;, developing and testing this stuff is pure fun with Arquillian!&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-5434980091165110955?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/5434980091165110955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=5434980091165110955' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5434980091165110955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5434980091165110955'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2011/11/cdi-query-module-first-alpha-released.html' title='CDI Query Module First Alpha Released!'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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>9</thr:total><georss:featurename>Flughafen Zürich (ZRH), 8058 Zürich-Flughafen, Switzerland</georss:featurename><georss:point>47.4504 8.5619</georss:point><georss:box>47.428925 8.522418 47.471875000000004 8.601382</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-6520653026374549303</id><published>2011-11-11T15:24:00.002+01:00</published><updated>2011-11-11T16:31:13.354+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='forge'/><category scheme='http://www.blogger.com/atom/ns#' term='jrebel'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>JBoss Forge JRebel Plugin - Video Tutorial</title><content type='html'>It's actually out for quite a while now (and therefore already slighly out of date) but I have hardly found some time to blog about it: If you're using &lt;a href="http://zeroturnaround.com/jrebel/" target="_blank"&gt;JRebel&lt;/a&gt; and &lt;a href="https://docs.jboss.org/author/display/FORGE/Home" target="_blank"&gt;JBoss Forge&lt;/a&gt;, have a look at this &lt;a href="http://www.youtube.com/watch?v=oxCIGjFGI7o&amp;amp;hd=1" target="_blank"&gt;Video tutorial&lt;/a&gt; how to use both of them together. &lt;br /&gt;&lt;br /&gt;&lt;iframe class="youtube-player" frameborder="0" height="385" src="http://www.youtube.com/embed/oxCIGjFGI7o" type="text/html" width="640"&gt;&amp;amp;lt;p&amp;amp;gt;&amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;amp;amp;gt;&amp;amp;lt;/p&amp;amp;gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Make sure to watch it in HD and full screen mode. Thanks to &lt;a href="http://ctpjava.blogspot.com/2008/09/java-people-spotlight-christoph-reimann.html"&gt;Chris "Kubrik" Reimann&lt;/a&gt; for putting the tutorial together!&lt;br /&gt;&lt;br /&gt;As an addition, Forge now also supports checking out specific versions of a plugin, which is in our case version 1.0.0.Beta1 of the JRebel plugin. We've also added the plugin to the Forge plugin repository index so you can search for it.&lt;br /&gt;&lt;br /&gt;By the way, if you're only using one of the tools or (even worse) none of them, this is the perfect opportunity to get a quick hands-on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-6520653026374549303?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/6520653026374549303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=6520653026374549303' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6520653026374549303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6520653026374549303'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2011/11/seam-forge-jrebel-plugin-videotutorial.html' title='JBoss Forge JRebel Plugin - Video Tutorial'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/oxCIGjFGI7o/default.jpg' height='72' width='72'/><thr:total>1</thr:total><georss:featurename>Flughafen Zürich (ZRH), 8058 Zürich-Flughafen, Switzerland</georss:featurename><georss:point>47.4504 8.5619</georss:point><georss:box>47.428925 8.522418 47.471875000000004 8.601382</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-5961712774368760442</id><published>2011-04-04T18:24:00.004+02:00</published><updated>2011-04-04T18:54:32.995+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arquillian'/><category scheme='http://www.blogger.com/atom/ns#' term='cdi extension'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='cdi'/><title type='text'>A CDI Extension for Query Generation</title><content type='html'>While the DAO pattern has come out of fashion with Java EE 6, it can still be a useful approach to centralize query related logic when you have to do more than just delegating to the entity manager. Often this approach leads then to small frameworks containing reusable code within a project, or also sometimes into a bigger framework spreading over complete IT departments within a company.&lt;br /&gt;&lt;br /&gt;Inspired by features of &lt;a href="http://grails.org/doc/latest/guide/5.%20Object%20Relational%20Mapping%20(GORM).html" target="_blank"&gt;Grails&lt;/a&gt; or the &lt;a href="http://static.springsource.org/spring-data/data-jpa/docs/1.0.0.M1/reference/html/" target="blank"&gt;Spring Data JPA&lt;/a&gt; project, my plan was to learn more about &lt;a href="http://docs.jboss.org/weld/reference/latest/en-US/html/extend.html"&gt;CDI extensions&lt;/a&gt; by implementing a proof of concept on such a DAO framework based on CDI. CDI is part of Java EE 6 and, already by itself a powerful addition to the platform programming model, provides SPIs to extend it even further. A prominent sample is the &lt;a href="http://seamframework.org/Seam3" target="_blank"&gt;Seam framework&lt;/a&gt;, which in its latest version contains a lot of those extensions. Just drop them in your classpath and they are ready for use. Impressive enough to learn more about the technology.&lt;br /&gt;&lt;br /&gt;While I was getting my hands dirty it seemed to me the result is useful enough to share it here - and also of course to demonstrate the power and easiness of creating CDI extensions. In this article  I’ll give you a quick start on CDI extensions as well as (hopefully) an idea on how a portable framework might look like based on this technology. All code presented here is available on &lt;a href="https://github.com/ctpconsulting/query" target="_blank"&gt;GitHub&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The DAO Framework&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Some common ingredients of a DAO framework are captured in the code snippet below:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Dao&lt;br /&gt;public interface SimpleDao extends EntityDao&amp;lt;Simple, Long&amp;gt; {&lt;br /&gt;    &lt;br /&gt;    Simple findByNameAndEnabled(String name, Boolean enabled);&lt;br /&gt;&lt;br /&gt;    @Query(named=Simple.BY_NAME)&lt;br /&gt;    List&amp;lt;Simple&amp;gt; findByNamedQuery(String name);&lt;br /&gt;    &lt;br /&gt;    @Query(named=Simple.BY_NAME)&lt;br /&gt;    List&amp;lt;Simple&amp;gt; findByNamedQueryRestricted(String name, &lt;br /&gt;            @MaxResults int max, @FirstResult int first);&lt;br /&gt;    &lt;br /&gt;    @Query(named=Simple.BY_ID)&lt;br /&gt;    Simple findByNamedQueryNamedParams(&lt;br /&gt;            @QueryParam("id") Long id, &lt;br /&gt;            @QueryParam("enabled") Boolean enabled);&lt;br /&gt;    &lt;br /&gt;    @Query("select s from Simple s where s.name = ?1")&lt;br /&gt;    Simple findByQueryString(String name);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Typically a DAO framework has a common interface concrete DAOs can extend from. Using generics here allows to have a standard set of methods like saving or retrieving all entities of a specific type, and can also be used during query generation. Usually this is nothing that cannot be done easily with an entity manager. But once you have injected a DAO in your service class - do you really want to inject the entity manager as well? In order to keep code leaner, a DAO base interface should provide this kind of methods and of course implement them all automagically - nothing you would like to rewrite again and again.&lt;br /&gt;&lt;br /&gt;Some other features are shown in the method declarations above. Automatic query generation out of method names and parameters as GORM method expressions do, or creating queries based on annotation meta data and parameters will often allow just leaving those easy cases to the query generator and keep the code lean to focus on the complex ones.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The CDI Approach&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;One way to implement such a framework is over a CDI extension. CDI allows extensions to listen to various lifecycle events:&lt;br /&gt;- Before CDI starts discovering beans.&lt;br /&gt;- While it processes annotated types, injection targets, producers, beans and observers.&lt;br /&gt;- And when it finishes with both discovery and validation.&lt;br /&gt;&lt;br /&gt;As in our case we are dealing with plain interfaces, the easiest approach is to simply annotate the interface and then listen for annotation processing events. The sample above shows a Dao annotation on the interface, but this would be placed on the extended AbstractEntityDao interface so developers won’t have to worry about it.&lt;br /&gt;&lt;br /&gt;So on the extension we listen for annotated types, check if it is our Dao annotation and register a proxy bean which implements the annotated type. Registering the extension a matter of two things:&lt;br /&gt;1. Implementing the extension class and listen for the Dao annotation.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;public class QueryExtension implements Extension {&lt;br /&gt;&lt;br /&gt;    &amp;lt;X&amp;gt; void processAnnotatedType(@Observes ProcessAnnotatedType&amp;lt;X&amp;gt; event, BeanManager beanManager) {&lt;br /&gt;        // all the required information on the type is found in the event&lt;br /&gt;        // the bean manager is used to register the proxy&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;2. Register the extension class as a service provider in the appropriate file (META-INF/services/javax.enterprise.inject.spi.Extension).&lt;br /&gt;&lt;br /&gt;Registering the proxy with the bean manager is slightly more work, but luckily someone has already done that. If you work with CDI extensions, make sure to include &lt;a href="http://docs.jboss.org/seam/3/solder/latest/reference/en-US/html/" target="_blank"&gt;Seam Solder&lt;/a&gt; - the Swiss army knife for CDI developers. Solder has built-in support for so called &lt;a href="http://docs.jboss.org/seam/3/solder/latest/reference/en-US/html/servicehandler.html" target="_blank"&gt;service handlers&lt;/a&gt;, where you annotate an abstract type with a reference to the handler class. The documentation use case looks probably kind of familiar ;-) All our extension will have to do is to override the handler lookup - and we’re done with registering the proxy! The reason we don't use the ServiceHandlerExtension directly is to separate the handler reference from the annotation, and that we can have a chance to e.g. validate and process further meta data in the extension class.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;public class QueryExtension extends ServiceHandlerExtension {&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    protected &amp;lt;X&amp;gt; Class&amp;lt;?&amp;gt; getHandlerClass(ProcessAnnotatedType&amp;lt;X&amp;gt; event) {&lt;br /&gt;        if (event.getAnnotatedType().isAnnotationPresent(Dao.class)) {&lt;br /&gt;            return QueryHandler.class;&lt;br /&gt;        }&lt;br /&gt;        return null;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class QueryHandler {&lt;br /&gt;&lt;br /&gt;    @Inject&lt;br /&gt;    private Instance&amp;lt;EntityManager&amp;gt; entityManager;&lt;br /&gt;    &lt;br /&gt;    @AroundInvoke&lt;br /&gt;    public Object handle(InvocationContext ctx) throws Exception {&lt;br /&gt;        ...&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The handler class simply has to provide a public method annotated with @AroundInvoke, where you get all the required information to build up your query dynamically. Note that in the handler class you will also be able to use CDI services like injection.&lt;br /&gt;As a framework user, all you will have to do is to drop the JAR in the classpath and annotate the interface. Look mom, no XML! Well almost, you still need an (empty) beans.xml somewhere to activate all the CDI magic.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Testing the Extension&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://docs.jboss.org/arquillian/reference/latest/en-US/html_single/" target="_blank"&gt;Arquillian&lt;/a&gt; is a relatively new testing framework which allows you to create dynamic deployment units and run them in a container. A great feature for an extension as you can easily test it live in a unit test without leaving the IDE! This looks like the following:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@RunWith(Arquillian.class)&lt;br /&gt;public class QueryHandlerTest {&lt;br /&gt;    &lt;br /&gt;    @Deployment&lt;br /&gt;    public static Archive&amp;lt;?&amp;gt; deployment() {&lt;br /&gt;        return ShrinkWrap.create(WebArchive.class, "test.war")&lt;br /&gt;                .addClasses(QueryExtension.class)&lt;br /&gt;                .addAsWebInfResource("test-persistence.xml", ArchivePaths.create("classes/META-INF/persistence.xml"))&lt;br /&gt;                .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))&lt;br /&gt;                .addAsWebInfResource("glassfish-resources.xml")&lt;br /&gt;                .addClasses(SimpleDao.class)&lt;br /&gt;                .addPackage(Simple.class.getPackage());&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    @Inject&lt;br /&gt;    private SimpleDao dao;&lt;br /&gt;    &lt;br /&gt;    @Produces&lt;br /&gt;    @PersistenceContext&lt;br /&gt;    private EntityManager entityManager;&lt;br /&gt;    &lt;br /&gt;    @Test&lt;br /&gt;    public void shouldCreateQueryByMethodName() {&lt;br /&gt;        // given&lt;br /&gt;        final String name = "testCreateQueryByMethodName";&lt;br /&gt;        createSimple(name);&lt;br /&gt;        &lt;br /&gt;        // when&lt;br /&gt;        Simple result = dao.findByNameAndEnabled(name, Boolean.TRUE);&lt;br /&gt;        &lt;br /&gt;        // then&lt;br /&gt;        Assert.assertNotNull(result);&lt;br /&gt;        Assert.assertEquals(name, result.getName());&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This creates a stripped down web archive deployment, in this sample for an embedded GlassFish. The test class itself is registered as a bean in the test and can therefore use injections (CDI or container injections, see the @PersistenceContext). Resources like persistence units can be added on demand as we see in the deployment method (persistence.xml for the persistence unit, glassfish-resources.xml contains a data source definition).&lt;br /&gt;&lt;br /&gt;The container gets started and we can see our injected proxy in action. In the sample above we then create some test data and see if our generated query fetches the right data back.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Of course this article is a very simplified version of the whole setup - especially the Arquillian setup required some trial and error as the framework is still in Alpha (if anybody finds out how to create the data source without deploying the glassfish-resources.xml into a web archive - let me know). &lt;br /&gt;&lt;br /&gt;Check out the project source on &lt;a href="https://github.com/ctpconsulting/query" target="_blank"&gt;GitHub&lt;/a&gt; to get started. The module structure might look a little complicate but it follows common Seam module structure separating API (in our case the client annotations) from implementation (the extension code). Documentation is still "basic" but looking at the unit tests might give an indication on the usage.&lt;br /&gt;&lt;br /&gt;Once the project setup is done, things get extremely productive though. Seam Solder provides a rich tool set you can use to create an extension, Arquillian lets you immediately test your code inside a container. The result is an easy to reuse and easy to distribute framework you will probably get back to in many of your following Java EE 6 projects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-5961712774368760442?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/5961712774368760442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=5961712774368760442' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5961712774368760442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5961712774368760442'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2011/04/cdi-extension-for-query-generation.html' title='A CDI Extension for Query Generation'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-2125394507798961092</id><published>2011-03-18T14:35:00.001+01:00</published><updated>2011-03-21T17:03:19.996+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='service'/><category scheme='http://www.blogger.com/atom/ns#' term='hello world'/><category scheme='http://www.blogger.com/atom/ns#' term='osgi'/><category scheme='http://www.blogger.com/atom/ns#' term='andreas'/><title type='text'>Introduction to OSGi</title><content type='html'>&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;" id="internal-source-marker_0.6541155833928415"&gt;As  my first blog entry here I want to introduce you to the OSGi framework.  It allows you to build Java applications with high modularity and I  believe that this technology will become more and more important in the  future. The goal of this introduction is that the reader has a quick  overview about the OSGi framework and that he understands the benefits  of it. Further, this should be an introduction to my planned series of  Eclipse plug-in development.&lt;/span&gt;&lt;br /&gt;  &lt;h2 style="margin:20px 0 20px 0;" style="margin:20px 0 20px 0;"&gt;&lt;span style="font-size: 18pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;1 What is OSGi?&lt;/span&gt;&lt;/h2&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The &lt;/span&gt;&lt;a href="http://www.osgi.org/"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 153); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline;"&gt;OSGi Alliance&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;  (formerly known as Open Services Gateway initiative, now an obsolete  name), founded in March 1999, originally specified and maintains the &lt;/span&gt;&lt;a href="http://www.osgi.org/Release4/HomePage"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 153); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline;"&gt;OSGi specification&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;.  This specification allows you to write so called bundles, self  contained modules that can provide functionality to other bundles. There  are several implementations of this specification, the most common ones  are:&lt;/span&gt; &lt;ul&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Eclipse Equinox&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Apache Felix&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Knoplerfish&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;br /&gt;  &lt;h3 style="margin:15px 0 15px 10px;"&gt;&lt;span style="font-size: 14pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;1.1 Why OSGi?&lt;/span&gt;&lt;/h3&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;As  mentioned before, the OSGi specification aims to create Java  applications with extremely high modularity. Of course, this is what  every developer aims at, but OSGi encourages and supports you in doing  so. Also a great feature is that you can install or uninstall such  bundles during runtime of the application without restarting it. It also  supports lazy loading. This means that you can configure a bundle to be  loaded when it’s called the first time. This truly increases the  performance of an application. The OSGi specification also defines some  useful services, that have to be provided by an OSGi implementation.&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;What does that mean to CTP? As high modularity is becoming more and more important, clients will have the need to extend their application. As seen in the sM-Client project, for example, the client wants to make small extensions like custom forms without packaging a whole new release. Which is quite understandable. Now a plug-in style mechanism is evaluated, but there may be problems, especially with classloading, which are well solved in OSGi.&lt;/span&gt;&lt;br /&gt;  &lt;h2 style="margin:20px 0 20px 0;"&gt;&lt;span style="font-size: 18pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;2 Architecture&lt;/span&gt;&lt;span style="font-size: 14pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/h2&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The OSGi framework is based on several Layers:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Security layer:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; The OSGi Security Layer is an optional layer that underlies the OSGi Service&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Platform. The layer is based on the Java 2 security architecture. It provides&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;the infrastructure to deploy and manage applications that must run in finegrained&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;controlled environments.&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Module layer:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;  The Module Layer is responsible for the packaging of the modules  (“bundles”), those are simple JAR files which follow some requirements. I  will explain more about bundles in section 2.1.&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Life cycle layer:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;  This layer gives you the possibility to install, uninstall, start and  stop bundles inside an application framework without restarting the  whole framework, (e.g. if you contribute a bug fix inside a bundle).  This also increases the availability of your application framework.&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Service Layer: &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The  Service Layer enables you to provide OSGi services to other bundles. An  OSGi service is nothing but a POJO, that is registered in the &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Service Registry&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; and can be referenced from everywhere outside the declaring bundle. The service has to implement an agreed interface.&lt;/span&gt;&lt;span style="font-size: 14pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://lh5.googleusercontent.com/BcerVUV-fxSlfE6BKo-fVT0ecvt4aA8I48biV0r-ussrJlfO7dRIZUAknAUDRLou_71lOX3LPXZ6KFSaoTuEgM3vjeLNRiK_QFiwwJhnL1_Zb509AQ" width="300px;" height="240px;" /&gt;&lt;br /&gt;  &lt;h3 style="margin:15px 0 15px 10px;"&gt;&lt;span style="font-size: 14pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;2.1 Bundles&lt;/span&gt;&lt;/h3&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;As  the description of the Module Layer says, a bundle is a plain old JAR  file. But it has some special characteristics. There has to be a  MANIFEST.MF file in the META-INF directory, which is located at the root  of the JAR file (see the &lt;/span&gt;&lt;a href="http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 153); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline;"&gt;JAR specification&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;).  This file provides several meta information about the bundle like  dependencies, exported and imported packages etc. Note, that in  difference to a normal JAR file, all packages are hidden by default to  other bundles. So you have to define which packages are exported and  therefore are accessible from other bundles. Additionally, you have to  specify which packages you want to import from other bundles. Also you  can define required bundles, which will import all exported packages of  the required bundles. Let’s have a look at an example MANIFEST.MF file:&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="plain"&gt;&lt;br /&gt;Bundle-Name: Hello World&lt;br /&gt;Bundle-SymbolicName: com.ctp.helloworld&lt;br /&gt;Bundle-Description: A Hello World bundle&lt;br /&gt;Bundle-ManifestVersion: 2&lt;br /&gt;Bundle-Version: 1.0.0&lt;br /&gt;Bundle-Activator: com.ctp.Activator&lt;br /&gt;Export-Package: com.ctp.helloworld;version="1.0.0"&lt;br /&gt;Import-Package: org.osgi.framework;version="1.3.0"&lt;br /&gt;Require-Bundle: com.ctp.other;bundle-version="2.5.0"&lt;br /&gt;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;These configuration elements are explained as follows:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt; &lt;ul&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle-Name:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; Defines a human-readable name for this bundle, Simply assigns a short name to the bundle.&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle-SymbolicName:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;  The only required header, this entry specifies a unique identifier for a  bundle, based on the reverse domain name convention (also used by the  java packages).&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle-Description:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; A description of the bundle's functionality.&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle-ManifestVersion:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; This little known header indicates the OSGi specification to use for reading this bundle.&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle-Version:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; Designates a version number to the bundle.&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle-Activator:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; Indicates the class name to be invoked once a bundle is activated.&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Export-Package:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; Expresses what Java packages contained in a bundle will be made available to the outside world.&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Import-Package:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; Indicates what Java packages will be required from the outside world, in order to fulfill the dependencies needed in a bundle.&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Require-Bundle:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;  Indicates what OSGi bundles will be required from the application  framework. This will import all exported packages from the specified  bundle(s).&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle-RequiredExecutionEnvironment:&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; Specifies the minimum execution environment(s) required to run this bundle.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;br /&gt;  &lt;h4 style="margin:10px 0 10px 10px;"&gt;&lt;span style="font-size: 12pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;2.1.1 Bundle life cycles&lt;/span&gt;&lt;/h4&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;A bundle’s life cycle could have the following states (managed by OSGi’s Life Cycle Layer):&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt; &lt;table style="border: medium none; border-collapse: collapse;"&gt;   &lt;tbody&gt;&lt;tr style="height: 28px;"&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; background-color: rgb(204, 204, 204); padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle State&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; background-color: rgb(204, 204, 204); padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Description&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 0px;"&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;INSTALLED&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The bundle has been successfully installed.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 0px;"&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;RESOLVED&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;All  Java classes that the bundle needs are available. This state indicates  that the bundle is either ready to be started or has stopped.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 0px;"&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;STARTING&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The bundle is being started, the &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;BundleActivator.start&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;  method will be called, and this method has not yet returned. When the  bundle has an activation policy, the bundle will remain in the &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;STARTING&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; state until the bundle is activated according to its activation policy.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 0px;"&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;ACTIVE&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The bundle has been successfully activated and is running; its Bundle Activator start method has been called and returned.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 0px;"&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;STOPPING&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The bundle is being stopped. The &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;BundleActivator.stop&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; method has been called but the stop method has not yet returned.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="height: 0px;"&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;UNINSTALLED&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px dotted rgb(170, 170, 170); vertical-align: top; padding: 7px;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The bundle has been uninstalled. It cannot move into another state.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;  &lt;br /&gt;  &lt;h3 style="margin:15px 0 15px 10px;"&gt;&lt;span style="font-size: 14pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;2.2 OSGi Services&lt;/span&gt;&lt;/h3&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;OSGi  Services are Java objects, that implement agreed interfaces. This means  that the Service itself is defined by a Java interface and the bundles  which use the service don’t have to know where the specific  implementation actually is. The following is a simple OSGi Service:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The service interface:&lt;/span&gt;&lt;pre name="code" class="java"&gt;public interface HelloWorld {&lt;br /&gt;    public String getMessage();&lt;br /&gt;}&lt;/pre&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The service implementation:&lt;/span&gt;&lt;pre name="code" class="java"&gt;package com.ctp.helloworld.service.impl;&lt;br /&gt;&lt;br /&gt;import com.ctp.helloworld.service.HelloWorld;&lt;br /&gt;&lt;br /&gt;class HelloWorldImpl implements HelloWorld {&lt;br /&gt;    @Override&lt;br /&gt;    public String getMessage() {&lt;br /&gt;        return “Hello World”;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Now,  without any tools like Spring Dynamic Modules, iPOJO or Declarative  Services, we have to register our service manually so that it can be  accessed by other bundles. I will explain this in the following section.&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Please  note that the -Impl naming convention does not really make sense in  OSGi, since it’s possible to have multiple implementations of one  service, it was just the easiest for this example.&lt;/span&gt;&lt;br /&gt;  &lt;h2 style="margin:20px 0 20px 0;"&gt;&lt;span style="font-size: 18pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;3 Example&lt;/span&gt;&lt;/h2&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Let’s write a simple bundle that contains the HelloWorld service we created above. First, download an OSGi framework (I’m using &lt;/span&gt;&lt;a href="http://download.eclipse.org/equinox/drops/R-3.6-201006080911/index.php"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 153); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline;"&gt;Equinox 3.6&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;,  but this example should work on all implementations since it’s very  basic). This example is made as you could get going without any special  IDE. The source code can be downloaded &lt;a href="http://code.google.com/p/ctpjava/downloads/detail?name=com.ctp.helloworld.zip&amp;amp;can=2&amp;amp;q="&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Copy the downloaded jar file to a location where you would like to start your application (further called &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$APP_HOME&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;).&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Now create a work folder, where your source files are (further called &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$SRC_HOME&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;).&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Create the following folders and files:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$SRC_HOME/com/ctp/helloworld/service/HelloWorld.java&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$SRC_HOME/com/ctp/helloworld/service/impl/HelloWorldImpl.java&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$SRC_HOME/com/ctp/helloworld/Activator.java&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$SRC_HOME/META-INF/MANIFEST.MF&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The MANIFEST.MF file is very basic and should have the following contents:&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="plain"&gt;&lt;br /&gt;Manifest-Version: 1.0&lt;br /&gt;Bundle-ManifestVersion: 2&lt;br /&gt;Bundle-Name: Hello World&lt;br /&gt;Bundle-SymbolicName: com.ctp.helloworld&lt;br /&gt;Bundle-Version: 1.0.0&lt;br /&gt;Bundle-Activator: com.ctp.helloworld.Activator&lt;br /&gt;Bundle-Vendor: CTP&lt;br /&gt;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&lt;br /&gt;Import-Package: org.osgi.framework;version="1.3.0"&lt;br /&gt;Bundle-ActivationPolicy: lazy&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Make  sure you have a carriage return and/or newline character at the end of  the last line as this is required (see manifest specification in the &lt;/span&gt;&lt;a href="http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 153); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline;"&gt;JAR specification&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;).&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Let’s create the OSGi Service as the example in section 2.2:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$SRC_HOME/com/ctp/helloworld/service/HelloWorld.java:&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="java"&gt;&lt;br /&gt;package com.ctp.helloworld.service;&lt;br /&gt;&lt;br /&gt;public interface HelloWorld {&lt;br /&gt;    public String getMessage();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$SRC_HOME/com/ctp/helloworld/service/impl/HelloWorldImpl.java:&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;package com.ctp.helloworld.service.impl;&lt;br /&gt;&lt;br /&gt;import com.ctp.helloworld.service.HelloWorld;&lt;br /&gt;&lt;br /&gt;public class HelloWorldImpl implements HelloWorld {&lt;br /&gt;&lt;br /&gt;   @Override&lt;br /&gt;   public String getMessage() {&lt;br /&gt;       return "Hello World";&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The defined activator (&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$SRC_HOME/com/ctp/helloworld/Activator.java)&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; should have the following contents so that it is able to run:&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;package com.ctp.helloworld;&lt;br /&gt;&lt;br /&gt;import org.osgi.framework.BundleActivator;&lt;br /&gt;import org.osgi.framework.BundleContext;&lt;br /&gt;&lt;br /&gt;public class Activator implements BundleActivator {&lt;br /&gt;&lt;br /&gt;   private static BundleContext context;&lt;br /&gt;&lt;br /&gt;   static BundleContext getContext() {&lt;br /&gt;       return context;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void start(BundleContext bundleContext) throws Exception {&lt;br /&gt;       Activator.context = bundleContext;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void stop(BundleContext bundleContext) throws Exception {&lt;br /&gt;       Activator.context = null;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;  &lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;At  this state, the OSGi bundle should be ready to compile and deploy it.  But first, we want to register our service. We do this in the method &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.helloworld.Activator#start:&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;import org.osgi.framework.ServiceReference;&lt;br /&gt;import com.ctp.helloworld.service.HelloWorld;&lt;br /&gt;import com.ctp.helloworld.service.impl.HelloWorldImpl;&lt;br /&gt;...&lt;br /&gt;public void start(BundleContext bundleContext) throws Exception {&lt;br /&gt;   System.out.println("Registering HelloWordld service...");&lt;br /&gt;&lt;br /&gt;   // this will register the service in the Service Registry&lt;br /&gt;   bundleContext.registerService(HelloWorld.class.getName(), new HelloWorldImpl(), null);&lt;br /&gt;&lt;br /&gt;   // Test the availability of the service&lt;br /&gt;   ServiceReference ref = bundleContext.getServiceReference(HelloWorld.class.getName());&lt;br /&gt;&lt;br /&gt;   if(ref == null) {&lt;br /&gt;      System.out.println("Service is not registered...");&lt;br /&gt;   } else {&lt;br /&gt;      // it’s also possible to get an array of services...&lt;br /&gt;      HelloWorld service = (HelloWorld)bundleContext.getService(ref);&lt;br /&gt;      System.out.println("HelloWorld#getMessage(): " + service.getMessage());&lt;br /&gt;   }&lt;br /&gt;   Activator.context = bundleContext;&lt;br /&gt;}&lt;br /&gt;...&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Now we can compile the code and create a JAR file:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;cd $SRC_HOME;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;javac  -cp $APP_HOME/org.eclipse.osgi_3.6.0.v20100517.jar com/ctp/helloworld/service/HelloWorld.java  com/ctp/helloworld/service/impl/HelloWorldImpl.java  com/ctp/helloworld/Activator.java;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;jar cvfm example.jar META-INF/MANIFEST.MF com;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;cp example.jar $APP_HOME/example.jar;&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 8pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;If your bundle was built correctly you could start your test application:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;cd $APP_HOME;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;java -jar org.eclipse.osgi_3.6.0.v20100517.jar -console;&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Now you can administrate the OSGi platform with the console. Test the bundle like the following:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;osgi&gt;install file:///$APP_HOME/example.jar&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Bundle id is 4&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;osgi&gt;start 4&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Registering HelloWorld service...&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;HelloWorldService#getMessage(): Hello World&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;osgi&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;NOTE: If you want to use the service inside another bundle, you have to add the package &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.helloworld.service&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; to the &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Export-Package&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; directive in the MANIFEST.MF file.&lt;/span&gt;&lt;br /&gt;  &lt;h2 style="margin:20px 0 20px 0;"&gt;&lt;span style="font-size: 18pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;4 Multiple Implementations&lt;/span&gt;&lt;/h2&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;This  example shows you how to use multiple implementations of a service.  It’s a solution which I think, personally, is quite elegant. I won’t go  through all steps that we already did in the previous example. A source code can be downloaded &lt;a href="http://code.google.com/p/ctpjava/downloads/detail?name=com.ctp.playground.multiple.zip&amp;amp;can=2&amp;amp;q="&gt;here&lt;/a&gt;. Let’s create a bundle with the symbolic  name &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; and the following classes:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple.Activator&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple.math.OperationService&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple.math.OperationServiceFactory&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple.math.internal.Addition&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple.math.internal.Substraction&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Also create the following Enum:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple.math.Operation&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The bundle activator should have the following contents (don’t forget the imports):&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="java"&gt;public class Activator implements BundleActivator {&lt;br /&gt;&lt;br /&gt;   private static BundleContext context;&lt;br /&gt;&lt;br /&gt;   public static BundleContext getContext() {&lt;br /&gt;       return context;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void start(BundleContext bundleContext) throws Exception {&lt;br /&gt;       Activator.context = bundleContext;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void stop(BundleContext bundleContext) throws Exception {&lt;br /&gt;       Activator.context = null;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The interface &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple.OperationService&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; has one method:&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="java"&gt;public Double doOperation(Double a, Double b);&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The classes &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Addition &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;and &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Substraction &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;implement this interface and are our actual services:&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="java"&gt;@Override&lt;br /&gt;public Double doOperation(Double a, Double b) {&lt;br /&gt; return a + b;&lt;br /&gt;}&lt;/pre&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;and:&lt;/span&gt;&lt;pre name="code" class="java"&gt;@Override&lt;br /&gt;public Double doOperation(Double a, Double b) {&lt;br /&gt; return a - b;&lt;br /&gt;}&lt;/pre&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The Enum &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Operation&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; looks like the following (don’t forget the imports):&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="java"&gt;public enum Operation {&lt;br /&gt;   ADDITION {&lt;br /&gt;       @Override&lt;br /&gt;       public Class&amp;lt;?&amp;gt; getServiceClass() {&lt;br /&gt;           return Addition.class;&lt;br /&gt;       }&lt;br /&gt;   }, SUBSTRACTION {&lt;br /&gt;       @Override&lt;br /&gt;       public Class&amp;lt;?&amp;gt; getServiceClass() {&lt;br /&gt;           return Substraction.class;&lt;br /&gt;       }&lt;br /&gt;   };&lt;br /&gt;   public abstract Class&amp;lt;?&amp;gt; getServiceClass();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;And now comes the part where we get our service implementations and decide which one to take. For that we created the Class &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;OperationServiceFactory&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;. Now extend it with the following method:&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="java"&gt;public static OperationService getService(Operation o) {&lt;br /&gt; BundleContext bundleContext = Activator.getContext();&lt;br /&gt; ServiceReference[] refs = null;&lt;br /&gt; try {&lt;br /&gt;  // get the service references&lt;br /&gt;  refs = bundleContext.getServiceReferences(OperationService.class.getName(),null);&lt;br /&gt;  &lt;br /&gt; } catch (InvalidSyntaxException e) {&lt;br /&gt;  // this should never happen, because the second argument&lt;br /&gt;  // of bundleContext.getServiceReferences() is null.&lt;br /&gt;  // You have the possibility to give filter criterias with&lt;br /&gt;  // this parameter&lt;br /&gt; }&lt;br /&gt; OperationService service = null;&lt;br /&gt; if(refs != null) {&lt;br /&gt;  for(int i = 0;i&amp;lt;refs.length;i++) {&lt;br /&gt;   service = (OperationService) bundleContext.getService(refs[i]);&lt;br /&gt;   // check, if the service is the wanted one&lt;br /&gt;   if(service.getClass().equals(o.getServiceClass())) {&lt;br /&gt;    return service;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; return null;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;All we have to do now is to register the services in the Activator class and test them. Extend the &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;com.ctp.playground.multiple.Activator&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;:&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="java"&gt;...&lt;br /&gt;public void start(BundleContext bundleContext) throws Exception {&lt;br /&gt;&lt;br /&gt; Activator.context = bundleContext;&lt;br /&gt;    // register services&lt;br /&gt; bundleContext.registerService(OperationService.class.getName(), new Addition(), null);&lt;br /&gt; bundleContext.registerService(OperationService.class.getName(), new Substraction(), null);&lt;br /&gt; &lt;br /&gt;    // test the services&lt;br /&gt;    OperationService operation = OperationServiceFactory.getService(Operation.ADDITION);&lt;br /&gt; Double result = operation.doOperation(10.0, 20.0);&lt;br /&gt; System.out.println(result);&lt;br /&gt; operation = OperationServiceFactory.getService(Operation.SUBSTRACTION);&lt;br /&gt; result = operation.doOperation(10.0, 20.0);&lt;br /&gt; System.out.println(result);&lt;br /&gt;}&lt;br /&gt;...&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The MANIFEST.MF file should have the following contents:&lt;/span&gt;&lt;br /&gt;  &lt;pre name="code" class="plain"&gt;Manifest-Version: 1.0&lt;br /&gt;Bundle-ManifestVersion: 2&lt;br /&gt;Bundle-Name: Multiple Service implementations Example&lt;br /&gt;Bundle-SymbolicName: com.ctp.playground.multiple&lt;br /&gt;Bundle-Version: 1.0.0&lt;br /&gt;Bundle-Activator: com.ctp.playground.multiple.Activator&lt;br /&gt;Bundle-Vendor: CTP&lt;br /&gt;Bundle-RequiredExecutionEnvironment: JavaSE-1.6&lt;br /&gt;Import-Package: org.osgi.framework;version="1.3.0"&lt;br /&gt;Bundle-ActivationPolicy: lazy&lt;br /&gt;Export-Package: com.ctp.playground.multiple.math&lt;/pre&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Now build the bundle (compile and make jar file), put it in the &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;$APP_HOME&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt; directory, run the platform and install / start it like we did in the previous example.&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;You should have the following output after starting the bundle:&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;osgi&gt; 30.0&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Courier New; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;-10.0&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;h2 style="margin:20px 0 20px 0;"&gt;&lt;span style="font-size: 18pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;5 Conclusion&lt;/span&gt;&lt;/h2&gt;   &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Let’s summarize and see if you reached your targets:&lt;/span&gt; &lt;ul&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;OSGi is a framework specification for creating highly modular Java applications&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;A bundle is a simple jar file, defined through manifest headers&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;An OSGi Service is a simple POJO that needs to be registered in the OSGi Service Registry&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;You can create a simple bundle&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;You are able to create a simple OSGi Service&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;You can manage multiple service implementations&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;As  I mentioned at the top of this blog, this is the first part of my  series about OSGi and Eclipse plug-in development. I will publish the  blogs like the following (there may be changes):&lt;/span&gt; &lt;ol&gt;&lt;li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Introduction to OSGi&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;OSGi in a declarative way&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;How to use additional frameworks like Spring DM or Declarative Services&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;OSGi and Eclipse&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;The way how Eclipse uses OSGi and introduction to Eclipse plug-in development&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Eclipse UI&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;How the Eclipse UI works and how to use it&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Eclipse SDK 4.0 - Model driven development&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;All about the new Eclipse SDK and its model driven approach&lt;/span&gt;&lt;/li&gt;&lt;li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;Eclipse SDK 4.0 - New features&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;br /&gt;New features of the SDK like XWT and usage of dependency injection&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;br /&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;I  hope you enjoyed this little introduction to OSGi and I’m looking  forward to read your comments, so I could improve my further planned  blogs.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2125394507798961092?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2125394507798961092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2125394507798961092' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2125394507798961092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2125394507798961092'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/09/introduction-to-osgi.html' title='Introduction to OSGi'/><author><name>Andreas Doebeli</name><uri>http://www.blogger.com/profile/17575118610108144172</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-3305419975676030648.post-1215437510316324293</id><published>2010-10-15T08:10:00.004+02:00</published><updated>2010-10-15T13:38:35.846+02:00</updated><title type='text'>Starting Scala</title><content type='html'>&lt;br /&gt;&lt;br /&gt;I'm starting to learn &lt;a href="http://www.scala-lang.org/"&gt;Scala&lt;/a&gt;. I try to learn a new programming language every year (a tip from the &lt;a href="http://www.pragprog.com/titles/tpp/the-pragmatic-programmer"&gt;Pragmatic programmer&lt;/a&gt;) because it's a good way to keep your head young. Last year I learned JavaFx Script, too bad that &lt;a href="http://java.dzone.com/articles/oracle-discontinue-javafx?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+javalobby%2Ffrontpage+%28Javalobby+%2F+Java+Zone%29"&gt;Oracle announced&lt;/a&gt; that they are not going forward with this. I really liked the whole notion of binding.&lt;br /&gt;&lt;br /&gt;Anyway Scala is a &lt;a href="http://en.wikipedia.org/wiki/Functional_programming"&gt;functional language&lt;/a&gt;, so that will be a challenge, because I've never written any code in a functional language before. I'm still learning so I thought let's take something form my day to day job.&lt;br /&gt;&lt;br /&gt;This was the problem, we have a web service that we can only call with 100 ids at a time. So we need to split our list with ids in batches of a 100. Fist I thought there must be some library that can do this. We did some google-ing, but we could not find it, so this is what we came up with:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;    static &amp;lt;E&gt; List&amp;lt;List&amp;lt;E&gt;&gt; subDivide(List&amp;lt;E&gt; list, int size) {&lt;br /&gt;        List&amp;lt;List&amp;lt;E&gt;&gt; resultList = new ArrayList&amp;lt;List&amp;lt;E&gt;&gt;();&lt;br /&gt;        &lt;br /&gt;        int subdivideCount = list.size() / size;&lt;br /&gt;        if (list.size() % size != 0) {&lt;br /&gt;            subdivideCount++;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        for (int i = 0; i &amp;lt; subdivideCount; i++) {&lt;br /&gt;            int maxLength = Math.min(i * size + size, list.size());&lt;br /&gt;            resultList.add(list.subList(i * size, maxLength));&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        return resultList;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Very standard way to solve something like this in Java. So I thought let's solve this in Scala. List are very cool in Scala and you can do pattern matching on them. Let's try that:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;  def subDivide(list: List[Int], batchSize:Int):List[List[Int]] = list match {&lt;br /&gt;    case Nil =&gt; Nil&lt;br /&gt;    case l if l.length &gt; batchSize =&gt; List(list.splitAt(batchSize)._1) ::: subDivide(list.splitAt(batchSize)._2, batchSize)&lt;br /&gt;    case l =&gt; List(list)&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see this code is much nicer. It checks the size of the list taking the batchSize off and then sub dividing the rest and adding this to the result. If the size is smaller than the batchSize we can return it without splitting. If anyone knows a better way of doing this in Scala, please leave me a comment.&lt;br /&gt;&lt;br /&gt;This is a much nicer solution, because there is way less int calculation involved. And the recursion also makes it a lot nicer, because there is no need of a for loop. So maybe this is what people are talking about, Scala does make you solve things differently.&lt;br /&gt;&lt;br /&gt;But of course we could do this in Java as well. In Java we don't have a nice pattern matching, so we'll have to do with if-s.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;    static &amp;lt;E&gt; void subDivide(List&amp;lt;E&gt; list, int size, List&amp;lt;List&amp;lt;E&gt;&gt; result) {&lt;br /&gt;        if (list.isEmpty()) {&lt;br /&gt;            return;&lt;br /&gt;        } &lt;br /&gt;        if (list.size() &gt; size) {&lt;br /&gt;            result.add(list.subList(0, size));&lt;br /&gt;            subDivide(list.subList(size, list.size()), size, result);&lt;br /&gt;        } else {&lt;br /&gt;            result.add(list);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see a lot better. So at least Scala improved my Java code a bit today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-1215437510316324293?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/1215437510316324293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=1215437510316324293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1215437510316324293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1215437510316324293'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/10/starting-scala.html' title='Starting Scala'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-1556335707225830250</id><published>2010-09-28T09:32:00.004+02:00</published><updated>2010-09-28T09:48:01.658+02:00</updated><title type='text'>Swiss ICT Awards 2010</title><content type='html'>Ok, this is not really a Java article as we usually post here on the blog - just a small company advertisement where you might help out. CTP has been nominated by the Swiss ICT Awards 2010 in the category "Champion". This award category gets selected by a jury. For the PUBLIC category, you can actually place a vote!&lt;br /&gt;&lt;br /&gt;Please click on the below link and vote for Cambridge Technology Partners now and we may become the winners of the PUBLIC category:&lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.swissitmagazine.ch/index.cfm?pid=7786&amp;cid=2103"&gt;http://www.swissitmagazine.ch/index.cfm?pid=7786&amp;cid=2103&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-1556335707225830250?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/1556335707225830250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=1556335707225830250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1556335707225830250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1556335707225830250'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/09/swiss-itc-awards-2010.html' title='Swiss ICT Awards 2010'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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-3305419975676030648.post-1042760646560883317</id><published>2010-09-23T06:13:00.051+02:00</published><updated>2010-09-24T07:11:04.589+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javaone'/><category scheme='http://www.blogger.com/atom/ns#' term='daniel'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>JavaOne 2010</title><content type='html'>Time is running quickly, and shocked we have realized that this year's JavaOne is already over - high time to share some conference highlights with you! It's the first time that Oracle drove the conference after acquiring Sun, so we were curious whether the spirit we valued so much during the last years is still around. To give you the conclusion already now - it's a yes, but there are some drawbacks.&lt;br /&gt;&lt;br /&gt;It's clear that JavaOne is just the "side conference" this year - it had to leave its home in the Moscone center, which is mainly hosting Oracle OpenWorld. With the move, things got slightly smaller - session rooms (which is probably the most annoying aspect), the chill-out zones and exhibition space, ... . But of course it's not the size that matters; it's the content that compensates for it! The quality of the talks, we've seen, has been very good so far, and as usual it's a lot of great ideas, visions and news floating around. Below we give you a quick summary of the latest Java news and session highlights:&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Keynotes&lt;/h3&gt;On Sunday evening Larry Ellison hosted the opening session of the Oracle OpenWorld. First of all most of the JavaOne attendees were rather surprised, they were not allowed to join in for this keynote. Nevertheless a quick update on this keynote is provided here before moving on with the real Java stuff.&lt;br /&gt;&lt;br /&gt;The first presentation was the Oracle Exalogic Elastic Cloud, which is very briefly summarized “The Cloud in a Box”. The Exalogic box provides both hardware and software. Oracle further announced benefits to the customer due to the homogeneous hardware and software, which is also reflected in Oracle's new tag line "Hardware and Software Engineered to Work Together". Exalogic combines up to 30 servers, including storage (hard disk drive and SSD) and a high-speed internal network between the servers in a rack. The Exalogic solution is designed and optimized to run Enterprise Java applications, i.e. the Oracle Fusion Middleware stack, similar to the Oracle Exadata center which runs Oracle DB servers. Oracle Exalogic can be scaled from 1/4 up to 8 racks, whereas according to Larry Ellison two full racks were enough to host all of Facebook.com.&lt;br /&gt;&lt;br /&gt;Afterwards the Unbreakable Enterprise Kernel was presented, which will be 100% RedHat compatible. It is Oracle’s answer to the slowly moving RedHat distribution; according to Larry Ellison RedHat is 4 years behind the mainline.&lt;br /&gt;&lt;br /&gt;Finally Oracle Fusion Application was unveiled. It is a CRM/ERP/HRMS system which offers the features of products earlier acquired by Oracle such as PeopleSoft and Siebel. The entire code basis has been re-written based on Oracle Fusion Middleware, which had to be enhanced to support all the middleware functionality needed. It took Oracle five years to develop Oracle Fusion Applications and is one of the biggest projects Oracle ever faced.&lt;br /&gt;&lt;br /&gt;On Monday and Tuesday the JavaOne Opening Keynote and the General Technical Session were about the Future of Java, which is the right thing to do after the Sun/Oracle merger last year. After finalizing the Java EE 6 Specification in December 2009, this year the focus is moved to the next version of the Java Standard Edition (Java SE). The last update on the Standard Edition was Java SE 6 in 2006. After a five years break we will get two new versions within roughly 18 months, OpenJDK 7 in mid 2011 and OpenJDK 8 in late 2012.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://farm5.static.flickr.com/4089/5016218388_6cc76bff51.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 332px;" title="Thomas Kurian, Executive Vice President, Product Development at Oracle at JavaOne 2010 Opening Keynote" src="http://farm5.static.flickr.com/4089/5016218388_6cc76bff51.jpg" border="0" alt="Thomas Kurian, Executive Vice President, Product Development at Oracle at JavaOne 2010 Opening Keynote" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java SE version 7&lt;/span&gt; contains a bunch of smaller language changes and enhancements. Project Coin contributes most of the new language features, such as Diamond Operator for declaration and instantiation of generics, Try-with-Resource block for proper closing of resources implementing the new &lt;code&gt;AutoCloseable&lt;/code&gt; interface in the &lt;code&gt;java.lang&lt;/code&gt; package, Mutli-Catch and Re-Throw of Exceptions, Switch statements with Strings and String literals using “_” (int a = 0b100_1010_0011;). Additionally JSR 292 is implemented in this release, which supports mainly other languages setting up on top of the JVM, such as Scala and Groovy. The Fork/Join Framework provides better support for modern multi core processors. There are some other updates shipped with this release such as JDBC 4.1, which supports resource management, and more.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java SE version 8&lt;/span&gt; will bring a new modularization concept, finally no more hassle with the JAR files and the classpath! Project Jigsaw is defining these new features. A module (&lt;code&gt;*.jmod&lt;/code&gt;) contains all its classfiles and a declaration of modules it depends on. This declaration is placed in the module-info.java file, which contains the name and the version of the dependencies. Modules need to be installed on the target system before they can be executed. A second set of major improvements will come out of the Project Lambda. These improvements include closures, value classes - no need to write getters and setters, extension methods and eventually reification.&lt;br /&gt;&lt;br /&gt;On the tooling side two new versions of Netbeans IDE will be released during 2011 (&lt;a href="http://netbeans.org/community/releases/roadmap.html"&gt;check the feature list&lt;/a&gt;). Project Glassfish also committed to publish two new releases during calendar year 2011 (&lt;a href="https://glassfish.dev.java.net/roadmap/"&gt;check the feature list&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;JavaFX script will not be further developed by Oracle and is replaced by a set of APIs, which is supposed to make the technology more accessible to all Java developers without the need to learn a new language. Additionally 3D support is added to JavaFX! According to Thomas Kurian there will be direct 3D hardware rendering support using Microsoft DirectX or OpenGL and a HTML5/JavaScript output for web-based clients.&lt;br /&gt;&lt;br /&gt;Not surprisingly, hot topics like the lawsuit with Google or the future of the JCP were not discussed.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Session Highlights&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;In &lt;span style="font-weight: bold;"&gt;Hyperproductive JSF 2.0&lt;/span&gt;, JSF co-spec lead Ed Burns showed a couple of reasons why your project development might run with hand brake pulled. With several demos he showed probably underused new features in JSF 2 like Groovy support for all JSF artifacts that get hot deployed, or the new facelets &amp;gt;ui:debug&amp;lt; tag that gives you information on the component trees or scope variables. He also emphasised the importance of standards or conventions for a team, which is indeed an often overlooked aspect when a new project needs to get out quickly. This was supplemented by another talk on the new &lt;span style="font-weight: bold;"&gt;JSF 2 composite components&lt;/span&gt;, which make it very easy to create reusable components for e.g. your corporate layout and build up a highly productive framework like that.&lt;br /&gt;&lt;br /&gt;While Maven founder Jason van Zyl's talk on &lt;span style="font-weight: bold;"&gt;Maven 3&lt;/span&gt; was not intended to show new Maven features, he gave an overview of how he envisions future enterprise development. This includes tight integration from IDE over SCM to CI, up to a new tool called Proviso which is targeted to standardize enterprise deployment processes. Another interesting aspect was how Sonatype standardized their component model around Maven and Hudson plugins as well as their repository manager to achieve better reuse, which is now all built around JSR-330.&lt;br /&gt;&lt;br /&gt;As a company mainly dealing with enterprise development we were of course giving a main focus on all the Java EE 6 talks. Spec lead Roberto Chinnici gave one of them &lt;span style="font-weight: bold;"&gt;explaining the Java EE programming model&lt;/span&gt;. Even though we have been working with the technology for a while now, this gave a nice summary and showed again that you still get that extra little information from JavaOne that makes the conference very useful when you hear things from the mind behind it. Roberto provided a quick overview on managed beans, CDI and several "must knows" when changing to the new programming model.&lt;br /&gt;&lt;br /&gt;On the same track was Dan Allen with presenting in depth on &lt;span style="font-weight: bold;"&gt;CDI and Seam 3&lt;/span&gt;. The talk went from all the CDI concepts from typesafe injection with qualifiers over loose coupling with events to the SPI in CDI leading to Seam 3. This is now split in several independent modules where your application can take what it needs. Spinning this thought further - why not break up all the EJB services and make them a portable extension? We might see something like this in Java EE 7. By the way, Dan is not only an excellent author (when are we going to see Seam in Action 2nd edition?), but also a great speaker - make sure to visit one of his talks when you got a chance.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm5.static.flickr.com/4149/5019730840_d0d323b9ac.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand; height: 332px;" src="http://farm5.static.flickr.com/4149/5019730840_d0d323b9ac.jpg" border="0" alt="" /&gt;&lt;/a&gt; To close the sessions on Java EE, we were deeply impressed by the session on &lt;span style="font-weight: bold;"&gt;Arquillian&lt;/span&gt;. The framework evolved out of working on the RI for CDI (Weld) and takes the idea of the new EE component model to your unit tests. By eliminating the build to create archives for integration tests, the team around Arquillian has managed to decrease complexity and improve speed of the integration test massively - something critical if you want your team to actually use them. The outcome was a generic component testing framework, which we're convinced will significantly improve quality on EE applications. You can programmatically create an archive on the components you want to test, and run the test either in container or as client in a running application server. This is the time when you feel that enterprise engineering is still a young discipline - why has this not been around for longer?&lt;br /&gt;&lt;br /&gt;Last but not least, if you have been following our people spotlights you probably know we're big fans of the &lt;span style="font-weight: bold;"&gt;Java Posse&lt;/span&gt;! As in the last 4 years the posse was present also at this year's JavaOne holding a BoF in the Mason street tent, celebrating the 5th anniversary of the Java Posse. While it was less interactive than the last years BoFs, we got a great show with special guest "Loose" Bruce Kerr giving a live performance of the Posse song, funky costumes and interesting insights on the future of Java - well kind of. Go and download the recordings - although this time I guess it's too bad this is not a video podcast!&lt;br /&gt;&lt;br /&gt;As usual we enjoyed being here - CU again next year!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-1042760646560883317?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/1042760646560883317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=1042760646560883317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1042760646560883317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1042760646560883317'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/09/javaone-2010.html' title='JavaOne 2010'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4089/5016218388_6cc76bff51_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-2518387944598614854</id><published>2010-09-21T14:02:00.020+02:00</published><updated>2010-09-29T17:07:11.652+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='douglas'/><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><category scheme='http://www.blogger.com/atom/ns#' term='howto'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Installing Oracle on Ubuntu</title><content type='html'>Most of the applications we write here at &lt;a href="http://www.ctp-consulting.com"&gt;CTP&lt;/a&gt; depend on an Oracle database.&lt;br /&gt;After putting some effort on configuring our development environment for a new project and figuring out the process wasn't as straightforward as I expected, I decided to share my finding in this walkthrough.&lt;br /&gt;It describes the steps required to install Oracle on a Ubuntu Server.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Prerequisites&lt;/h2&gt;&lt;br /&gt;The instructions apply to Oracle 11g (version 11.2.0.1.0) on an Ubuntu 10.04.1 Server Edition 64-bit.&lt;br /&gt;Download Ubuntu's installation ISO from &lt;a href="http://www.ubuntu.com/server/get-ubuntu/download"&gt;http://www.ubuntu.com/server/get-ubuntu/download&lt;/a&gt; and Oracle's ZIPs from &lt;a href="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html"&gt;http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html&lt;/a&gt;.&lt;br /&gt;A Windows environment is used as client. You will need the following tools:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PuTTY, an SSH client - &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/"&gt;http://www.chiark.greenend.org.uk/~sgtatham/putty/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Cygwin X, a POSIX environment, but here we're interested only on its X-Server capabilities - &lt;a href="http://www.cygwin.com"&gt;http://www.cygwin.com&lt;/a&gt;&lt;ul&gt;&lt;li&gt;You will need the following packages (within group "X11")&lt;ul&gt;&lt;li&gt;xorg-server&lt;/li&gt;&lt;li&gt;xinit&lt;/li&gt;&lt;li&gt;xorg-docs (optional, man)&lt;/li&gt;&lt;li&gt;X-start-menu-icons&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;From other packages&lt;ul&gt;&lt;li&gt;openssh&lt;br /&gt;&lt;/li&gt;&lt;li&gt;inetutils&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Server configuration&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Installation&lt;/h3&gt;&lt;br /&gt;Install Ubuntu in your server. In this example a virtual machine with 32 Gb of disk and 2Gb of RAM is used. &lt;br /&gt;During the installation process, select the "SSH server" to be installed. To do it after installation, run:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  sudo apt-get install openssh-server openssh-client&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;X Forwarding&lt;/h3&gt;&lt;br /&gt;You should configure PuTTY to forward the graphical applications from the Ubuntu server (the 'server') to your Windows workstation (the 'client'), &lt;br /&gt;as the Oracle 11g installation depends on it.&lt;br /&gt;Open PuTTY and enter the IP address of your server, give a name to the session and save it. Configure the following options:&lt;br /&gt; &lt;ul&gt;&lt;br /&gt; &lt;li&gt;In "Connection &amp;gt; SSH &amp;gt; X11", check "Enable X11 forwarding" and for "X display location" enter "localhost:0"&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt;Go to the "Session" menu and save your session again, to persist the configuration changes.&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;/ul&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_J-nMp4yHYb0/TKNKpOJt3NI/AAAAAAAACUg/KOpRiHMD4dA/s1600/xforwarding.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 385px;" src="http://3.bp.blogspot.com/_J-nMp4yHYb0/TKNKpOJt3NI/AAAAAAAACUg/KOpRiHMD4dA/s400/xforwarding.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5522339640120302802" /&gt;&lt;/a&gt;&lt;br /&gt;Start the X server in your client computer &lt;b&gt;before&lt;/b&gt; connecting to the server through PuTTY. In the programs menu, open "Cygwin-X" and run "XWin Server". &lt;br /&gt;It may start a graphical terminal (XTerm) but you should close it, to avoid confusion. All you need is to keep the server running, indicated by the fancy X icon in the system tray.&lt;br /&gt;Now you can establish the SSH connection. To test if the X Forwarding is properly configured, run &lt;code&gt;xeyes&lt;/code&gt; in the server (if not found, run &lt;code&gt;sudo apt-get install x11-apps&lt;/code&gt;) and you should see the eyes in your desktop.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_J-nMp4yHYb0/TKNK8Q9t97I/AAAAAAAACUo/VpNTLR4EhmE/s1600/xeyes.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 166px; height: 138px;" src="http://4.bp.blogspot.com/_J-nMp4yHYb0/TKNK8Q9t97I/AAAAAAAACUo/VpNTLR4EhmE/s400/xeyes.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5522339967292798898" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Swap configuration&lt;/h3&gt;&lt;br /&gt;The amount of swap space required by the Oracle DB depends on the available RAM:&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;Available RAM&lt;/th&gt;&lt;th&gt;Swap required&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Between 1 and 2 Gb&lt;/td&gt;&lt;td&gt;1.5 x RAM&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Between 2 and 16 Gb&lt;/td&gt;&lt;td&gt;1 x RAM&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;More than 16 Gb&lt;/td&gt;&lt;td&gt;16 Gb&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;To check the existing configured space, run&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  $ free&lt;br /&gt;               total       used       free     shared    buffers     cached&lt;br /&gt;  Mem:       2057836     181680    1876156          0      12268      91092&lt;br /&gt;  -/+ buffers/cache:      78320    1979516&lt;br /&gt;  Swap:      1417208          0    1417208&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In this walkthrough I'm going to add 2Gb to the existing swap space. &lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  # Creates a swap file, may take a while to execute&lt;br /&gt;  $ sudo dd if=/dev/zero of=/mnt/2Gb.swap bs=1M count=2048&lt;br /&gt;  # Activating the swap file&lt;br /&gt;  sudo mkswap /mnt/2Gb.swap&lt;br /&gt;  sudo swapon /mnt/2Gb.swap&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To have the swap file mounted automatically after a reboot, add the following line to the &lt;code&gt;/etc/fstab&lt;/code&gt; file:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  /mnt/2Gb.swap   none    swap    sw      0       0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Updating and installing dependencies&lt;/h3&gt;&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  $ sudo apt-get update&lt;br /&gt;  $ sudo apt-get upgrade&lt;br /&gt;  $ sudo apt-get install build-essential libaio1 libaio-dev libmotif3 libtool expat alien ksh pdksh unixODBC unixODBC-dev sysstat elfutils libelf-dev binutils lesstif2 lsb-cxx rpm lsb-rpm gawk unzip x11-utils ia32-libs&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Installing libstdc++ 5&lt;/h3&gt;&lt;br /&gt;Ubuntu comes with libstdc++ version 6, but Oracle requires version 5. To fix it:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  $ wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb&lt;br /&gt;  $ dpkg-deb -x libstdc++5_3.3.6-17ubuntu1_amd64.deb ia64-libs&lt;br /&gt;  $ sudo cp ia64-libs/usr/lib/libstdc++.so.5.0.7 /usr/lib64&lt;br /&gt;  $ cd /usr/lib64&lt;br /&gt;  $ sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5&lt;br /&gt;  $ ls -al libstdc++.*&lt;br /&gt;  lrwxrwxrwx 1 root root      18 2010-09-17 14:19 libstdc++.so.5 -&amp;gt; libstdc++.so.5.0.7&lt;br /&gt;  -rw-r--r-- 1 root root  829424 2010-09-17 14:18 libstdc++.so.5.0.7&lt;br /&gt;  lrwxrwxrwx 1 root root      19 2010-09-14 12:05 libstdc++.so.6 -&amp;gt; libstdc++.so.6.0.13&lt;br /&gt;  -rw-r--r-- 1 root root 1044112 2010-03-27 01:16 libstdc++.so.6.0.13&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Links update&lt;/h3&gt;&lt;br /&gt;Update the symbolic link &lt;code&gt;/bin/sh&lt;/code&gt; from &lt;code&gt;/bin/dash&lt;/code&gt; to &lt;code&gt;/bin/bash&lt;/code&gt;.&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  $ ls -l /bin/sh&lt;br /&gt;  lrwxrwxrwx 1 root root 4 2010-09-14 12:05 sh -&amp;gt; dash&lt;br /&gt;  $ cd /bin&lt;br /&gt;  $ sudo ln -sf bash /bin/sh&lt;br /&gt;  $ ls -l sh&lt;br /&gt;  lrwxrwxrwx 1 root root 4 2010-09-14 14:19 sh -&amp;gt; bash&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Some links need to be created as well:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  ln -s /usr/bin/awk /bin/awk&lt;br /&gt;  ln -s /usr/bin/rpm /bin/rpm&lt;br /&gt;  ln -s /usr/bin/basename /bin/basename&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;System users &amp;amp; groups&lt;/h3&gt;&lt;br /&gt;Change to root and create the following users and groups&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  ctp@oracle11g:~$ sudo -s&lt;br /&gt;  root@oracle11g:~# addgroup oinstall&lt;br /&gt;  Adding group `oinstall' (GID 1001) ...&lt;br /&gt;  Done.&lt;br /&gt;  root@oracle11g:~# addgroup dba&lt;br /&gt;  Adding group `dba' (GID 1002) ...&lt;br /&gt;  Done.&lt;br /&gt;  root@oracle11g:~# addgroup nobody&lt;br /&gt;  Adding group `nobody' (GID 1003) ...&lt;br /&gt;  Done.&lt;br /&gt;  root@oracle11g:~# usermod -g nobody nobody&lt;br /&gt;  root@oracle11g:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle&lt;br /&gt;  root@oracle11g:~# passwd -l oracle&lt;br /&gt;  passwd: password expiry information changed.&lt;br /&gt;  root@oracle11g:~# mkdir /home/oracle&lt;br /&gt;  root@oracle11g:~# chown -R oracle:dba /home/oracle&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;Creating ORACLE_HOME&lt;/h3&gt;&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  root@oracle11g:~# mkdir -p /u01/app/oracle&lt;br /&gt;  root@oracle11g:~# chown -R oracle:dba /u01&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;System parameters&lt;/h3&gt;&lt;br /&gt;Some Linux kernel parameters need to be modified, as specified in Oracle's installation guide. To do that, add the parameters below to the file &lt;code&gt;/etc/sysctl.conf&lt;/code&gt;:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  fs.file-max = 65535   &lt;br /&gt;  kernel.shmall = 2097152   &lt;br /&gt;  kernel.shmmax = 2147483648   &lt;br /&gt;  kernel.shmmni = 4096   &lt;br /&gt;  kernel.sem = 250 32000 100 128   &lt;br /&gt;  net.ipv4.ip_local_port_range = 1024 65535   &lt;br /&gt;  net.core.rmem_default = 1048576   &lt;br /&gt;  net.core.rmem_max = 1048576   &lt;br /&gt;  net.core.wmem_default = 262144   &lt;br /&gt;  net.core.wmem_max = 262144&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The &lt;code&gt;oracle&lt;/code&gt; user needs to have some shell limits increased by adding the parameters below to the file &lt;code&gt;/etc/security/limits.conf&lt;/code&gt;:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  oracle soft nproc 2047   &lt;br /&gt;  oracle hard nproc 16383   &lt;br /&gt;  oracle soft nofile 1023   &lt;br /&gt;  oracle hard nofile 65535 &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add the parameters below to the file &lt;code&gt;/etc/pam.d/login&lt;/code&gt;:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  session required /lib/security/pam_limits.so   &lt;br /&gt;  session required pam_limits.so&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Reboot the system to reload the configuration.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Oracle installation&lt;/h2&gt;&lt;br /&gt;From the directory you extracted the Oracle zip files, run &lt;code&gt;database/runInstaller&lt;/code&gt; as the user &lt;code&gt;oracle&lt;/code&gt; created above (see &lt;a href="#unixTips"&gt;Unix Tips&lt;/a&gt; if you need help). You can ignore the DISPLAY warning, if any. If you receive an error regarding the X forwarding permission, use this &lt;a href="#remoteX"&gt;remote X forwarding&lt;/a&gt; trick.&lt;br /&gt;&lt;h3&gt;Installation options&lt;/h3&gt;&lt;br /&gt;The suggested installation options:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Create and configure a database&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Server class&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Single instance database installation&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Advanced install&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Enterprise Edition&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;General purpose/Transaction processing&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Memory, Character sets, Security and Sample Schemas - as default&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Run the fixup script following the instructions and then ignore the package dependencies.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_J-nMp4yHYb0/TKNLFXwFpKI/AAAAAAAACUw/I3VzwB5Etu4/s1600/dependencies.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 313px;" src="http://4.bp.blogspot.com/_J-nMp4yHYb0/TKNLFXwFpKI/AAAAAAAACUw/I3VzwB5Etu4/s400/dependencies.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5522340123733501090" /&gt;&lt;/a&gt;&lt;br /&gt;To check if everything is ok, open the following address in your browser:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  https://&amp;lt;server&amp;gt;:1158/em&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Startup script&lt;/h2&gt;&lt;br /&gt;First, edit the file &lt;code&gt;/etc/oratab&lt;/code&gt; or create one if you don't have it already. Make sure that the last parameter is "Y", meaning you want the database to be started during boot.&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  oracle:/u01/app/oracle/product/11.2.0/dbhome_1:Y&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now create the startup script &lt;code&gt;/etc/init.d/oracledb&lt;/code&gt;.&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  cd /etc/init.d&lt;br /&gt;  sudo touch oracledb&lt;br /&gt;  sudo chmod a+x oracledb&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add the following content to the startup script&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  #!/bin/bash&lt;br /&gt;  #&lt;br /&gt;  # /etc/init.d/oracledb&lt;br /&gt;  #&lt;br /&gt;  # Run-level Startup script for the Oracle Enterprise Manager&lt;br /&gt;  &lt;br /&gt;  export ORACLE_BASE=/u01/app/oracle&lt;br /&gt;  export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1&lt;br /&gt;  export ORACLE_OWNR=oracle&lt;br /&gt;  export ORACLE_SID=oracle&lt;br /&gt;  export PATH=$PATH:$ORACLE_HOME/bin&lt;br /&gt;  &lt;br /&gt;  if [ ! -f $ORACLE_HOME/bin/emctl -o ! -d $ORACLE_HOME ]&lt;br /&gt;  then&lt;br /&gt;      echo "Oracle startup: cannot start"&lt;br /&gt;      exit 1&lt;br /&gt;  fi&lt;br /&gt;  &lt;br /&gt;  case "$1" in&lt;br /&gt;      start)&lt;br /&gt;          # Oracle listener and instance startup&lt;br /&gt;          echo -n "Starting Oracle: "&lt;br /&gt;          sudo -u $ORACLE_OWNR -E $ORACLE_HOME/bin/lsnrctl start&lt;br /&gt;          sudo -u $ORACLE_OWNR -E $ORACLE_HOME/bin/dbstart $ORACLE_HOME&lt;br /&gt;          sudo -u $ORACLE_OWNR -E touch /var/lock/oracle&lt;br /&gt;          # Oracle enterprise manager startup&lt;br /&gt;          sudo -u $ORACLE_OWNR -E $ORACLE_HOME/bin/emctl start dbconsole&lt;br /&gt;          echo "OK"&lt;br /&gt;          ;;&lt;br /&gt;      stop)&lt;br /&gt;          &lt;br /&gt;          echo -n "Shutdown Oracle: "&lt;br /&gt;          # Oracle enterprise manager shutdown&lt;br /&gt;          sudo -u $ORACLE_OWNR -E $ORACLE_HOME/bin/emctl stop dbconsole&lt;br /&gt;          # Oracle listener and instance shutdown&lt;br /&gt;          sudo -u $ORACLE_OWNR -E $ORACLE_HOME/bin/lsnrctl stop&lt;br /&gt;          sudo -u $ORACLE_OWNR -E $ORACLE_HOME/bin/dbshut $ORACLE_HOME&lt;br /&gt;          sudo -u $ORACLE_OWNR -E rm -f /var/lock/oracle&lt;br /&gt;          echo "OK"&lt;br /&gt;          ;;&lt;br /&gt;      reload|restart)&lt;br /&gt;          $0 stop&lt;br /&gt;          $0 start&lt;br /&gt;          ;;&lt;br /&gt;      *)&lt;br /&gt;          echo "Usage: `basename $0` start|stop|restart|reload"&lt;br /&gt;          exit 1&lt;br /&gt;  esac&lt;br /&gt;  &lt;br /&gt;  exit 0&lt;br /&gt;  &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To execute the script automatically during server startup:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  sudo update-rc.d oracledb defaults 99&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;General tips n' tricks&lt;/h2&gt;&lt;br /&gt;&lt;a id="unixTips" name="unixTips"&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Unix tips&lt;/h3&gt;&lt;br /&gt;Open a shell as anoter user:&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  sudo -u &amp;lt;username&amp;gt; -s&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a id="remoteX" name="remoteX"&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Remote X session config&lt;/h3&gt;&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;  $ xauth list&lt;br /&gt;  oracle/unix:10  MIT-MAGIC-COOKIE-1  a18621a7bf2c102fc2b27758007b56a0&lt;br /&gt;  # Copy the line returned above &lt;br /&gt;  sudo -u oracle -s&lt;br /&gt;  export HOME=/home/oracle&lt;br /&gt;  # Paste the copied line after xauth add&lt;br /&gt;  xauth add oracle/unix:10  MIT-MAGIC-COOKIE-1  a18621a7bf2c102fc2b27758007b56a0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;References&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://download.oracle.com/docs/cd/B28359_01/install.111/b32285/toc.htm"&gt;http://download.oracle.com/docs/cd/B28359_01/install.111/b32285/toc.htm&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://en.kioskea.net/faq/4405-linux-installing-oracle-11g-on-ubuntu"&gt;http://en.kioskea.net/faq/4405-linux-installing-oracle-11g-on-ubuntu&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.pythian.com/news/2329/installing-oracle-11gr1-on-ubuntu-904-jaunty-jackalope/"&gt;http://www.pythian.com/news/2329/installing-oracle-11gr1-on-ubuntu-904-jaunty-jackalope/&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=1077139"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=1077139&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2518387944598614854?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2518387944598614854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2518387944598614854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2518387944598614854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2518387944598614854'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/09/installing-oracle-on-ubuntu.html' title='Installing Oracle on Ubuntu'/><author><name>Douglas</name><uri>http://www.blogger.com/profile/09423539571355620934</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_J-nMp4yHYb0/SNzEXZ-IPVI/AAAAAAAABX0/m5MS7A65vuU/S220/portrait.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_J-nMp4yHYb0/TKNKpOJt3NI/AAAAAAAACUg/KOpRiHMD4dA/s72-c/xforwarding.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-9183786888694570250</id><published>2010-08-13T14:22:00.001+02:00</published><updated>2010-08-13T14:44:20.130+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='people'/><category scheme='http://www.blogger.com/atom/ns#' term='bartosz'/><title type='text'>Java People Spotlight: Bartek Majsak</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_1_YR6TdF3aY/TGUuVXBbWzI/AAAAAAAAOxs/tQ13CeK47TI/s1600/bartek.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/TGUuVXBbWzI/AAAAAAAAOxs/tQ13CeK47TI/s320/bartek.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;I'm glad to write another people spotlight, this time about a "newbee" (from a timely perspective), or from a technical&amp;nbsp;perspective&amp;nbsp;about a spicy addition to the Java Geeks at our Zurich Office: Bartosz Majsak... well actually Bartek, but that's another story. He joined CTP in March 2010.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;So let's see how geeky his answers are then!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Java Competence Role&lt;/b&gt;:&lt;br /&gt;Senior Developer&lt;b&gt; &lt;/b&gt;[aka Mr. T due to his extreme passion on Testing]&lt;b&gt; &lt;br /&gt;My Master Kung-Fu Skills&lt;/b&gt;:&lt;br /&gt;I can mock you out even if you are static ;)&lt;br /&gt;&lt;b&gt;I'd be excited to get my hands dirty on&lt;/b&gt;:&lt;br /&gt;Scala and/on Android&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Q&amp;amp;A&lt;/span&gt;   &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Hi Bartek, how would your message look like if you would have to tell it via Twitter what you are currently doing?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&amp;nbsp;&lt;/span&gt;Thinking how to design my own #arquillian TestEnricher and how to complete "The Challenge of Hades" &amp;nbsp;in GoW at the same time.&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Q:&lt;/span&gt;&amp;nbsp;... and having some drops of &lt;a href="http://hot-saucen.ch/blairs-sudden-death-p-49.html"&gt;Sudden Death&lt;/a&gt; on top of it? ;-)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What was the greatest piece of code you have ever written so far?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;Please come back to me with this question when I will retire :) After a few days, the code which I thought was the most brilliant I've ever written... I refactor, so... I don't have a good answer for this question yet :D&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have ever heard about programming?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;"If debugging is the process of removing bugs, then programming must be the process of putting them in." (E.W. Dijkstra)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have heard from our managers?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&amp;nbsp;&lt;/span&gt;"There is nothing as permanent as a temporary solution".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the most cutting-edge technology or framework you actually used on projects?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;CDI (JSR-299) and &lt;a href="http://ctpjava.blogspot.com/search/label/arquillian" target="_blank"&gt;Arquillian&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is your favorite podcast?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;I used to listen podcast while I was commuting but nowadays I'm a little bit out of the loop - living too close to the office ;) Of course I like Java Posse (who doesn't?!) and &lt;a href="http://www.se-radio.net/" target="_blank"&gt;Software Engineering Radio&lt;/a&gt;. I'm also addicted to &lt;a href="http://parleys.com/" target="_blank"&gt;Parleys&lt;/a&gt;, &lt;a href="http://dzone.com/" target="_blank"&gt;DZone&lt;/a&gt; and &lt;a href="http://infoq.com/"&gt;InfoQ&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Which Java book can you recommend and for what reason?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;I really enjoyed reading &lt;a href="http://www.amazon.com/Implementation-Patterns-Kent-Beck/dp/0321413091" target="_blank"&gt;"Implementation Patterns"&lt;/a&gt; by &lt;a href="http://twitter.com/kentbeck" target="_blank"&gt;Kent Beck&lt;/a&gt; and &lt;a href="http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052" target="_blank"&gt;"Working Effectively with Legacy Code"&lt;/a&gt; by &lt;a href="http://twitter.com/mfeathers" target="_blank"&gt;Michael Feathers&lt;/a&gt;. The first one gives you interesting hints for how to express yourself through code by keeping it clean and easy to understand for others. The second one will help you to stay sane while digging &amp;nbsp;into the code of a person who definitely never read the first book. If you are serious about testing you should read &lt;a href="http://www.growing-object-oriented-software.com/" target="_blank"&gt;Growing Object-Oriented Software Guided by Tests&lt;/a&gt; by &lt;a href="http://twitter.com/sf105" target="_blank"&gt;Steve Freeman&lt;/a&gt; &amp;amp; &lt;a href="http://twitter.com/natpryce" target="_blank"&gt;Nat Pryce&lt;/a&gt; as well as&amp;nbsp;&lt;a href="http://xunitpatterns.com/" target="_blank"&gt;xUnit Test Patterns&lt;/a&gt; by &lt;a href="http://twitter.com/gerardmes" target="_blank"&gt;Gerard Meszaros&lt;/a&gt;. Of course all books &lt;a href="http://ctpjava.blogspot.com/search/label/people"&gt;recommended already&lt;/a&gt; by my colleagues are also just great but I didn't want to repeat them here.&lt;br /&gt;&lt;b&gt;Q: &lt;/b&gt;DRY pattern... :-) .... Well thanks for your answers and enjoy your mock-ito this evening at the CTP Summer Event!!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;You can further follow Bartek's web presence in these directions:&lt;/i&gt;&lt;br /&gt;&lt;i&gt;- linked in: &lt;a href="http://ch.linkedin.com/in/bartoszmajsak"&gt;http://ch.linkedin.com/in/bartoszmajsak&lt;/a&gt;&lt;br /&gt;- lastfm: &lt;a href="http://www.last.fm/user/majson"&gt;http://www.last.fm/user/majson&lt;/a&gt;&lt;br /&gt;- twitter: &lt;a href="http://twitter.com/majson"&gt;http://twitter.com/majson&lt;/a&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-9183786888694570250?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/9183786888694570250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=9183786888694570250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/9183786888694570250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/9183786888694570250'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/08/java-people-spotlight-bartek-majsak.html' title='Java People Spotlight: Bartek Majsak'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_1_YR6TdF3aY/TGUuVXBbWzI/AAAAAAAAOxs/tQ13CeK47TI/s72-c/bartek.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-8415958076685057913</id><published>2010-08-13T11:02:00.005+02:00</published><updated>2010-08-13T14:36:42.642+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='arquillian'/><category scheme='http://www.blogger.com/atom/ns#' term='bartosz'/><category scheme='http://www.blogger.com/atom/ns#' term='jee'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='junit'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>Test drive with Arquillian and CDI (Part 2)</title><content type='html'>&lt;p&gt;The &lt;a href="http://ctpjava.blogspot.com/2010/07/test-drive-with-arquillian-and-cdi-part.html" target="_blank"&gt;first part&lt;/a&gt; of the &lt;a href="http://jboss.org/arquillian" target="_blank"&gt;Arquillian&lt;/a&gt; series was mainly focused on working with an in-memory database, &lt;b&gt;DI&lt;/b&gt; (dependency injection) and events from the &lt;b&gt;&lt;a href="http://jcp.org/en/jsr/detail?id=299" target="_blank"&gt;CDI&lt;/a&gt;&lt;/b&gt; spec. Now we will take a closer look on how to deal with testing &lt;b&gt;C&lt;/b&gt;ontextual components. For this purpose we will extend our &lt;a href="http://ctpjava.googlecode.com/svn/trunk/arquillian-demo-01" target="_blank"&gt;sample project&lt;/a&gt; from the first part by adding a &lt;code&gt;PortfolioController&lt;/code&gt; class, a &lt;a href="http://docs.jboss.org/cdi/api/1.0-SP1/javax/enterprise/context/ConversationScoped.html" target="_blank"&gt;conversation scoped&lt;/a&gt; bean for handling processing of user's portfolio management.&lt;/p&gt;&lt;pre name="code" class="java"&gt;@ConversationScoped @Named("portfolioController")&lt;br /&gt;public class PortfolioController implements Serializable {&lt;br /&gt;    &lt;br /&gt;    // ...&lt;br /&gt;&lt;br /&gt;    Map&amp;lt;Share, Integer&amp;gt; sharesToBuy = new HashMap&amp;lt;Share, Integer&amp;gt;();&lt;br /&gt;&lt;br /&gt;    @Inject @LoggedIn&lt;br /&gt;    User user;&lt;br /&gt;&lt;br /&gt;    @Inject&lt;br /&gt;    private TradeService tradeService;&lt;br /&gt;    &lt;br /&gt;    @Inject&lt;br /&gt;    private Conversation conversation;&lt;br /&gt;    &lt;br /&gt;    public void buy(Share share, Integer amount) {&lt;br /&gt;        if (conversation.isTransient()) {&lt;br /&gt;            conversation.begin();&lt;br /&gt;        }&lt;br /&gt;        Integer currentAmount = sharesToBuy.get(share);&lt;br /&gt;        if (null == currentAmount) {&lt;br /&gt;            currentAmount = Integer.valueOf(0);&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        sharesToBuy.put(share, currentAmount + amount); &lt;br /&gt;    }&lt;br /&gt;      &lt;br /&gt;    public void confirm() {&lt;br /&gt;        for (Map.Entry&amp;lt;Share, Integer&amp;gt; sharesAmount : sharesToBuy.entrySet()) {&lt;br /&gt;            tradeService.buy(user, sharesAmount.getKey(), sharesAmount.getValue());&lt;br /&gt;        }&lt;br /&gt;        conversation.end();&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    public void cancel() {&lt;br /&gt;        sharesToBuy.clear();&lt;br /&gt;        conversation.end();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // ...&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;So, let's try out Arquillian! As we already know from the first part we need to create a deployment package, which then will be deployed by Arquillian on the target container (in our case Glassfish 3.0.1 Embedded).&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Deployment&lt;br /&gt;public static Archive&amp;lt;?&amp;gt; createDeploymentPackage() {&lt;br /&gt;    return ShrinkWrap.create("test.jar", JavaArchive.class)&lt;br /&gt;                     .addPackages(false, Share.class.getPackage(), &lt;br /&gt;                                         ShareEvent.class.getPackage())&lt;br /&gt;                     .addClasses(TradeTransactionDao.class, &lt;br /&gt;                                 ShareDao.class, &lt;br /&gt;                                 PortfolioController.class)&lt;br /&gt;                     .addManifestResource(new ByteArrayAsset("&amp;lt;beans /&amp;gt;".getBytes()), ArchivePaths.create("beans.xml"))&lt;br /&gt;                     .addManifestResource("inmemory-test-persistence.xml", ArchivePaths.create("persistence.xml"));&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Next we can start develop a simple test scenario:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;given&lt;/i&gt;&lt;/b&gt; user choose CTP share,&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;when&lt;/i&gt;&lt;/b&gt;  he confirms the order,&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;then&lt;/i&gt;&lt;/b&gt; his portfolio should be updated.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Which in JUnit realms could be written as follows:&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@RunWith(Arquillian.class)&lt;br /&gt;public class PortfolioControllerTest {&lt;br /&gt;&lt;br /&gt;    // deployment method&lt;br /&gt;          &lt;br /&gt;    @Inject &lt;br /&gt;    ShareDao shareDao;&lt;br /&gt;    &lt;br /&gt;    @Inject&lt;br /&gt;    PortfolioController portfolioController;&lt;br /&gt;    &lt;br /&gt;    @Test   &lt;br /&gt;    public void shouldAddCtpShareToUserPortfolio() {&lt;br /&gt;        // given&lt;br /&gt;        User user = portfolioController.getUser();&lt;br /&gt;        Share ctpShare = shareDao.getByKey("CTP");&lt;br /&gt;        &lt;br /&gt;        // when&lt;br /&gt;        portfolioController.buy(ctpShare, 1);&lt;br /&gt;        portfolioController.confirm();&lt;br /&gt;        &lt;br /&gt;        // then&lt;br /&gt;        assertThat(user.getSharesAmount(ctpShare)).isEqualTo(3);&lt;br /&gt;    }&lt;br /&gt;        &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Looks really simple, doesn't it? Well, it's almost that simple but there are some small details which you need to be aware of.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Producers&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;CDI provides a feature similar to &lt;a href="http://docs.jboss.com/seam/2.1.0.GA/api/org/jboss/seam/annotations/Factory.html" target="_blank"&gt;Seam factories&lt;/a&gt; or &lt;a href="http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/Provider.html" target="_blank"&gt;Guice providers&lt;/a&gt;. It's called producer and it allows you to create injectable dependency. This could be especially useful when creation of such an instance requires additional logic, i.e. it needs to be obtained from an external source. A logged in user in a web application is a good example here. Thanks to the CDI &lt;a href="http://docs.jboss.org/cdi/api/1.0/javax/enterprise/inject/Produces.html" target="_blank"&gt;&lt;code&gt;@Produces&lt;/code&gt;&lt;/a&gt; construct we can still have very clean code which just works! All we need to do in order to inject the currently logged in user to our bean is as simple as that:&lt;/p&gt;&lt;p&gt;1. Create a &lt;code&gt;@LoggedIn&lt;/code&gt; qualifier which will be used to define that a particular injection is expecting this concrete &lt;code&gt;User&lt;/code&gt; bean.&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Qualifier&lt;br /&gt;@Retention(RetentionPolicy.RUNTIME)&lt;br /&gt;@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})&lt;br /&gt;public @interface LoggedIn {&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;2. Implement the producer method which will instantiate the logged in user in the session scope just after he successfully accesses the application, so it will provide an instance of the &lt;code&gt;User&lt;/code&gt; class which is of &lt;code&gt;@LoggedIn&lt;/code&gt; "type".&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Produces @SessionScoped @LoggedIn User loggedInUser() {&lt;br /&gt;    // code for retrieving current user from session&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;3. Decorate all injection points in other beans where we need this instance.&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Inject @LoggedIn&lt;br /&gt;User user;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;However this construct could be problematic when writing tests and an attentive reader would probably already be concerned about it. But with Arquillian we will run our test code in the CDI container and there is no need to simulate login procedure, using mock http sessions or any other constructs. We can take full advantage of this fact and create producer method which will replace our original one and provide the user directly from entity manager for example.&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Produces @LoggedIn User loggedInUser() {&lt;br /&gt;    return entityManager.find(User.class, 1L);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;b&gt;Note: &lt;/b&gt;I removed &lt;code&gt;@SessionScoped&lt;/code&gt; annotation from &lt;code&gt;loggedInUser()&lt;/code&gt; producer method intentionally. Otherwise you could have troubles with Weld proxies and EclipseLink while trying to persist the entity class. For tests it actually does not make any difference.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Context handling&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;One small problem arrived when I tried to test logic based on the conversation context. I had to figure out a way to programmatically create the appropriate context which then will be used by the SUT (or CUT if you prefer this abbreviation), because I was getting &lt;code&gt;org.jboss.weld.context.ContextNotActiveException&lt;/code&gt;. Unfortunately I wasn't able to find anything related to it on the Arquillian forum or wiki, so I desperately jumped to the &lt;a href="http://anonsvn.jboss.org/repos/seam/examples/" target="_blank"&gt;Seam 3 examples&lt;/a&gt;. I read somewhere that they are also using this library to test their modules and sample projects. Bingo! I found what I was looking for. To make the test code more elegant I built my solution the same way as for handling the database in the first part - by using annotations and JUnit rules. Using a &lt;code&gt;@RequiredScope&lt;/code&gt; annotation on the test method will instruct JUnit rule to handle proper context initialization and cleanup after finishing the test. To make the code even cleaner we can implement such logic in a dedicated class and treat the enum as a factory:&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;public enum ScopeType {&lt;br /&gt;&lt;br /&gt;    CONVERSATION {&lt;br /&gt;        @Override&lt;br /&gt;        public ScopeHandler getHandler() {&lt;br /&gt;            return new ConversationScopeHandler();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    // ... other scopes&lt;br /&gt;    &lt;br /&gt;    public abstract ScopeHandler getHandler();&lt;br /&gt;    &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;public class ConversationScopeHandler implements ScopeHandler {&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void initializeContext() {&lt;br /&gt;        ConversationContext conversationContext = Container.instance().services().get(ContextLifecycle.class).getConversationContext();&lt;br /&gt;        conversationContext.setBeanStore(new HashMapBeanStore());&lt;br /&gt;        conversationContext.setActive(true);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void cleanupContext() {&lt;br /&gt;        ConversationContext conversationContext = Container.instance().services().get(ContextLifecycle.class).getConversationContext();&lt;br /&gt;        if (conversationContext.isActive()) {&lt;br /&gt;            conversationContext.setActive(false);&lt;br /&gt;            conversationContext.cleanup();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;The JUnit rule will only extract the annotation's value of the test method and delegate context handling to the proper implementation:&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;public class ScopeHandlingRule extends TestWatchman {&lt;br /&gt;&lt;br /&gt;    private ScopeHandler handler;&lt;br /&gt;    &lt;br /&gt;    @Override&lt;br /&gt;    public void starting(FrameworkMethod method) {&lt;br /&gt;        RequiredScope rc = method.getAnnotation(RequiredScope.class);&lt;br /&gt;        if (null == rc) {&lt;br /&gt;            return;&lt;br /&gt;        }       &lt;br /&gt;        ScopeType scopeType = rc.value();&lt;br /&gt;        handler = scopeType.getHandler();&lt;br /&gt;        handler.initializeContext();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    @Override&lt;br /&gt;    public void finished(FrameworkMethod method) {&lt;br /&gt;        if (null != handler) {&lt;br /&gt;            handler.cleanupContext();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Finally here's fully working test class with two additional test scenarios. I also used &lt;a href="http://www.dbunit.org/" target="_blank"&gt;DBUnit&lt;/a&gt; add-on from first post for convenience.&lt;/p&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@RunWith(Arquillian.class)&lt;br /&gt;public class PortfolioControllerTest {&lt;br /&gt;&lt;br /&gt;    @Rule&lt;br /&gt;    public DataHandlingRule dataHandlingRule = new DataHandlingRule();&lt;br /&gt;    &lt;br /&gt;    @Rule&lt;br /&gt;    public ScopeHandlingRule scopeHandlingRule = new ScopeHandlingRule();&lt;br /&gt;    &lt;br /&gt;    @Deployment&lt;br /&gt;    public static Archive&amp;lt;?&amp;gt; createDeploymentPackage() {&lt;br /&gt;        return ShrinkWrap.create("test.jar", JavaArchive.class)&lt;br /&gt;                         .addPackages(false, Share.class.getPackage(), &lt;br /&gt;                                             ShareEvent.class.getPackage())&lt;br /&gt;                         .addClasses(TradeTransactionDao.class, &lt;br /&gt;                                     ShareDao.class, &lt;br /&gt;                                     TradeService.class,&lt;br /&gt;                                     PortfolioController.class)&lt;br /&gt;                         .addManifestResource(new ByteArrayAsset("&amp;lt;beans /&amp;gt;".getBytes()), ArchivePaths.create("beans.xml"))&lt;br /&gt;                         .addManifestResource("inmemory-test-persistence.xml", ArchivePaths.create("persistence.xml"));&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    @PersistenceContext&lt;br /&gt;    EntityManager entityManager;&lt;br /&gt;    &lt;br /&gt;    @Inject &lt;br /&gt;    ShareDao shareDao;&lt;br /&gt;    &lt;br /&gt;    @Inject&lt;br /&gt;    TradeTransactionDao tradeTransactionDao;&lt;br /&gt;    &lt;br /&gt;    @Inject&lt;br /&gt;    PortfolioController portfolioController;&lt;br /&gt;    &lt;br /&gt;    @Test&lt;br /&gt;    @PrepareData("datasets/shares.xml")&lt;br /&gt;    @RequiredScope(ScopeType.CONVERSATION)&lt;br /&gt;    public void shouldAddCtpShareToUserPortfolio() {&lt;br /&gt;        // given&lt;br /&gt;        User user = portfolioController.getUser();&lt;br /&gt;        Share ctpShare = shareDao.getByKey("CTP");&lt;br /&gt;        &lt;br /&gt;        // when&lt;br /&gt;        portfolioController.buy(ctpShare, 1);&lt;br /&gt;        portfolioController.confirm();&lt;br /&gt;        &lt;br /&gt;        // then&lt;br /&gt;        assertThat(user.getSharesAmount(ctpShare)).isEqualTo(3);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    @Test&lt;br /&gt;    @PrepareData("datasets/shares.xml")&lt;br /&gt;    @RequiredScope(ScopeType.CONVERSATION)&lt;br /&gt;    public void shouldNotModifyUserPortfolioWhenCancelProcess() {&lt;br /&gt;        // given&lt;br /&gt;        User user = portfolioController.getUser();&lt;br /&gt;        Share ctpShare = shareDao.getByKey("CTP");&lt;br /&gt;        &lt;br /&gt;        // when&lt;br /&gt;        portfolioController.buy(ctpShare, 1);&lt;br /&gt;        portfolioController.cancel();&lt;br /&gt;        &lt;br /&gt;        // then&lt;br /&gt;        assertThat(user.getSharesAmount(ctpShare)).isEqualTo(2);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    @Test&lt;br /&gt;    @RequiredScope(ScopeType.CONVERSATION)&lt;br /&gt;    @PrepareData("datasets/shares.xml")&lt;br /&gt;    public void shouldRecordTransactionWhenUserBuysAShare() {&lt;br /&gt;        // given&lt;br /&gt;        User user = portfolioController.getUser();&lt;br /&gt;        Share ctpShare = shareDao.getByKey("CTP");&lt;br /&gt;        &lt;br /&gt;        // when&lt;br /&gt;        portfolioController.buy(ctpShare, 1);&lt;br /&gt;        portfolioController.confirm();&lt;br /&gt;&lt;br /&gt;        // then&lt;br /&gt;        List&amp;lt;TradeTransaction&amp;gt; transactions = tradeTransactionDao.getTransactions(user);&lt;br /&gt;        assertThat(transactions).hasSize(1);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    @Produces @LoggedIn User loggedInUser() {&lt;br /&gt;        return entityManager.find(User.class, 1L);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;For the full source code you can jump directly to our &lt;a href="http://ctpjava.googlecode.com/svn/trunk/arquillian-demo-02/" target="_blank"&gt;google code repository&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Conclusion&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;As you can see playing with Arquillian is pure fun for me. Latest 1.0.0.Alpha3 release brought a lot of &lt;a href="http://community.jboss.org/en/arquillian/blog/2010/07/30/arquillian-100-alpha3--released" target="_blank"&gt;new goodies&lt;/a&gt; to the table. I hope that the examples in this blog post convinced you that working with different scopes is quite straightforward and requires just a little bit of additional code. However it's still not the ideal solution because it's using &lt;a href="http://seamframework.org/Weld" target="_blank"&gt;Weld&lt;/a&gt;'s internal API to create and manage scopes. So if you are using a different CDI container you need to figure out how to achieve it, but it's just a matter of adjusting &lt;code&gt;ScopeHandler&lt;/code&gt; implementation to your needs.&lt;br /&gt;&lt;br /&gt;There is much more to write about Arquillian so keep an eye on our blog and share your thoughts and suggestions through comments.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-8415958076685057913?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/8415958076685057913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=8415958076685057913' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8415958076685057913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8415958076685057913'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/08/test-drive-with-arquillian-and-cdi-part.html' title='Test drive with Arquillian and CDI (Part 2)'/><author><name>Bartosz Majsak</name><uri>http://www.blogger.com/profile/17042462575032728792</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-4777806119878988214</id><published>2010-07-30T13:20:00.008+02:00</published><updated>2010-07-30T13:53:46.286+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jpa'/><category scheme='http://www.blogger.com/atom/ns#' term='jee'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>Using Seam 2 with JPA 2</title><content type='html'>It’s a difficult time to architect new Java web applications. &lt;a href="http://www.seamframework.org/"&gt;Seam 2&lt;/a&gt; is a proven and well working application stack, but we will hardly see many new versions on the Seam 2 train. Java EE 6 is in general an excellent option, but if your customer’s choice of application server does not yet support it, it is not reasonable. Also there is still some time left for &lt;a href="http://www.seamframework.org/Seam3"&gt;Seam 3&lt;/a&gt; prime time, which builds on top of Java EE 6.&lt;br /&gt;&lt;br /&gt;Facing this kind of choice recently, I looked into possible migration paths between the two variants. One thing I have seen often on Seam 2 applications is that people really like the Hibernate criteria API and therefore use Hibernate directly. While Hibernate is an excellent ORM framework, it’s preferrable to use the JPA API when moving to Java EE 6. So - why not use Seam 2 with JPA 2, which finally features an even better (typesafe) &lt;a href="http://docs.jboss.org/hibernate/stable/entitymanager/reference/en/html/querycriteria.html"&gt;criteria API&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;It turns out to be a quite easy setup (once you get classloading right), with some small extra modifications. I’ve been using Maven, Seam 2.2 and Hibernate 3.5.4 on JBoss 4.2.3. Lets start with preparing the server. You need to remove the old Hibernate and JPA classes and add the new persistence provider with some dependencies (of course this will be different on other servers):&lt;br /&gt;&lt;br /&gt;To be removed from server/lib:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5QjC-pWNxgk/TFK55Qma0vI/AAAAAAAAAp0/tI6AuCgGnMs/s1600/remove.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 187px; height: 183px;" src="http://4.bp.blogspot.com/_5QjC-pWNxgk/TFK55Qma0vI/AAAAAAAAAp0/tI6AuCgGnMs/s400/remove.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5499662488332587762" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Add to server/lib:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5QjC-pWNxgk/TFK6xVmhMaI/AAAAAAAAAqE/mBvy6VBN-30/s1600/add.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 283px; height: 273px;" src="http://3.bp.blogspot.com/_5QjC-pWNxgk/TFK6xVmhMaI/AAAAAAAAAqE/mBvy6VBN-30/s400/add.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5499663451747856802" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Next lets create a sample Seam project. I’m using the &lt;a href="http://ctpjava.blogspot.com/2010/04/jboss-seam-maven-archetype-video.html"&gt;CTP Maven archetype for Seam&lt;/a&gt;. In the POM file, remove the references to the Hibernate and old JPA libraries and add the new JPA 2 libraries:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;!-- Remove all embedded dependencies&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.jboss.seam.embedded&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;...&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;/dependency --&amp;gt; &lt;br /&gt;&lt;br /&gt; &amp;lt;dependency&amp;gt; &lt;br /&gt;    &amp;lt;groupId&amp;gt;org.hibernate.javax.persistence&amp;lt;/groupId&amp;gt;&lt;br /&gt;     &amp;lt;artifactId&amp;gt;hibernate-jpa-2.0-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;     &amp;lt;version&amp;gt;1.0.0.Final&amp;lt;/version&amp;gt;&lt;br /&gt;     &amp;lt;scope&amp;gt;provided&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.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;hibernate-core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;3.5.4-Final&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;scope&amp;gt;provided&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.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;hibernate-jpamodelgen&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;1.0.0.Final&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note: If you’ve been using embedded JBoss for your integration tests, this will probably not work without exchanging the JARS there too. I’ve been moving away from this approach as it turned out to be a common reason for headache on our nightly builds as well as running tests in Eclipse. I’m very excited to see &lt;a href="http://ctpjava.blogspot.com/2010/07/test-drive-with-arquillian-and-cdi-part.html"&gt;Arquillian evolving&lt;/a&gt; on this topic!&lt;br /&gt;&lt;br /&gt;JPA 2 integrates with JSR 303 bean validation, which is the successor of &lt;a href="http://docs.jboss.org/hibernate/stable/validator/reference/en-US/html/"&gt;Hibernate Validator&lt;/a&gt;. Unfortunately Seam 2 has references to Hibernate Validator 3, where JPA needs version 4. Adding the validator legacy JAR fixes this problem. As bean validation is now part of Java EE 6, we can add it to the server classpath as shown above, as well as to our POM:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;validation-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;javax.validation&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;1.0.0.GA&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now it’s time to move to some code. You can jump straight in your persistence config files and bring the schema up to version 2:&lt;br /&gt;&lt;pre name="code" class="xml"&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_2_0.xsd" &lt;br /&gt;             version="2.0"&amp;gt; ...&lt;br /&gt;&lt;br /&gt;&amp;lt;entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"&lt;br /&gt;      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"&lt;br /&gt;      version="2.0"&amp;gt; ...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Seam proxies entity managers to implement features like EL replacements in JPQL queries. This proxy does not implement methods new in JPA 2 and will therefore fail.  You can write your own proxy very easy:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;public class Jpa2EntityManagerProxy implements EntityManager {&lt;br /&gt;    &lt;br /&gt;    private EntityManager delegate;&lt;br /&gt;&lt;br /&gt;    public Jpa2EntityManagerProxy(EntityManager entityManager) {&lt;br /&gt;        this.delegate = entityManager;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    @Override&lt;br /&gt;    public Object getDelegate() {&lt;br /&gt;       return PersistenceProvider.instance()&lt;br /&gt;               .proxyDelegate(delegate.getDelegate());&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void persist(Object entity) {&lt;br /&gt;        delegate.persist(entity);&lt;br /&gt;    }&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add the special Seam functionality as needed. In order to use the proxy with Seam, you’ll have to overwrite the HibernatePersistenceProvider Seam component:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Name("org.jboss.seam.persistence.persistenceProvider")&lt;br /&gt;@Scope(ScopeType.STATELESS)&lt;br /&gt;@BypassInterceptors&lt;br /&gt;// The original component is precedence FRAMEWORK&lt;br /&gt;@Install(precedence = Install.APPLICATION, &lt;br /&gt;        classDependencies={"org.hibernate.Session",&lt;br /&gt;                           "javax.persistence.EntityManager"})&lt;br /&gt;public class HibernateJpa2PersistenceProvider extends HibernatePersistenceProvider {&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public EntityManager proxyEntityManager(EntityManager entityManager) {&lt;br /&gt;       return new Jpa2EntityManagerProxy(entityManager);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you use Hibernate Search, have a look at the superclass implementation - you might want to instantiate a FullTextEntityManager directly (as you have it in your classpath - but note that this has not been tested here).&lt;br /&gt;&lt;br /&gt;Both implementations are on our &lt;a href="http://ctpjava.googlecode.com/svn/trunk/repository"&gt;Google Code repository&lt;/a&gt;, and you can integrate them directly over the following Maven dependency:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;com.ctp.seam&amp;lt;/groupId&amp;gt;&lt;br /&gt;     &amp;lt;artifactId&amp;gt;seam-jpa2&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You’re now ready to code JPA 2 queries! We’ve already included the meta model generator utility, so let’s activate it for the build:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;build-helper-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;executions&amp;gt;&lt;br /&gt;        &amp;lt;execution&amp;gt;&lt;br /&gt;            &amp;lt;id&amp;gt;add-source&amp;lt;/id&amp;gt;&lt;br /&gt;            &amp;lt;phase&amp;gt;validate&amp;lt;/phase&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;                &amp;lt;goal&amp;gt;add-source&amp;lt;/goal&amp;gt;&lt;br /&gt;            &amp;lt;/goals&amp;gt;&lt;br /&gt;            &amp;lt;configuration&amp;gt;&lt;br /&gt;                &amp;lt;sources&amp;gt;&lt;br /&gt;                    &amp;lt;source&amp;gt;${basedir}/src/main/hot&amp;lt;/source&amp;gt;&lt;br /&gt;                    &amp;lt;source&amp;gt;${basedir}/target/metamodel&amp;lt;/source&amp;gt;&lt;br /&gt;                &amp;lt;/sources&amp;gt;&lt;br /&gt;            &amp;lt;/configuration&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;plugin&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.bsc.maven&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;maven-processor-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;1.3.1&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;id&amp;gt;process&amp;lt;/id&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;                &amp;lt;goal&amp;gt;process&amp;lt;/goal&amp;gt;&lt;br /&gt;            &amp;lt;/goals&amp;gt;&lt;br /&gt;            &amp;lt;phase&amp;gt;generate-sources&amp;lt;/phase&amp;gt;&lt;br /&gt;            &amp;lt;configuration&amp;gt;&lt;br /&gt;                &amp;lt;outputDirectory&amp;gt;${basedir}/target/metamodel&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;                &amp;lt;processors&amp;gt;&lt;br /&gt;                    &amp;lt;processor&amp;gt;&lt;br /&gt;                        org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor&lt;br /&gt;                    &amp;lt;/processor&amp;gt;&lt;br /&gt;                &amp;lt;/processors&amp;gt;&lt;br /&gt;            &amp;lt;/configuration&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;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In order to use the processor plugin, you also need the following Maven repositories in your POM:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;pluginRepository&amp;gt;&lt;br /&gt;    &amp;lt;id&amp;gt;annotation-processing-repository&amp;lt;/id&amp;gt;&lt;br /&gt;    &amp;lt;name&amp;gt;Annotation Processing Repository&amp;lt;/name&amp;gt;&lt;br /&gt;    &amp;lt;url&amp;gt;http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;/pluginRepository&amp;gt;&lt;br /&gt;&amp;lt;pluginRepository&amp;gt;&lt;br /&gt;    &amp;lt;id&amp;gt;jfrog-repository&amp;lt;/id&amp;gt;&lt;br /&gt;    &amp;lt;name&amp;gt;JFrog Releases Repository&amp;lt;/name&amp;gt;&lt;br /&gt;    &amp;lt;url&amp;gt;http://repo.jfrog.org/artifactory/plugins-releases&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;/pluginRepository&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Run the build, update the project config to include the new source folder - and finally we’re ready for some sample code:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Name("userDao")&lt;br /&gt;@AutoCreate&lt;br /&gt;public class UserDao {&lt;br /&gt;&lt;br /&gt;    @In&lt;br /&gt;    private EntityManager entityManager;&lt;br /&gt;    &lt;br /&gt;    private ParameterExpression&amp;lt;String&amp;gt; param;&lt;br /&gt;    private CriteriaQuery&amp;lt;User&amp;gt; query;&lt;br /&gt;    &lt;br /&gt;    @Create&lt;br /&gt;    public void init() {&lt;br /&gt;        CriteriaBuilder cb = entityManager.getCriteriaBuilder();&lt;br /&gt;        query = cb.createQuery(User.class);&lt;br /&gt;        param = cb.parameter(String.class);&lt;br /&gt;        Root&amp;lt;User&amp;gt; user = query.from(User.class);&lt;br /&gt;        query.select(user)&lt;br /&gt;             .where(cb.equal(user.get(User_.username), param));&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public User lookupUser(String username) {&lt;br /&gt;        return entityManager.createQuery(query)&lt;br /&gt;                .setParameter(param, username)&lt;br /&gt;                .getSingleResult();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is now quite close to Java EE 6 code - all we will have to do is exchange some annotations:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@Stateful&lt;br /&gt;public class UserDao {&lt;br /&gt;&lt;br /&gt;    @PersistenceContext&lt;br /&gt;    private EntityManager entityManager; ...&lt;br /&gt;&lt;br /&gt;    @Inject&lt;br /&gt;    public void init() { ...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-4777806119878988214?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/4777806119878988214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=4777806119878988214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/4777806119878988214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/4777806119878988214'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/07/using-seam-2-with-jpa-2.html' title='Using Seam 2 with JPA 2'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5QjC-pWNxgk/TFK55Qma0vI/AAAAAAAAAp0/tI6AuCgGnMs/s72-c/remove.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-6203036377171397646</id><published>2010-07-13T14:19:00.000+02:00</published><updated>2010-07-14T09:30:06.842+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='arquillian'/><category scheme='http://www.blogger.com/atom/ns#' term='bartosz'/><category scheme='http://www.blogger.com/atom/ns#' term='jee'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='junit'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>Test drive with Arquillian and CDI (Part 1)</title><content type='html'>&lt;p&gt;Here at Cambridge Technology Partners we are as serious about testing as we are about cutting-edge technologies like &lt;a href="http://jcp.org/en/jsr/detail?id=299" target="_blank"&gt;CDI&lt;/a&gt;. Last time we wrote about &lt;a href="http://ctpjava.blogspot.com/2009/10/unit-testing-ejbs-and-jpa-with.html" target="_blank"&gt;testing EJBs on embedded Glassfish&lt;/a&gt; and now we are back with something even more powerful, so keep on reading!&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Background&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Recently I was involved in a project based on JBoss Seam where we used &lt;a href="http://www.unitils.org/" target="_blank"&gt;Unitils&lt;/a&gt; for testing business logic and JPA. I really like this library, mainly because of the following aspects:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Provides easy configuration and seamless integration of JPA (also a little bit of DI).&lt;/li&gt;&lt;li&gt;Greatly simplifies management of the test data. All you need to do in order to seed your database with prepared data is providing a xml dataset (in a DBUnit flat xml format) and then add &lt;code&gt;@DataSet&lt;/code&gt; annotation on the test class or method. &lt;/li&gt;&lt;/ul&gt;Unitils library is definitely an interesting topic for another blog entry, but since we are going to dive into the Java EE 6 testing those of you who are not patient enough for next blog entry can jump directly to the &lt;a href="http://www.unitils.org/tutorial.html" target="_blank"&gt;tutorial site&lt;/a&gt;. I'm sure you will like it.&lt;/p&gt;&lt;p&gt;The only thing in Unitils which I'm not really comfortable with, is the fact that this library is not really designed for integration testing. The example which is clearly demonstrating it is an observer for Seam events. In this particular case we might need to leave unit testing world (mocks, spies and other test doubles) and develop real integration tests. The &lt;a href="http://docs.jboss.org/seam/2.0.1.GA/reference/en/html/testing.html" target="_blank"&gt;SeamTest&lt;/a&gt; module together with &lt;a href="http://community.jboss.org/docs/DOC-13843"&gt;JBoss Embedded&lt;/a&gt; could help but it's really a tough task to make it running  with Maven. On the other hand JBoss AS wasn't the target environment for us. Thankfully there is a new kid on the block from JBoss called &lt;a href="http://www.jboss.org/arquillian/" target="_blank"&gt;Arquillian&lt;/a&gt;. In the next part of this post I will try to summarize my hands-on experience with this very promissing integration testing library. But first things first, let's look briefly at CDI events.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;CDI Events&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;We are going to have  JEE6 workshops for our customers and I was extremely happy when my colleagues asked me to play around with Arquillian and prepare some integration tests. I picked up a piece of logic responsible for logging market transactions based on CDI events. In brief it is a design technique which provides components interaction without any compilation-time dependencies. It's similar to the observer pattern but in case of CDI events, producers and observers are entirely decoupled from each other. If following example won't give you a clear explanation of the concept please refer to this &lt;a href="http://www.andygibson.net/blog/index.php/2010/01/11/getting-started-with-jsf-2-0-and-cdi-part-3/" target="_blank"&gt;well written blog post&lt;/a&gt;. Let's take a look at quite simplified code example.&lt;/p&gt;&lt;pre name="code" class="java"&gt;import javax.ejb.Stateless;&lt;br /&gt;import javax.enterprise.event.Event;&lt;br /&gt;import javax.inject.Inject;&lt;br /&gt;&lt;br /&gt;@Stateless&lt;br /&gt;public class TradeService {&lt;br /&gt;&lt;br /&gt;  @Inject @Buy&lt;br /&gt;  private Event&amp;lt;ShareEvent&amp;gt; buyEvent;&lt;br /&gt;&lt;br /&gt;  public void buy(User user, Share share, Integer amount) {&lt;br /&gt;    user.addShares(share, amount);&lt;br /&gt;    ShareEvent shareEvent = new ShareEvent(share, user, amount);&lt;br /&gt;    buyEvent.fire(shareEvent);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  ...&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;import javax.enterprise.event.Observes;&lt;br /&gt;import javax.inject.Inject;&lt;br /&gt;import javax.inject.Singleton;&lt;br /&gt;&lt;br /&gt;@Singleton&lt;br /&gt;public class TradeTransactionObserver implements Serializable {&lt;br /&gt;&lt;br /&gt;  ...&lt;br /&gt;&lt;br /&gt;  @Inject&lt;br /&gt;  TradeTransactionDao tradeTransactionDao;&lt;br /&gt;&lt;br /&gt;  public void shareBought(@Observes @Buy ShareEvent event) {&lt;br /&gt;    TradeTransaction tradeTransaction = new TradeTransaction(event.getUser(), event.getShare(), event.getAmount(), TransactionType.BUY);&lt;br /&gt;    tradeTransactionDao.save(tradeTransaction);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  ...&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;To preserve the clear picture I'm not going to include &lt;code&gt;&lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/main/java/com/ctp/arquilliandemo/ex1/domain/Share.java" target="_blank"&gt;Share&lt;/a&gt;&lt;/code&gt;, &lt;code&gt;&lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/main/java/com/ctp/arquilliandemo/ex1/domain/TradeTransaction.java" target="_blank"&gt;TradeTransaction&lt;/a&gt;&lt;/code&gt;, &lt;code&gt;&lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/main/java/com/ctp/arquilliandemo/ex1/domain/User.java" target="_blank"&gt;User&lt;/a&gt;&lt;/code&gt; and &lt;code&gt;&lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/main/java/com/ctp/arquilliandemo/ex1/event/ShareEvent.java" target="_blank"&gt;ShareEvent&lt;/a&gt;&lt;/code&gt; classes. What is worth to mention however is that the instance of &lt;code&gt;&lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/main/java/com/ctp/arquilliandemo/ex1/event/ShareEvent.java" target="_blank"&gt;ShareEvent&lt;/a&gt;&lt;/code&gt; contains user, a share which he bought and amount. In the &lt;code&gt;&lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/main/java/com/ctp/arquilliandemo/ex1/domain/User.java" target="_blank"&gt;User&lt;/a&gt;&lt;/code&gt; entity we store a map of shares together with amount using new &lt;code&gt;@ElementCollection&lt;/code&gt; annotation introduced in JPA 2.0. It allows to use entity classes as keys in the map.&lt;/p&gt;&lt;pre name="code" class="java"&gt;@ElementCollection&lt;br /&gt;@CollectionTable(name="USER_SHARES")&lt;br /&gt;@Column(name="AMOUNT")&lt;br /&gt;@MapKeyJoinColumn(name="SHARE_ID")&lt;br /&gt;private Map&amp;lt;Share, Integer&amp;gt; shares = new HashMap&amp;lt;Share, Integer&amp;gt;();&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Then in the &lt;code&gt;&lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/main/java/com/ctp/arquilliandemo/ex1/domain/TradeTransaction.java" target="_blank"&gt;TradeTransaction&lt;/a&gt;&lt;/code&gt; entity we simply store this information and additionally date and &lt;code&gt;&lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/main/java/com/ctp/arquilliandemo/ex1/domain/TransactionType.java" target="_blank"&gt;TransactionType&lt;/a&gt;&lt;/code&gt;. Complete code example could be downloaded from our google code page - see &lt;a href="http://www.blogger.com/post-edit.g?blogID=3305419975676030648&amp;amp;postID=6203036377171397646#resources"&gt;Resources&lt;/a&gt; section at the bottom of the post.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;The very first test&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;We will use a following scenario for our test example (written in the &lt;a href="http://blog.dannorth.net/introducing-bdd/" target="_blank"&gt;BDD&lt;/a&gt; manner):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;&lt;b&gt;given&lt;/b&gt; user choose a CTP share,&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;&lt;b&gt;when &lt;/b&gt;he buys it,&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;&lt;b&gt;then&lt;/b&gt; market transaction should be logged.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;So the test method could look as follows:&lt;/p&gt;&lt;pre name="code" class="java"&gt;@Test&lt;br /&gt;public void shouldLogTradeTransactionAfterBuyingShare() {&lt;br /&gt;  // given&lt;br /&gt;  User user = em.find(User.class, 1L);&lt;br /&gt;  Share share = shareDao.getByKey("CTP");&lt;br /&gt;  int amount = 1;&lt;br /&gt;&lt;br /&gt;  // when&lt;br /&gt;  tradeService.buy(user, share, amount);&lt;br /&gt;&lt;br /&gt;  // then&lt;br /&gt;  List&amp;lt;TradeTransaction&amp;gt; transactions = tradeTransactionDao.getTransactions(user);&lt;br /&gt;  assertThat(transactions).hasSize(1);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;In the ideal world we could simply run this test in our favourite IDE or a build tool without writing a lot of plumbing code or dirty hacks to set up the environment like Glassfish, JBoss AS or Tomcat. And here's when &lt;a href="http://www.jboss.org/arquillian/" target="_blank"&gt;Arquillian&lt;/a&gt; comes to play. The main goal of this project is to provide a convenient way for developers to run tests either in embedded or remote containers. It's still in alpha version but amount of already supported containers is really impressive. It opens the door to world of easy and pleasant to write integration tests. There are only two things required in order to make our tests &lt;i&gt;"arquillian infected"&lt;/i&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Set &lt;code&gt;@RunWith(Arquillian.class)&lt;/code&gt; annotation  for you test class (or extend &lt;code&gt;Arquillian&lt;/code&gt; base class if you are a TestNG guy).&lt;/li&gt;&lt;li&gt;Prepare a deployment package using &lt;a href="http://www.jboss.org/shrinkwrap/"&gt;ShrinkWrap API&lt;/a&gt; in a method marked by the  &lt;code&gt;@Deployment&lt;/code&gt; annotation.&lt;/li&gt;&lt;/ol&gt;&lt;/p&gt;&lt;pre name="code" class="java"&gt;@Deployment&lt;br /&gt;public static Archive&amp;lt;?&amp;gt; createDeploymentPackage() {&lt;br /&gt;  return ShrinkWrap.create("test.jar", JavaArchive.class)&lt;br /&gt;                   .addPackages(false, Share.class.getPackage(),&lt;br /&gt;                                ShareEvent.class.getPackage(),&lt;br /&gt;                                TradeTransactionDao.class.getPackage())&lt;br /&gt;                   .addClass(TradeService.class)&lt;br /&gt;                   .addManifestResource(new ByteArrayAsset("&amp;lt;beans/&amp;gt;".getBytes()), ArchivePaths.create("beans.xml"))&lt;br /&gt;                   .addManifestResource("inmemory-test-persistence.xml", ArchivePaths.create("persistence.xml"));&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="font-size:x-large;"&gt;Odds and ends&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Until now I guess everything was rather easy to grasp. Unfortunately while playing with tests I encountered a few shortcomings but found the solutions which I hope make this post valuable for readers. Otherwise you could simply jump to the user guide and code examples, don't you?&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;JAR hell&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The most time consuming issue were the dependencies conflicts better known as &lt;b&gt;JAR hell&lt;/b&gt;. The target environment for the workshop application is Glassfish v3 so I used the embedded version for my integration tests. I decided to have my tests as integral part of the project and here problems began.&lt;/p&gt;&lt;p&gt;The main problem is that you cannot use &lt;code&gt;javaee-api &lt;/code&gt;because you will get exceptions while bootstrapping the container more or less similar to : &lt;span class="Apple-style-span"   style="  white-space: pre;font-family:monospace;color:#5b5b5b;"&gt;java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/validation/constraints/Pattern$Flag&lt;/span&gt; (&lt;a href="http://community.jboss.org/message/531881" target="_blank"&gt;related thread&lt;/a&gt; on JBoss forum). I also recommend not to download separated jars for each project which you are using because you will get even more exceptions :)&lt;/p&gt;&lt;p&gt;&lt;b&gt;Important remark here:&lt;/b&gt; if you are using JPA 2.0 with Criteria API  and a &lt;code&gt;hibernate-jpamodelgen &lt;/code&gt;module for generating metamodel classes then you should also exclude &lt;code&gt;org.hibernate.javax.persistence:hibernate-jpa-2.0-api&lt;/code&gt; dependency to avoid yet another class conflict.&lt;/p&gt;&lt;p&gt;You have basically two options:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Use &lt;code&gt;glassfish-embedded-all &lt;/code&gt;jar since it already contains all needed APIs.&lt;/li&gt;&lt;li&gt;Create a separated project for integration testing and forget about everything what I mentioned in this section.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Preparing a database for testing&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Next step is to create a data source for the Glassfish instance. But first we need to tell Arquillian to not delete the Glassfish server folder after each deployment / test execution (which is the default behaviour). All you need to do is to create a &lt;code&gt;arquillian.xml&lt;/code&gt; file and add following configuration:&lt;/p&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;arquillian xmlns="http://jboss.com/arquillian"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xmlns:glassfish="urn:arq:org.jboss.arquillian.glassfish.embedded30"&amp;gt;&lt;br /&gt;  &amp;lt;glassfish:container&amp;gt;&lt;br /&gt;    &amp;lt;glassfish:bindPort&amp;gt;9090&amp;lt;/glassfish:bindPort&amp;gt;&lt;br /&gt;    &amp;lt;glassfish:instanceRoot&amp;gt;src/test/glassfish-embedded30&amp;lt;/glassfish:instanceRoot&amp;gt;&lt;br /&gt;    &amp;lt;glassfish:autoDelete&amp;gt;false&amp;lt;/glassfish:autoDelete&amp;gt;&lt;br /&gt;  &amp;lt;/glassfish:container&amp;gt;&lt;br /&gt;&amp;lt;/arquillian&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Then we need to take a &lt;code&gt;domain.xml &lt;/code&gt; file from our normal Glassfish instance (i.e. from &lt;code&gt;${glassfish_home}/glassfish/domains/domain1/config&lt;/code&gt;), remove all &lt;code&gt;&amp;lt;applications&amp;gt; &lt;/code&gt; and &lt;code&gt;&amp;lt;system-applications&amp;gt;&lt;/code&gt; nodes, add new data source and copy it to the &lt;code&gt;src/test/glassfish-embedded-30/config&lt;/code&gt; folder. We will use  HSQL 1.8.0.7 version in our tests (2.0 version is causing some problems with DBUnit). &lt;/p&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications" version="22"&amp;gt;&lt;br /&gt;  &amp;lt;system-applications /&amp;gt;&lt;br /&gt;  &amp;lt;applications /&amp;gt;&lt;br /&gt;  &amp;lt;resources&amp;gt;&lt;br /&gt;    ...&lt;br /&gt;    &amp;lt;jdbc-connection-pool res-type="java.sql.Driver" description="In memory HSQLDB instance" name="arquilliandemo" driver-classname="org.hsqldb.jdbcDriver"&amp;gt;&lt;br /&gt;      &amp;lt;property name="URL" value="jdbc:hsqldb:mem:arquilliandemomem" /&amp;gt;&lt;br /&gt;      &amp;lt;property name="user" value="sa" /&amp;gt;&lt;br /&gt;      &amp;lt;property name="password" value="" /&amp;gt;&lt;br /&gt;    &amp;lt;/jdbc-connection-pool&amp;gt;&lt;br /&gt;    &amp;lt;jdbc-resource pool-name="arquilliandemo" jndi-name="arquilliandemo-ds" /&amp;gt;&lt;br /&gt;  &amp;lt;/resources&amp;gt;&lt;br /&gt;  &amp;lt;servers&amp;gt;&lt;br /&gt;    &amp;lt;server name="server" config-ref="server-config"&amp;gt;&lt;br /&gt;      ...&lt;br /&gt;      &amp;lt;resource-ref ref="arquilliandemo-ds" /&amp;gt;&lt;br /&gt;    &amp;lt;/server&amp;gt;&lt;br /&gt;  &amp;lt;/servers&amp;gt;&lt;br /&gt;  &amp;lt;configs&amp;gt;&lt;br /&gt;    ...&lt;br /&gt;  &amp;lt;/configs&amp;gt;&lt;br /&gt;&amp;lt;/domain&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;The last file which you need to take from &lt;code&gt;${glassfish_home}/glassfish/domains/domain1/config &lt;/code&gt;folder is &lt;code&gt;server.policy&lt;/code&gt;. And that's it! You have running Glassfish with HSQL database ready for some serious testing.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Data preparation&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;As I mentioned in the introductory section I really like Unitils and the way how you can seed the database with the test data. The only thing to do is to provide an XML file in flat dbunit format like this one:&lt;/p&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;dataset&amp;gt;&lt;br /&gt;  &amp;lt;user id="1" firstname="John" lastname="Smith" username="username" password="password" /&amp;gt;&lt;br /&gt;  &amp;lt;share id="1" key="CTP" price="18.00" /&amp;gt;&lt;br /&gt;&amp;lt;/dataset&amp;gt;&lt;/pre&gt;&lt;p&gt;and then put the &lt;code&gt;@DataSet("test-data.xml") &lt;/code&gt;annotation either on the test method or a class.&lt;/p&gt;&lt;p&gt;I was really missing this feature so I decided to implement it myself. Very cool way of adding such behaviour is by using a JUnit rule. This mechanism, similar to interceptors, has been available since 4.7 release. I choose to extend the &lt;a href="http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TestWatchman.html" target="_blank"&gt;&lt;code&gt;TestWatchman&lt;/code&gt;&lt;/a&gt; class since it provides methods to hook around test invocation. You can see the &lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/test/java/com/ctp/test/db/DataHandlingRule.java" target="_blank"&gt;rule's logic&lt;/a&gt; based on the &lt;a href="http://code.google.com/p/ctpjava/source/browse/trunk/arquillian-demo-01/src/test/java/com/ctp/test/db/XmlDatasetSeeder.java" target="_blank"&gt;DBUnit flat xml data for seeding database&lt;/a&gt; in the &lt;a href="http://www.blogger.com/post-edit.g?blogID=3305419975676030648&amp;amp;postID=6203036377171397646#resources"&gt;example project&lt;/a&gt;. All you need to do is to create a public field in your test class and decorate it with &lt;code&gt;@Rule&lt;/code&gt; annotation. Here's the complete test class.&lt;br /&gt;&lt;/p&gt;&lt;pre name="code" class="java"&gt;@RunWith(Arquillian.class)&lt;br /&gt;public class TradeServiceTest {&lt;br /&gt;&lt;br /&gt;  @Deployment&lt;br /&gt;  public static Archive&amp;lt;?&amp;gt; createDeploymentPackage() {&lt;br /&gt;    return ShrinkWrap.create("test.jar", JavaArchive.class)&lt;br /&gt;                     .addPackages(false, Share.class.getPackage(),&lt;br /&gt;                                  ShareEvent.class.getPackage(),&lt;br /&gt;                                  TradeTransactionDao.class.getPackage())&lt;br /&gt;                     .addClass(TradeService.class)&lt;br /&gt;                     .addManifestResource(new ByteArrayAsset("&amp;lt;beans /&amp;gt;".getBytes()), ArchivePaths.create("beans.xml"))&lt;br /&gt;                     .addManifestResource("inmemory-test-persistence.xml", ArchivePaths.create("persistence.xml"));&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Rule&lt;br /&gt;  public DataHandlingRule dataHandlingRule = new DataHandlingRule();&lt;br /&gt;&lt;br /&gt;  @PersistenceContext&lt;br /&gt;  EntityManager em;&lt;br /&gt;&lt;br /&gt;  @Inject&lt;br /&gt;  ShareDao shareDao;&lt;br /&gt;&lt;br /&gt;  @Inject&lt;br /&gt;  TradeTransactionDao tradeTransactionDao;&lt;br /&gt;&lt;br /&gt;  @Inject&lt;br /&gt;  TradeService tradeService;&lt;br /&gt;&lt;br /&gt;  @Test&lt;br /&gt;  @PrepareData("datasets/shares.xml")&lt;br /&gt;  public void shouldLogTradeTransactionAfterBuyingShare() {&lt;br /&gt;    // given&lt;br /&gt;    User user = em.find(User.class, 1L);&lt;br /&gt;    Share share = shareDao.getByKey("CTP");&lt;br /&gt;    int amount = 1;&lt;br /&gt;&lt;br /&gt;    // when&lt;br /&gt;    tradeService.buy(user, share, amount);&lt;br /&gt;&lt;br /&gt;    // then&lt;br /&gt;    List&amp;lt;TradeTransaction&amp;gt; transactions = tradeTransactionDao.getTransactions(user);&lt;br /&gt;    assertThat(transactions).hasSize(1);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;I must admit that it's a JUnit specific solution, but you can always implement your own &lt;code&gt;@BeforeTest&lt;/code&gt; and &lt;code&gt;@AfterTest &lt;/code&gt;methods to achieve the same result in TestNG.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;DBUnit gotchas&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Using DBUnit's &lt;code&gt;CLEAN_INSERT&lt;/code&gt; strategy (or deleting table content after test execution by using &lt;code&gt;DELETE_ALL&lt;/code&gt;) could raise constraint violation exceptions. HSQL provides special &lt;a href="http://www.hsqldb.org/doc/guide/ch09.html#set_refint-section" target="_blank"&gt;SQL statement&lt;/a&gt; for this purpose and the sample project is invoking this statement just before DBUnit.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:x-large;"&gt;Final thoughts&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;All in all Arquillian is a really great integration testing tool with full of potential. It's just great that the JBoss guys are aiming to provide support for almost all widely used application servers and web containers. As you could see from the examples above it's not that hard to have tests for more sophisticated scenarios than you can find in the user guide. Keep your eyes on Arquillian - &lt;a href="https://jira.jboss.org/browse/ARQ#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel" target="_blan"&gt;the roadmap&lt;/a&gt; is really promising.&lt;br /&gt;In the upcoming second part I will dive into CDI contexts and demonstrate how to use Arquillian for testing contextual components.&lt;br /&gt;If you are writing an application for the Java EE 6 stack while not using Arquillian is a serious mistake!&lt;/p&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span" style=" font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="font-size:x-large;"&gt;Resources&lt;a id="resources"&gt; &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;ul&gt;&lt;li&gt;Full code example with all aspects mentioned in the article (&lt;a href="https://ctpjava.googlecode.com/svn/trunk/arquillian-demo-01"&gt;svn&lt;/a&gt; or &lt;a href="https://ctpjava.googlecode.com/svn/trunk/arquillian-demo-01/arquillian-demo-01.zip"&gt;zip&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;a href="http://easytesting.org/assert/wiki/pmwiki.php"&gt;Fest-Assert&lt;/a&gt;  - offers convenient assertions following fluent interface pattern&lt;i&gt; (&lt;/i&gt;&lt;code&gt;&lt;i&gt;assertThat()&lt;/i&gt;&lt;/code&gt;&lt;i&gt;).&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.infoq.com/news/2009/07/junit-4.7-rules"&gt;JUnit Rules on InfoQ&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://unitils.org/"&gt;Unitils&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-6203036377171397646?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/6203036377171397646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=6203036377171397646' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6203036377171397646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6203036377171397646'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/07/test-drive-with-arquillian-and-cdi-part.html' title='Test drive with Arquillian and CDI (Part 1)'/><author><name>Bartosz Majsak</name><uri>http://www.blogger.com/profile/17042462575032728792</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>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-2673338361563435740</id><published>2010-06-24T14:42:00.018+02:00</published><updated>2010-06-28T13:04:46.735+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jsf2'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><title type='text'>JSF composite component</title><content type='html'>On my latest project we used &lt;a href="http://www.jboss.org/richfaces"&gt;RichFaces&lt;/a&gt; as a component library. Our client didn't like to fill out the time with the RichFaces calendar. They wanted two combo boxes to fill out the time. I don't think this is the most user friendly way to solve picking a time (I like this &lt;a href="http://haineault.com/media/examples/jquery-utils/demo/ui-timepickr.html"&gt;timepicker&lt;/a&gt;) but our customer is king.&lt;br /&gt;&lt;br /&gt;I thought that there would be someone on the internet who already created a component like that, but I could not find any so I made my own. JSF 2 will introduce a new &lt;a href="http://www.ibm.com/developerworks/java/library/j-jsf2fu2/index.html"&gt;component creation&lt;/a&gt; method. It will be simpler  to create components and you do not have to write java code to make  them work. But until we have JSF 2 available on all major application  servers we will have to program some java for our components to work.&lt;br /&gt;&lt;br /&gt;The plan I had for creating it was simple enough just take two HtmlSelectOneMenu components and fill them with default options.&lt;br /&gt;&lt;br /&gt;So I ended with something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;private void createChildComponents(FacesContext context) {&lt;br /&gt;    Application application = context.getApplication();&lt;br /&gt;    hourInput = (HtmlSelectOneMenu) application.createComponent(HtmlSelectOneMenu.COMPONENT_TYPE);&lt;br /&gt;    minuteInput = (HtmlSelectOneMenu) application.createComponent(HtmlSelectOneMenu.COMPONENT_TYPE);&lt;br /&gt;    List&amp;lt;UIComponent&gt; children = getChildren();&lt;br /&gt;    children.add(hourInput);&lt;br /&gt;    HtmlOutputText sparator = (HtmlOutputText) application.createComponent(HtmlOutputText.COMPONENT_TYPE);&lt;br /&gt;    sparator.setValue(":");&lt;br /&gt;    children.add(sparator);&lt;br /&gt;    children.add(minuteInput);&lt;br /&gt;&lt;br /&gt;    UISelectItems hourItems = createSelectItems(application, 24, 1);&lt;br /&gt;    hourInput.getChildren().add(hourItems);&lt;br /&gt;&lt;br /&gt;    UISelectItems minuteItems = createSelectItems(application, 60, 5);&lt;br /&gt;    minuteInput.getChildren().add(minuteItems);&lt;br /&gt;    delegateProperties();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private UISelectItems createSelectItems(Application application, int number, int step) throws FacesException {&lt;br /&gt;    UISelectItems selectItems = (UISelectItems) application.createComponent(UISelectItems.COMPONENT_TYPE);&lt;br /&gt;    List&amp;lt;SelectItem&gt; items = new ArrayList&amp;lt;SelectItem&gt;();&lt;br /&gt;    for (int i = 0; i &amp;lt; number; i += step) {&lt;br /&gt;        items.add(new SelectItem(StringUtils.leftPad(String.valueOf(i), 2, "0")));&lt;br /&gt;    }&lt;br /&gt;    selectItems.setValue(items);&lt;br /&gt;    return selectItems;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Rendering this was not hard but to extract the selected value and store the submitted value back into the value binding, that was not so easy. First I tried to override the validate method but that didn't "sound" right, doing it in the updateModel was much better.&lt;br /&gt;&lt;br /&gt;The only weird thing I was still facing was that, sometimes the value from the hour and minute components were converted to Integer but sometimes they where not. So I ended up with this construction to ensure that they were always Integer.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void updateModel(FacesContext context) {&lt;br /&gt;        super.updateModel(context);&lt;br /&gt;&lt;br /&gt;        hourInput.validate(context);&lt;br /&gt;        minuteInput.validate(context);&lt;br /&gt;&lt;br /&gt;        ValueExpression valueExpression = getValueExpression("value");&lt;br /&gt;        Date value = (Date) valueExpression.getValue(context.getELContext());&lt;br /&gt;        if (value != null &amp;&amp; hourInput.getValue() != null &lt;br /&gt;         &amp;&amp; minuteInput.getValue() != null) {&lt;br /&gt;            Calendar calendar = Calendar.getInstance();&lt;br /&gt;            calendar.setTime(value);&lt;br /&gt;            Integer hour = Integer.valueOf(hourInput.getValue().toString());&lt;br /&gt;            calendar.set(Calendar.HOUR_OF_DAY, hour);&lt;br /&gt;            Integer minute = Integer.valueOf((minuteInput.getValue().toString()));&lt;br /&gt;            calendar.set(Calendar.MINUTE, minute);&lt;br /&gt;&lt;br /&gt;            valueExpression.setValue(context.getELContext(), calendar.getTime());&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here I'm using the Java Date API. That of course is extremely sadistic so we could change it to use &lt;a href="http://joda-time.sourceforge.net/"&gt;joda-time&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now to use it we first register it as a component in components.taglib.xml&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;facelet-taglib&gt;&lt;br /&gt;&amp;lt;namespace&gt;http://ctp-consulting.com/components&amp;lt;/namespace&gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;  usage: &amp;lt;ctp:timepicker value="date"/&gt;&lt;br /&gt; --&gt;&lt;br /&gt;&amp;lt;tag&gt;&lt;br /&gt;   &amp;lt;tag-name&gt;timepicker&amp;lt;/tag-name&gt;&lt;br /&gt;   &amp;lt;component&gt;&lt;br /&gt;      &amp;lt;component-type&gt;com.ctp.web.components.Timepicker&amp;lt;/component-type&gt;&lt;br /&gt;   &amp;lt;/component&gt;&lt;br /&gt;&amp;lt;/tag&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then make sure you have the components.taglib.xml registered in you're web.xml&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;context-param&gt;&lt;br /&gt; &amp;lt;param-name&gt;facelets.LIBRARIES&amp;lt;/param-name&gt;&lt;br /&gt; &amp;lt;param-value&gt;/WEB-INF/tags/components.taglib.xml;&amp;lt;/param-value&gt;&lt;br /&gt;&amp;lt;/context-param&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And here an example of use, fist add the namespace on the top of you're page:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt; xmlns:ctp="http://ctp-consulting.com/components"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then in our page you can do something like:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt; &amp;lt;ctp:timepicker value="#{catering.deliveryTime}"/&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Maybe this is not the best solution, if you have comments or tips, feel free drop them directly on this post. I'm interested in what you have to say!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2673338361563435740?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2673338361563435740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2673338361563435740' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2673338361563435740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2673338361563435740'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/06/jsf-composite-component.html' title='JSF composite component'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-702169321063670427</id><published>2010-06-05T10:49:00.000+02:00</published><updated>2010-06-05T10:49:44.258+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>Jazoon 2010</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;As a Java developer you'll need to stay on-top of what is new and noteworthy. A great way to do this is to go to a conference, because this is an interactive way to learn about new stuff. Together with &lt;a href="http://ctpjava.blogspot.com/2008/10/java-people-spotlight-douglas-rodrigues.html"&gt;Douglas&lt;/a&gt;, &amp;nbsp;I was attending &lt;a href="http://jazoon.com/"&gt;Jazoon&lt;/a&gt;,&amp;nbsp;an international conference held in Zurich, it is my first time here. Like &lt;a href="http://www.devoxx.com/display/Devoxx2K10/Home"&gt;Devoxx&lt;/a&gt; it's also held in a movie theater. Although Jazoon is also an international conference there are of course a lot of Swiss here and it's a little smaller. But that just means I have more change to win an iPad :D (didn't happen, too bad).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After the keynote the first presentation I attend is about REST. &lt;a href="http://www.innoq.com/blog/st/about/"&gt;Stefan Tilkov&lt;/a&gt; is the presenter and he does a nice job bashing web frameworks like &lt;a href="http://java.sun.com/javaee/javaserverfaces/"&gt;JSF&lt;/a&gt; that do not do &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;REST&lt;/a&gt; at all. He has a point, the web is about &lt;a href="http://en.wikipedia.org/wiki/Uniform_Resource_Identifier"&gt;URI&lt;/a&gt; (Unified Resource Indicator) and a document should be identified with that. That has always been the way of the web. And "modern" web application frameworks have a tendency not to change the URI for every resource and use only one HTTP method (e.g. POST) instead of all 7 of them. Stefan calls this abusing the web, or even desktop applications in disguise. I must agree to what he has to say about a lot of things. Search engines like Google work because of this and even if we are writing applications that are used inside intranets they are still web applications and they should be able to work accordingly. I'll need to investigate what people developing JSF thoughts are about this.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next up &lt;a href="http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/index.html"&gt;Blueprint&lt;/a&gt; by &lt;a href="https://www.springsource.com/people/cleau"&gt;Costin Leau&lt;/a&gt;, he works for &lt;a href="http://www.springsource.com/"&gt;SpringSource&lt;/a&gt;. I personally have not used Spring since &amp;nbsp;they were hesitant to adopt annotations and was rather using JBoss Seam ever since. But as we have customers interested in doing something with &lt;a href="http://www.osgi.org/Main/HomePage"&gt;OSGi&lt;/a&gt;&amp;nbsp;it will be interesting to see how they eased the way to develop something for OSGi. When I heard about Spring the first time, I was amazed and wondered why I didn't think of that. Now I have the same feeling with OSGi, it can be a lot simpler when you use IoC in combination with it. Blueprint is only a spec and there are 2 implementations. I really need to take a look at it because it looks really helpful.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_1_YR6TdF3aY/TAoLx4Hyf3I/AAAAAAAAOwc/bqSrtn-btqU/s1600/photo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/TAoLx4Hyf3I/AAAAAAAAOwc/bqSrtn-btqU/s320/photo.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;i&gt;On Thursday we had a nice Java roundtable to discuss all the news.&lt;br /&gt;Erik was all excited! :D&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;On day 2&lt;/b&gt; the keynote is from &lt;a href="http://www.scrumalliance.org/profiles/7"&gt;Ken Schwaber&lt;/a&gt; he is one of the founders of &lt;a href="http://www.scrum.org/"&gt;SCRUM&lt;/a&gt;. In his presentation he made the point that a lot of people who think they are doing scrum are actually not: Because they don't finish their user stories. This is due to the fact that we don't include enough when we say it's done. When is a user story &lt;a href="http://www.scrumalliance.org/articles/105-what-is-definition-of-done-dod"&gt;done&lt;/a&gt;? When user acceptance testing has taken place? Load test integration test and refactoring? When things like these are kept to the very end of the project a lot of work still remains to be done when the project should have been finished. According to Ken this work will be exponentially more then when you do it after each sprint. All in all it was quite a mood breaker because Ken tried to emphasize that a lot of software projects still fail and that we should be professional and fix that by changing what we call done.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://tech.kaazing.com/training/index.html"&gt;Peter Lubers&lt;/a&gt; (he must be Dutch :D ) had a talk about &lt;a href="http://www.kaazing.org/confluence/display/KAAZING/What+is+an+HTML+5+WebSocket"&gt;HTML 5 Websockets&lt;/a&gt;. I've heard about a couple of things that are going to be in the HTML 5 spec but I did not know about this! And this is very exiting: &amp;nbsp;there are a lot of projects that have tried to solve the problem how to push data to a web browser client. All of the implementations are not ideal. There are a couple of polling solutions, but the overhead that you get when making a request, on average, is about 800k. That does not look like much but if you want to scale your applications it is a lot. The way Websockets work is to "upgrade" your standard HTTP &amp;nbsp;connection to a socket where you can then send and receive data over. He showed a working example of this with Google Chrome the only browser that supports this right now- At the end of the presentation he said he talked to one of the technical guys from Microsoft and he has a strong feeling it will not be in &lt;a href="http://ie.microsoft.com/testdrive/"&gt;IE9&lt;/a&gt;, how nice is that (the &lt;a href="http://mashable.com/2010/01/29/google-ie6/"&gt;IE6&lt;/a&gt;&amp;nbsp;story all over).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The two talks I went to after lunch were both about &lt;b&gt;alternative languages on the JVM&lt;/b&gt; namely Groovy and Scala. And they we're both about &lt;a href="http://en.wikipedia.org/wiki/Distributed_Computing"&gt;Distributed Computing&lt;/a&gt;. I thought it was really exciting, all we need now is a customer with a large set of data and a need to compute something with. That is the only problem with distributed computing and with cloud computing even more so, it needs lot of data to work with. Otherwise there is no need to use it. This is even more true when you already use web applications. They scale very easy because they use the request response model. Every request could be handled by a separate thread or instance in a cluster. So interesting things are happening here and a lot of development is going into solutions based on distributed computing and cloud computing.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_1_YR6TdF3aY/TAoOt2nZe3I/AAAAAAAAOwk/LoHDho8G4JM/s1600/photo+(1).jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/TAoOt2nZe3I/AAAAAAAAOwk/LoHDho8G4JM/s320/photo+(1).jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;i&gt;Douglas and Daniel trying to get more infos about Web Sockets...&lt;br /&gt;Well...isn't that a game on that iPad?&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Last Day&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;On the last day of the conference the keynote was about Gaia the satellite that is going to map a lot of stars in our milky way.  It was interesting to see that they use Java to analyse the huge amount of data. And that there are still debates about Java being fast enough. Come on people it's 2010 Java is blazing fast!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The whole last day was more or less about testing. There were a lot of talks in this area and only one that I would like to mention here. There was a way to short talk about &lt;a href="http://www.jboss.org/arquillian/"&gt;Arquillian&lt;/a&gt;. I don't think that the presenters wanted to have a small slot but I guess they we're forced to use a small one. Arquillian is a cool way to test EJBs inside the container. The project is brand new and they still need to add support for a couple of containers. But it's looking really promising. I got a cool shirt at their presentation so I'll definitely keep an eye on this project :-). &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;Thoughts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All in all Jazoon was great to see and to be at. But if I would have to choose between Jazoon or Devoxx &amp;nbsp;I'd rather go for Devoxx. The idea I get is that Jazoon is younger than Devoxx and still has to&amp;nbsp;proof&amp;nbsp;itself as important and unique besides Devoxx. Of course Jazoon is better organized, everybody knows that people from Belgium are chaotic ( :D sorry guys), but that is not enough of course. At Jazoon I don't get yet the atmosphere you get from a Devoxx, this hold true for the size and quality of speakers too.&lt;br /&gt;&lt;br /&gt;But I do have a lot of new things I have to look at! So all in all it was a positive experience. I hope Jazoon gets more popularity so it will attract more people from around the world.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-702169321063670427?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/702169321063670427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=702169321063670427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/702169321063670427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/702169321063670427'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/06/jazoon-2010.html' title='Jazoon 2010'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_1_YR6TdF3aY/TAoLx4Hyf3I/AAAAAAAAOwc/bqSrtn-btqU/s72-c/photo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-6986333982988596436</id><published>2010-05-20T21:22:00.002+02:00</published><updated>2010-05-20T21:24:50.753+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='javaone'/><category scheme='http://www.blogger.com/atom/ns#' term='openworld'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>JavaOne 2010 and Oracle OpenWorld 2010</title><content type='html'>... or "Oracle acquired the city of San Francisco":&lt;br /&gt;This year is the first year of JavaOne under the umbrella of Oracle and it takes place in the same city and the same week as Oracle OpenWorld: September 19th - 23rd in San Francisco.&lt;br /&gt;&lt;br /&gt;You may ask how Oracle can host two conferences of that size at the same time in the same city: Moscone Center (for me the home of JavaOne) is now the home of &lt;a href="http://www.oracle.com/us/openworld/index.html"&gt;Oracle OpenWorld&lt;/a&gt; whereas &lt;a href="http://www.oracle.com/us/javaonedevelop/index.html"&gt;JavaOne&lt;/a&gt; has been relocated to the so called "The Zone" consisting of three large hotels, all near Union Square (see red markers in the following map):&lt;br /&gt;&lt;br /&gt;&lt;iframe frameborder="0" height="350" marginheight="0" marginwidth="0" scrolling="no" src="http://maps.google.com/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=113798857262975569717.0004870b2d3929d94520a&amp;amp;ll=37.784801,-122.404651&amp;amp;spn=0.002699,0.009319&amp;amp;t=h&amp;amp;output=embed" width="425"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;View &lt;a href="http://maps.google.com/maps/ms?ie=UTF8&amp;amp;hl=en&amp;amp;msa=0&amp;amp;msid=113798857262975569717.0004870b2d3929d94520a&amp;amp;ll=37.784801,-122.404651&amp;amp;spn=0.002699,0.009319&amp;amp;t=h&amp;amp;source=embed" style="color: blue; text-align: left;"&gt;JavaOne 2010&lt;/a&gt; in a larger map&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;Registration is open for both conferences and both do offer a discount at this moment when registering within the next few weeks.&lt;br /&gt;&lt;br /&gt;If you go to JavaOne for the first time you might want to compare it with last year's conference where it was hosted by Sun Microsystems for the last time:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-monday.html"&gt;Monday&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-tuesday-day-1.html"&gt;Tuesday&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-wednesday-day-2.html"&gt;Wednesday&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-thursday-day-3.html"&gt;Thursday&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-friday-day-4.html"&gt;Friday&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;We (the CTP Java Competence Group) are very curious how both conferences will present themselves in this new Java era led by Oracle.&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both;"&gt;&lt;a href="http://2.bp.blogspot.com/_1_YR6TdF3aY/S_WLLmn0SaI/AAAAAAAAOwA/93vFXvZgmvY/s1600/java.jpg" imageanchor="1"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/S_WLLmn0SaI/AAAAAAAAOwA/93vFXvZgmvY/s320/java.jpg" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_1_YR6TdF3aY/S_WL4bivvxI/AAAAAAAAOwI/BSzyoLmhfFU/s1600/oracle.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/S_WL4bivvxI/AAAAAAAAOwI/BSzyoLmhfFU/s320/oracle.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-6986333982988596436?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/6986333982988596436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=6986333982988596436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6986333982988596436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6986333982988596436'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/05/javaone-2010-and-oracle-openworld-2010.html' title='JavaOne 2010 and Oracle OpenWorld 2010'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_1_YR6TdF3aY/S_WLLmn0SaI/AAAAAAAAOwA/93vFXvZgmvY/s72-c/java.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-7337701458398660867</id><published>2010-04-29T09:00:00.054+02:00</published><updated>2010-04-29T10:10:50.603+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><category scheme='http://www.blogger.com/atom/ns#' term='people'/><title type='text'>Java People Spotlight: Erik Jan de Wit</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://farm4.static.flickr.com/3119/4560060299_9913486feb_o.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://farm4.static.flickr.com/3119/4560060299_9913486feb_o.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-style: italic;"&gt;After a rather long break, we are back with interesting articles in the pipeline, one of them released &lt;a href="http://ctpjava.blogspot.com/2010/04/jboss-seam-maven-archetype-video.html"&gt;yesterday&lt;/a&gt; containing a nice video tutorial!&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;So today we want to present a rather new member in the CTP Java gang: Erik Jan de Wit, dutch Java power at its best!&lt;br /&gt;Erik has joined &lt;a href="http://ctp.com/"&gt;Cambridge Technology Partners&lt;/a&gt; in February 2009. His technical excellence and social skills are true assets for our projects as well as for our Java oriented internal activities. Not without reasons, "@EJD" became an alias among CTP Java dudes to shortcut the fact that Erik will get "injected" and involved on projects, tasks...:-)&lt;br /&gt;So let's check out the answers by Erik then!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Java Competence Role&lt;/b&gt;:&lt;br /&gt;Senior Developer&lt;b&gt; &lt;/b&gt;[aka Singing Scrum Master]&lt;b&gt; &lt;br /&gt;My Master Kung-Fu Skills&lt;/b&gt;:&lt;br /&gt;Intergate new technology into existing projects fast&lt;br /&gt;&lt;b&gt;I'd be excited to get my hands dirty on&lt;/b&gt;:&lt;br /&gt;Scala, ESB, JavaFX, Cloud-Computing and the new EJD... sorry EJB Criteria... well it's anyway JPA Criteria API :-)&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Q&amp;amp;A&lt;/span&gt;   &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Hi Erik, how would your message look like if you would have to tell it via Twitter what you are currently doing?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;Be a great &lt;a href="http://en.wikipedia.org/wiki/Scrum_%28development%29"&gt;Scrum&lt;/a&gt; master on this time challenged project&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What was the greatest piece of code you have ever written so far?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;A screen scraper that enabled to integrate an external site into another site while changing all links back to our site including form actions.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q:&amp;nbsp;&lt;/span&gt;Really? I'm sure dutch scrum masters did something more fancy on projects than this....:-)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&amp;nbsp;&lt;/span&gt;Well yeah, you're right: So on my &lt;a href="http://kenai.com/people/21530-Erik-Jan"&gt;kenai.com&lt;/a&gt; account I published an open-source framework which is basically a reverse regular expression generator that is used in the testdata project to generate  test data that adheres to a specific regular expression. The testdata framework inspects your domain model and creates data for your  domain. So if you use hibernate validator or bean validation annotations in your  domain it will use the regular expression on the field to generate data that is  valid. So that's what I used later on projects.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Awesome!&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;A: &lt;/span&gt;And!! ... there is also a &lt;a href="http://www.scala-lang.org/"&gt;Scala&lt;/a&gt; version of it, based on the &lt;a href="http://www.scala-lang.org/docu/files/api/scala/util/parsing/combinator/syntactical/StandardTokenParsers.html"&gt;StandardTokenParsers&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Now we're talking :-)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have ever heard about programming?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;All my peers are trying to talk dutch... very nice!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have heard from our managers?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;I had to review Java code written in Turkish and my manager said: &lt;span style="font-style: italic;"&gt;"It is still Java, it is not Rocket Science!"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the most cutting-edge technology or framework you actually used on projects?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;jBPM, Seam, JSF and Java EE6&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is your favorite podcast?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;I really love the &lt;a href="http://www.javaposse.com/"&gt;Java Posse&lt;/a&gt;, I listen to it all the time... another that I like which is actually non-Java related is &lt;a href="http://www.bestofyoutube.com/"&gt;Best of Youtube VideoCast&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Which Java book can you recommend and for what reason?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;It seems that always the latest book I've read is the best one, in this case it's "&lt;a href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882"&gt;Clean Code&lt;/a&gt;" from "&lt;a href="http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew"&gt;Uncle &amp;nbsp;Bob&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;&lt;i&gt;You can further visit Erik at his &lt;a href="http://www.google.com/profiles/erikjan.dewit"&gt;Google Profile&lt;/a&gt; or on &lt;a href="http://ch.linkedin.com/pub/erik-jan-de-wit/0/255/aba"&gt;linkedin&lt;/a&gt;.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-7337701458398660867?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/7337701458398660867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=7337701458398660867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/7337701458398660867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/7337701458398660867'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/04/java-people-spotlight-erik-jan-de-wit.html' title='Java People Spotlight: Erik Jan de Wit'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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-3305419975676030648.post-3823216602706299785</id><published>2010-04-28T16:19:00.008+02:00</published><updated>2010-04-29T09:09:18.309+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chris'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>JBoss Seam Maven Archetype Video Tutorial</title><content type='html'>While the release of &lt;a href="http://in.relation.to/Bloggers/TheTimelineForSeam3" target="_blank"&gt;Seam 3 is getting closer&lt;/a&gt;, you might still want to do quick prototyping based on a Seam 2 project. Of course this is easiest done with either &lt;code&gt;seam-gen&lt;/code&gt;, or if you're like me a &lt;a href="http://maven.apache.org/" target="_blank"&gt;Maven&lt;/a&gt; user, with an Archetype.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ctpjava.blogspot.com/2008/09/java-people-spotlight-christoph-reimann.html"&gt;Chris&lt;/a&gt; has prepared a video tutorial on how to get started with our &lt;a href="http://code.google.com/p/ctpjava/wiki/JBossSeamMavenArchetype"&gt;Maven WAR archetype&lt;/a&gt; (featuring hot deploy, &lt;a href="http://testng.org/" target="_blank"&gt;TestNG&lt;/a&gt; with embedded JBoss and either &lt;a href="http://www.jboss.org/richfaces" target="_blank"&gt;RichFaces&lt;/a&gt; or &lt;a href="http://www.icefaces.org/" target="_blank"&gt;ICEFaces&lt;/a&gt; inclusion) based on one of my &lt;a href="http://ctpjava.blogspot.com/2009/07/jboss-seam-archetype-now-with-icefaces.html"&gt;previous articles&lt;/a&gt;. Check it out here (best seen in HD [UPDATE: sorry, missed the HD embed]):&lt;br /&gt;&lt;br /&gt;&lt;object width="480" height="295"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Zpn-teo1l3E&amp;ap=%2526fmt%3D18"&gt;&lt;/param&gt;&lt;param name="wmode" value="window"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Zpn-teo1l3E&amp;ap=%2526fmt%3D18" type="application/x-shockwave-flash" wmode="window" width="480" height="295"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-3823216602706299785?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/3823216602706299785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=3823216602706299785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/3823216602706299785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/3823216602706299785'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2010/04/jboss-seam-maven-archetype-video.html' title='JBoss Seam Maven Archetype Video Tutorial'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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-3305419975676030648.post-8526654441618960105</id><published>2009-11-20T13:33:00.002+01:00</published><updated>2009-11-20T13:58:05.625+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='people'/><category scheme='http://www.blogger.com/atom/ns#' term='sylvain'/><title type='text'>Java People Spotlight: Sylvain Berthouzoz</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SwaJjyr9pkI/AAAAAAAAOUw/Ngfqa2AiPIc/s1600/sylvain.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SwaJjyr9pkI/AAAAAAAAOUw/Ngfqa2AiPIc/s200/sylvain.JPG" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;The "People Spotlight" series is catching up after a rather long break... &lt;br /&gt;Sylvain has joined Cambridge Technology Partners in January 2006 and is an important know-how carrier in the Java Competence Group since then.&lt;br /&gt;So let's check out the answers by Sylvain then!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Java Competence Role&lt;/b&gt;:&lt;br /&gt;Developer&lt;b&gt; &lt;/b&gt;[aka Java Debugger or Mr. jBPM]&lt;b&gt; &lt;br /&gt;My Master Kung-Fu Skills&lt;/b&gt;:&lt;br /&gt;I can hit everyone with a single process in jBPM&lt;br /&gt;&lt;b&gt;I'd be excited to get my hands dirty on&lt;/b&gt;:&lt;br /&gt;JPA2:  see how they included the Criteria query...&lt;br /&gt;...and to see what &lt;a href="http://assassinscreed.uk.ubi.com/assassins-creed-2/"&gt;Ezio Audirore da Firenze&lt;/a&gt; will do.&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Q&amp;amp;A&lt;/span&gt;   &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Hi Sylvain, how would your message look like if you would have to tell it via Twitter what you are currently doing?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;Sitting in the train in hoping that the locomotive don’t break this time. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What was the greatest piece of code you have ever written so far?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;Testing if all the elements in a list are different from each other:&lt;br /&gt;&lt;pre class="java" name="code"&gt;List&lt; Long &gt; list = Arrays.asList(longs);&lt;br /&gt;Set&lt; Long &gt; set = new HashSet&lt; Long &gt;(list);&lt;br /&gt;return (longs.length == set.size());&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have ever heard about programming?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;“koffienodig”&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have heard from our managers?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;"There is not enough boxes here."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the most cutting-edge technology or framework you actually used on projects?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;JBoss Seam&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is your favorite podcast?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;The &lt;a href="http://www.gameblog.fr/podcasts.php" target="_blank"&gt;gameblog podcast&lt;/a&gt; every week. And the Java Posse from time to time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Which Java book can you recommend and for what reason?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;a href="http://www.manning.com/dallen/" target="_blank"&gt;Seam in Action&lt;/a&gt;, because it is a great book to start with seam and you’ll also learn how to play golf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-8526654441618960105?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/8526654441618960105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=8526654441618960105' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8526654441618960105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8526654441618960105'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/11/java-people-spotlight-sylvain.html' title='Java People Spotlight: Sylvain Berthouzoz'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_1_YR6TdF3aY/SwaJjyr9pkI/AAAAAAAAOUw/Ngfqa2AiPIc/s72-c/sylvain.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-8020825633539480666</id><published>2009-11-20T10:43:00.003+01:00</published><updated>2009-11-30T20:03:32.418+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><category scheme='http://www.blogger.com/atom/ns#' term='devoxx'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>Devoxx day 4/5</title><content type='html'>Day 4 was really great we had some very good keynote sessions. &lt;a href="http://devoxx.com/display/DV09/Ivar+Jacobson"&gt;Ivar Jacobson&lt;/a&gt; is the father of components and UML. In his presentation he told us about the work he is doing to standardise the methodologies. Now a lot of companies make their own flavour of a methodology or create an entirely new one but "steal" from others. He want to create reuse so that people don't have to relearn the entire thing but just have to learn the new parts. It's food for thought, that is for sure and if it works out we'll have to wait and see.&lt;br /&gt;&lt;br /&gt;After that, another great keynote from &lt;a href="http://devoxx.com/display/DV09/Robert+C.+Martin"&gt;Robert Martin&lt;/a&gt; a.k.a Uncle Bob he is the founder of &lt;a href="http://www.fitnesse.org/"&gt;fitnesse&lt;/a&gt; and very focused on TDD (Test driven development). His talk was about "Filling The Professionalism Gap" by being Craftsmen. What it comes down to, is to make more IT projects succeed, developers must see themselves more as craftsmen. That means that developers should have a more "ethic" approach in delivering things and only create software that is clean tested and that really works. This is what we already do at &lt;a href="http://www.ctp.com/"&gt;CTP&lt;/a&gt; but I think a lot of developers can learn from this.&lt;br /&gt;&lt;br /&gt;There were also some big announcements made at this Devoxx:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Closures are in JDK7&lt;/li&gt;&lt;li&gt;More new components in JavaFx 1.3&lt;/li&gt;&lt;/ol&gt;Big stuff and cool to hear that closures are going to make it in JDK7, that is a huge thing.&lt;br /&gt;&lt;br /&gt;Also I had some fun of this day at devoxx, I went to the presentation of the JavaPosse. And when you hear the recording you can probably hear me shout: "Switzerland" :-). Of course they had their beer sponsor &lt;a href="http://www.atlassian.com/"&gt;Atlassian&lt;/a&gt; so we had some nice Belgium beer (&lt;a href="http://www.duvel.be/"&gt;Duvel&lt;/a&gt;). A cool side effect of conferences is the fact that they are normally hosted inside a movie theatre: So at Devoxx they showed the new movie '2012', a very nice movie with lots of effects.&lt;br /&gt;&lt;br /&gt;And then it is already the last day and I didn't notice this before, but it's only half a day. So I had some good sessions today one from &lt;a href="http://www.devoxx.com/display/DV09/Andy+Wilkinson" title="Andy Wilkinson"&gt;Andy Wilkinson&lt;/a&gt; about Modular Web Applications with OSGi. He uses Spring DM (that's an application server, but not a &lt;a href="http://java.sun.com/javaee/overview/compatibility.jsp"&gt;Java EE certified&lt;/a&gt; one) to be able to split his web application vertically and/or horizontally in different OSGi bundles. That could be really good to manage big applications. Also he had some news, they are working on a version that does not require Spring DM, so that is definitely something we must keep an eye on.&lt;br /&gt;&lt;br /&gt;That is it from Antwerp, Devoxx 2009!&lt;br /&gt;So let's see what will happen with all the announcements made here in the next year...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-8020825633539480666?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/8020825633539480666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=8020825633539480666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8020825633539480666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8020825633539480666'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/11/devoxx-day-45.html' title='Devoxx day 4/5'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-1870838547270058330</id><published>2009-11-18T10:36:00.014+01:00</published><updated>2009-11-20T09:37:13.099+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><category scheme='http://www.blogger.com/atom/ns#' term='devoxx'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>Devoxx Day 3</title><content type='html'>The network at devoxx is letting me down a bit, so this post is a little bit late. This day is the first conference day, the university days are over. That means that there are a lot more people here than yesterday. Oracle (&lt;a href="http://devoxx.com/display/DV09/Steven+Harris"&gt;Steven Harris&lt;/a&gt;) had a long keynote talk in which interesting upcoming details have been presented with what is coming with future WebLogic releases. What they demo-ed was kinda cool. A modular WebLogic based on OSGi (often referred as mSA aka Micro Service Architecture) that you can assemble using a GUI tool. That you can also run in a virtual machine without adding an OS.&lt;br /&gt;&lt;br /&gt;Next keynote was presented by &lt;a href="http://devoxx.com/display/DV09/Roberto+Chinnici"&gt;Roberto Chinnici&lt;/a&gt; from SUN, he is the spec lead for JavaEE6 and gave a quick overview what is new in EE6. As I already had a 2 hours talk about that topic during the university days there was nothing new to me but all in all it well covered all aspects for people hearing about it for the first time. One of the cool things in Java EE 6 I like most is the modularity of the web.xml being part of the Servlet 3.0 spec. Using 3rd party frameworks only requires to add a library, instead of also adding a servlet or servlet filter in your web.xml.&lt;br /&gt;&lt;br /&gt;Also announced in the keynote is that everything presented at Devoxx is going to be released on parleys.com (currently upgraded to version 3!! ). That is great as all the presentations I've visited can be watched again including comments by other visitors etc.&lt;br /&gt;&lt;br /&gt;During the break I ran into a lot of people I know from previous companies I worked for. It is always nice to hear what they are doing now and what other sessions they have seen and to tell them if they ever want to work for a nice company in Switzerland, I would know a good one :D&lt;br /&gt;&lt;br /&gt;Now an update on where JDK7 is right now by &lt;a href="http://devoxx.com/display/DV09/Mark+Reinhold" title="Mark Reinhold"&gt;Mark Reinhold&lt;/a&gt;. Great talk about what is important and where the focus for making Java move forward is going to lay. Talking about Project Jigsaw this is the first time ever I have seen some implementation how this could/would work. The shame is that there is no JSR for Java SE 7 so all development will not progress as long as this is the case. What was very surprising is that Mark wants Closures in, but in a very simple form, but that is great news for a lot of things Closures will make my code look nice.&lt;br /&gt;&lt;br /&gt;In the keynote Apple gets a lot of criticism about being slow accepting apps in the store and the kind of feedback Apple provides when apps are disallowed.&lt;br /&gt;&lt;br /&gt;Lunch break: Bumping into a lot of people again that I know; Talking to someone from JBoss about their community, now I have a nice CD to give away.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.devoxx.com/display/DV09/James+Gosling" title="James Gosling"&gt;James Gosling&lt;/a&gt; is talking about the &lt;a href="http://java.com/en/store/"&gt;Java Store&lt;/a&gt; and I hope he is going to tell us that we here in Europe can use it now. So he is talking that we should provide him with feedback on the stuff they made, but as of now the Java Store is still not accessible for us. That makes his whole talk a bit pointless. Yes, I would love to have a platform I can sell my hobby projects with, but no need to tell me about how great it is when I still can't use it. There are a couple of countries being added in the near future, but Switzerland is not one of them.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.devoxx.com/display/DV09/Cameron+Purdy" title="Cameron Purdy"&gt;Cameron Purdy&lt;/a&gt; tells us how we should change our programming paradigms if we want to use multi core, multi node programs. So the answer to all our problems is to use partitioning? I'm a bit puzzled how I could use this. I think this presentation could have been a bit more concrete. He presents all theoretical ways to do parallel distributed computing. At the very end I know why everything was so vague, if you want an implementation of all of what he talked about than you'll need to buy Coherence a bit of an anticlimax.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.devoxx.com/display/DV09/Doug+Tidwell" title="Doug Tidwell"&gt;Doug Tidwell&lt;/a&gt; will now tell us a little about how to extract a way from implementations of cloud computing. He is from IBM an I hope this is not another product plug and it turns out that it's not, he is funny and a good speaker. What he is trying to tell us is that we need a standard for doing cloud computing, an API to talk to different clouds. The problem is that the services that clouds provide now are so diverse that one API to rule them all makes no sense. That is a bit what I miss, nobody is talking about how using a cloud will impact my design.&lt;br /&gt;&lt;br /&gt;Then one of the creators of the Android platform &lt;a href="http://www.devoxx.com/display/DV09/Romain+Guy" title="Romain Guy"&gt;Romain Guy&lt;/a&gt; will talk about animation. &lt;a href="http://www.devoxx.com/display/DV09/Romain+Guy" title="Romain Guy"&gt;Romain Guy&lt;/a&gt; is really famous in the Java world so his presentation will be good. It's about animating GUI using the cartoon rules. There are some basic cartoon rules for doing animation he shows us how they apply to GUI animation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-1870838547270058330?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/1870838547270058330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=1870838547270058330' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1870838547270058330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1870838547270058330'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/11/devoxx-day-3.html' title='Devoxx Day 3'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-8569818265231331791</id><published>2009-11-17T11:28:00.017+01:00</published><updated>2009-11-18T10:40:27.341+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><category scheme='http://www.blogger.com/atom/ns#' term='devoxx'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>Devoxx day 2</title><content type='html'>Today it is day two at Devoxx. What I didn't put in &lt;a href="http://ctpjava.blogspot.com/2009/11/devoxx-day-1.html"&gt;my last post&lt;/a&gt; is the BOF I went to last night. BOFs here are great - there are only a couple of people in the room, it is really different than at &lt;a href="http://java.sun.com/javaone/"&gt;JavaOne&lt;/a&gt; where there are a lot more people. So yesterday I had a BOF with the JSF spec leads (well the 3 key persons: Dan Allen,  Peter Muir and  Andy Schwartz) and we could in a very relaxed setting ask them some questions about the JSF 2 spec. So we could find out how and why they made some decisions. The question I asked them: "Why is JSF 2 not more focused on components so that I can mix and match components of 3rd party providers?". The answer was that they are looking into that and that a lot of problems one has with that right now is how resources are loaded: all 3rd parties made something on their own. So now all the AJAX stuff needs to be gathered and then they will look into that. Good answer, I'm glad that they are aware of what lives in the community.&lt;br /&gt;&lt;br /&gt;My first session of today is a session about JEE6. They are talking about and demo-ing everything that is new in the spec. &lt;a href="http://www.antoniogoncalves.org/xwiki/bin/view/Main/WebHome" rel="nofollow"&gt;Antonio Goncalves&lt;/a&gt; a French Java Rockstar has a lot of humor and a nice presenting style. JSF 2.0 is kind of confusing, because it could run on servlet 2.5 but also on 3.0 but then less needs to be configured. Yesterday the expert group also talked about this that they communicate better what is now the "preferred" way of doing things. This is difficult when you make a spec. You can't remove things, because it needs to be backwards compatible. This is also the case for EJB3 - there is now a EJB3.1 lite edition where all old stuff is removed. According to them there are some containers being built that only support this spec.&lt;br /&gt;&lt;br /&gt;JavaFX is what my next talk is about. This is hyped a lot by Sun and now with the takeover by Oracle also Oracle will continue with JavaFX. The last changes around JavaFX involved a lot of tooling at this year's JavaOne. &lt;a href="http://blogs.sun.com/tor" target="_blank"&gt;Tor Norbye&lt;/a&gt; presented a tool for designers that they can layout an application for mobile and desktop.  &lt;a href="http://devoxx.com/display/DV09/Stephen+Chin"&gt;Stephen Chin&lt;/a&gt;&lt;span id="breadcrumb-display" class="breadcrumbs"&gt; also a Java Champion starts with a nice little JavaFX Puzzle.  For his demo he is using twitter but that was a bit of a poor choice, because with the Devoxx network, reaching twitter proves a bit of a challenge. So most of the time we are waiting for some internet resource to load. So I'm changing again, I already know the basics about JavaFX and I was hoping this would be a little bit more deep dive. &lt;/span&gt;&lt;a href="http://devoxx.com/display/DV09/Emmanuel+Bernard" title="Emmanuel Bernard"&gt;Emmanuel Bernard&lt;/a&gt; is also a guru of the Hibernate team and here at Devoxx he is talking about integrating &lt;a href="http://lucene.apache.org/"&gt;Lucene&lt;/a&gt; into Hibernate as an alternative query API. So the bridge they have built for Hibernate is really cool. In the past we did this on ourselves, have a Lucene index to search on and then load entities when needed. But with the Hibernate search query API we can do it "automatically".&lt;br /&gt;&lt;br /&gt;During the lunch I talked to &lt;a href="http://ceki.blogspot.com/"&gt;Ceki Gülcü&lt;/a&gt; who is also from Switzerland and giving a talk about logback, the continuation of the dead log4j project, tomorrow. He would make a nice speaker on the &lt;a href="http://www.jugs.ch/"&gt;JUGS&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now it's time for tools in action again, first up is &lt;a href="http://www.gradle.org/"&gt;Gradle&lt;/a&gt;. Hans Dockter is the project lead and he gives an introduction about Gradle. Gradle is a build tool that uses CoC and has a DSL to configure your build. Yet another build tool, but this time is using groovy DSL to make a build file. I also &lt;a href="http://ctpjava.blogspot.com/2009/09/maven-3-early-access.html"&gt;blogged&lt;/a&gt; that Maven3 is also going to provide this. I don't know what Hans is trying to explain to me or how this is better than Maven3, but he is a bit chaotic. After a while there is a new speaker that is even worse. I think there are some good options in Gradle, but these are not the guys to explain it to me. One thing I did get from the presentation that you could fork your test over more threads, which is cool.&lt;br /&gt;&lt;br /&gt;Next up is &lt;a href="http://devoxx.com/display/DV09/Scala+Actors" title="Scala Actors"&gt;Scala Actors&lt;/a&gt; that will be a good one. You all know of course that &lt;a href="http://www.scala-lang.org/"&gt;Scala&lt;/a&gt;&lt;span id="breadcrumb-display" class="breadcrumbs"&gt; is a language on top of the JVM and developed in Switzerland. Because computers are getting more and more processors, functional languages like Scala could be very useful for this, because they are stateless and you don't need to think about how to distribute the work. After a little history lesson, &lt;/span&gt;&lt;a href="http://devoxx.com/display/DV09/Scala+Actors" title="Scala Actors"&gt;Frank Sommers&lt;/a&gt; gave us a concrete example of how Actors can be used in Scala. It's great, a lot of stuff you get for free. Of course the concept of Actors is not bound to Scala, but there are things that Scala offers that make Scala a good language to use with Actors. For instance types in Scala are immutable by default. Great talk and when I'm going to type synchronized in code again I must remember this talk.&lt;br /&gt;&lt;br /&gt;That is it for day number 2, it was a fun packed day and I look forward to tomorrow. One more thing I noticed today if you want to present on Devoxx you'll need a Mac and &lt;a href="http://www.jetbrains.com/idea/"&gt;IntelliJ IDEA&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-8569818265231331791?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/8569818265231331791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=8569818265231331791' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8569818265231331791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8569818265231331791'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/11/devoxx-day-2.html' title='Devoxx day 2'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-2314688943857453025</id><published>2009-11-16T12:38:00.018+01:00</published><updated>2009-11-17T09:35:03.946+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><category scheme='http://www.blogger.com/atom/ns#' term='devoxx'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>Devoxx day 1</title><content type='html'>&lt;a href="http://www.devoxxx.com/"&gt;Devoxx&lt;/a&gt; is probably the largest European Java Conference. As it always takes place at the end of the year and approximately half a year later than big brother JavaOne, it's a good time to get the stuff again that has been announced at JavaOne and to see how the news and forecasts have been adopted in the meanwhile.&lt;br /&gt;&lt;br /&gt;When I think of Belgium I think of beer, bars, chocolate, hospitality and cosiness. But when I arrived and saw my hotel all these feelings went away. The location of my hotel and the conference is in an industrial part of Antwerp. There is nothing here but harbours and sea containers. So there is absolutely nothing distracting me from attending the sessions :D&lt;br /&gt;&lt;br /&gt;So my first session of the day was about &lt;a href="http://jbpm.org/"&gt;jBpm 4&lt;/a&gt; and that was very impressive, I've used jBpm in the past together with &lt;a href="http://www.seamframework.org/"&gt;Seam&lt;/a&gt;. I wish that I could use it with my last project. They changed a lot the API making deployment and testing easier. The console is now rewritten in GWT, and there is a web app that business people can use to create and modify processes. Also creating screens for tasks now works!&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So with the new version they really focused on working together and fixing the issues with regards to configuration. So I'm definitely trying that out. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Strange thing about this fist day that I haven't seen any companies yet. Maybe they will only setup their stuff when The conference days are starting. &lt;font style="font-style: italic;"&gt;OK update on this: they are building up their stuff now.&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another important note... I already have my 2 t-shirts and one of them is a limited edition!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next up is &lt;a href="http://devoxx.com/display/DV09/Architecting+Robust+Applications+for+Amazon+EC2" title="Architecting Robust Applications for Amazon EC2"&gt;Architecting Robust Applications for Amazon EC2&lt;/a&gt; , let's see what they have there.&lt;br /&gt;&lt;br /&gt;This one was not interesting at all, if I want to know how the &lt;a href="http://aws.amazon.com/ec2/"&gt;webservices of amazon&lt;/a&gt; work I'll look it up myself.  So I switched to a talk from a SUN guy who is clicking stuff together in Netbeans. What he is talking about is interesting. But his demos don't go further than the wizard screens of Netbeans and he is looking all the time to his &lt;a href="http://www.javapassion.com/"&gt;webpage&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So after the break it was "Tools in Action" time, these sessions are shorter and focused on tools, hence the name. The first one I saw was about &lt;a href="http://devoxx.com/display/DV09/Introducing+Scimpi" title="Introducing Scimpi"&gt;Introducing Scimpi&lt;/a&gt; a framework rather than an actual tool, build on &lt;a href="http://www.nakedobjects.org/"&gt;Naked Objects&lt;/a&gt;, but the concept is a bit old and Scimpi is sort of redefining it. I've used &lt;a href="http://metawidget.sourceforge.net/"&gt;metawidget&lt;/a&gt; for similar things but I think this gives me more control over the output than Scimpi and also has more powerful components that I can use.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;So now the last one of day one &lt;a href="http://devoxx.com/display/DV09/NoSQL+with+Cassandra+and+Hadoop" title="NoSQL with Cassandra and Hadoop"&gt;NoSQL with Cassandra and Hadoop&lt;/a&gt;. That was a nice introduction and they presented a nice usecase when to throw out the relational database. But I want to know more about it. Let's see if I can find some more talks.&lt;br /&gt;&lt;br /&gt;All in all it was a very interesting day and let's see what tomorrow brings. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2314688943857453025?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2314688943857453025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2314688943857453025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2314688943857453025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2314688943857453025'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/11/devoxx-day-1.html' title='Devoxx day 1'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-2705023619461338833</id><published>2009-10-30T16:33:00.011+01:00</published><updated>2009-10-30T18:10:20.951+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='portal'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Portal Update November 2009 and Java Buzz</title><content type='html'>After a busy summer I think it is absolutely necessary to summarize the latest updates in the Java Portal space.&lt;br /&gt;&lt;br /&gt;From the commercial side, major players are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/products/middleware/user-interaction/weblogic-portal.html"&gt;Oracle WebLogic Portal&lt;/a&gt;:&lt;br /&gt;The current release is still &lt;span style="font-weight: bold;"&gt;WLP 10g3&lt;/span&gt; but soon we expect the first &lt;span style="font-weight: bold;"&gt;11g&lt;/span&gt; release with codename &lt;span style="font-weight: bold;"&gt;"Sunshine"&lt;/span&gt;.&lt;br /&gt;Major improvements are&lt;br /&gt;- JSR-286 compliance (Portlet 2.0)&lt;br /&gt;- WSRP 2.0 support (Event based coordination, IPC for remote portlets, resource serving)&lt;br /&gt;- Full interoperability with WebCenter in both directions&lt;br /&gt;- Improved Ajax support&lt;br /&gt;- VCR Direct SPI Support for UCM&lt;br /&gt;- Even more REST APIs to access portal informations&lt;br /&gt;- New REST API to access Unified User Profile data&lt;br /&gt;- First support of the new Content Management Standard driven by Oasis: CMIS&lt;br /&gt;- Apache Beehive still supported but not enhanced&lt;br /&gt;- Replacement of Autonomy Search Engine by SES&lt;br /&gt;&lt;br /&gt;The REST API Architecture in WLP 11g:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://lh5.ggpht.com/_1_YR6TdF3aY/SusLPfxA-DI/AAAAAAAAOQU/s1bOG2DOhbc/s912/wlp11g.jpg"&gt;&lt;img style="cursor: pointer; width: 574px; height: 350px;" src="http://lh5.ggpht.com/_1_YR6TdF3aY/SusLPfxA-DI/AAAAAAAAOQU/s1bOG2DOhbc/s912/wlp11g.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/products/middleware/user-interaction/webcenter-suite.html"&gt;Oracle WebCenter Suite 11g R1&lt;/a&gt;:&lt;br /&gt;WebCenter Suite includes the formerly known product AquaLogic Interaction by BEA, now called WCI, &lt;a href="http://www.oracle.com/products/middleware/user-interaction/webcenter-interaction.html"&gt;WebCenter Interaction&lt;/a&gt;. Download it &lt;a href="http://www.oracle.com/technology/products/webcenter/downloads.html"&gt;here&lt;/a&gt;.&lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Adobe&lt;/span&gt;: Adobe? Yes... Since the new release of Adobe &lt;a target="_blank" href="http://www.webwire.com/ViewPressRel.asp?aId=105022"&gt;ColdFusion 9&lt;/a&gt;, there is a new portal player to be considered when it comes to interoperability based on JSR-168/286 portlets. ColdFusion 9 is now fully compliant with the Portlet Containers from the Java world.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www-01.ibm.com/software/websphere/portal/"&gt;IBM WebSphere Portal&lt;/a&gt; 6.1: no updates.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Open Source portals that have the most promising potential at the moment are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JBoss Portal and eXo Portal&lt;/span&gt; have been merged!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SusOEUKqdbI/AAAAAAAAOQw/aWFJG5du0CU/s1600-h/JBosseXo.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 66px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SusOEUKqdbI/AAAAAAAAOQw/aWFJG5du0CU/s400/JBosseXo.png" alt="" id="BLOGGER_PHOTO_ID_5398424045629371826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This latest interesting &lt;a href="http://blog.exoplatform.org/2009/09/03/gatein-portal-released-the-first-deliverable-to-come-from-exo-and-jboss-collaboration/"&gt;announcement&lt;/a&gt; has been made official on Sep 3rd at the JBoss World in Chicago. eXo has fully committed its entire open source portal stack to Red Hat’s newly introduced &lt;a href="http://www.jboss.org/gatein/"&gt;GateIn&lt;/a&gt; portal project extending it with cutting-edge collaboration features as well as document and content management features.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://blog.exoplatform.org/wp-content/uploads/2009/09/GateIn.jpg"&gt;&lt;img style="cursor: pointer; width: 238px; height: 72px;" src="http://blog.exoplatform.org/wp-content/uploads/2009/09/GateIn.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.liferay.com/web/guest/products/portal"&gt;Liferay Portal&lt;/a&gt; 5.2: no major updates since last post.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SUN &lt;/span&gt;continues to offer the &lt;a href="https://webspace.dev.java.net/"&gt;Web Space Server&lt;/a&gt; based on the Liferay Portal source code. No major updates besides a brand new &lt;a href="https://www.sun.com/offers/details/glassfish_webspace_server.xml"&gt;white paper&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.jboss.org/jbossportal/"&gt;JBoss Portal&lt;/a&gt; 2.7.2:&lt;br /&gt;- Since June 2009, JBoss fully focused on the new project GateIn&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.exoplatform.com/portal/public/en/product/portal/overview"&gt;eXo Portal&lt;/a&gt; 2.5.1: no updates besides GateIn announcements&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://portals.apache.org/jetspeed-2/"&gt;Jetspeed 2.2.0&lt;/a&gt;: After quite a long time without updates a new version has been released (summer 2009) that is fully JSR-286 compliant! The new version comes along with quite a bunch of updated documentation pages... So it would be worth to have a look at it again. Download it &lt;a href="http://portals.apache.org/jetspeed-2/download.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;Besides the Portal related activities, let's have a look on Java related &lt;span style="font-weight: bold;"&gt;quick news&lt;/span&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Java EE 6:&lt;/span&gt; The &lt;a href="http://jcp.org/en/jsr/detail?id=316"&gt;JSR-316&lt;/a&gt; has reached Proposed Final Draft. The hot discussions between &lt;a href="http://jcp.org/en/jsr/summary?id=299"&gt;JSR-299&lt;/a&gt; vs &lt;a href="http://jcp.org/en/jsr/detail?id=330"&gt;JSR-330&lt;/a&gt; have finally found a common resolution and both will be part of EE6 where JSR-299 will be based on the dependency injection specification defined by JSR-330.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Oracle has still not acquired SUN &lt;/span&gt;: The OK from EMEA is still pending.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JSF 2.0 &lt;/span&gt;: Mojarra 2.0, the production-quality, reference implementation for &lt;a target="_blank" href="http://jcp.org/en/jsr/detail?id=314"&gt;JSF 2.0&lt;/a&gt; is &lt;a target="_blank" href="http://blogs.sun.com/rlubke/entry/mojarra_2_0_0_is"&gt;out&lt;/a&gt;! This will of course be part of GlassFish v3 (final release planned for Dec-12th 2009) but you can grab the bits right now for your first dirty hands-on experience!&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;IntelliJ IDEA&lt;/span&gt; is now available in two editions. The &lt;a target="_blank" href="http://www.jetbrains.com/idea/nextversion/free_java_ide.html"&gt;Community Edition&lt;/a&gt; (JavaSE-focused) is now &lt;a target="_blank" href="http://blogs.jetbrains.com/idea/2009/10/intellij-idea-open-sourced/"&gt;Available under OpenSource&lt;/a&gt; at &lt;a target="_blank" href="http://www.jetbrains.org/display/IJOS/Home"&gt;JetBrains.org&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Geek Food&lt;/span&gt;: I discovered mainly two new things that I found diserve a Geek award:&lt;br /&gt;- &lt;a href="http://prezi.com/"&gt;Prezi&lt;/a&gt; ! Forget PPT and Google Presentations... Old school!&lt;br /&gt;- &lt;a href="http://www.playframework.org/"&gt;Play&lt;/a&gt; ! Clean alternative to develop JavaEE apps based on RESTful architectures.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Google Wave&lt;/span&gt;: I finally got an account (thanks a lot J. !!) but up to now I'm rather disappointed... nonetheless, the full features are not released yet, so I'm ready to get blown away. If you are interested, I still have some invitations left :-) Start your &lt;a href="https://wave.google.com/wave"&gt;wave&lt;/a&gt;!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JavaOne 2010 &lt;/span&gt;: ... no, still no signs whether there will be a next JavaOne :-(&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2705023619461338833?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2705023619461338833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2705023619461338833' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2705023619461338833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2705023619461338833'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/10/portal-update-november-2009-and-java.html' title='Portal Update November 2009 and Java Buzz'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_1_YR6TdF3aY/SusLPfxA-DI/AAAAAAAAOQU/s1bOG2DOhbc/s72-c/wlp11g.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-5033830841984735768</id><published>2009-10-30T15:04:00.009+01:00</published><updated>2009-10-30T16:03:50.674+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='technology'/><category scheme='http://www.blogger.com/atom/ns#' term='jee'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>Unit Testing EJBs and JPA with Embeddable GlassFish</title><content type='html'>&lt;span style="font-weight:bold;"&gt;&lt;a href="http://jcp.org/en/jsr/detail?id=313" target="_blank"&gt;Java EE 6&lt;/a&gt;&lt;/span&gt; has been a topic here at &lt;a href="http://www.ctp-consulting.com/" target="_blank"&gt;CTP&lt;/a&gt; for quite a while now. During summer I had the pleasure of conducting an internship which was targeted to explore the possibilities of the upcoming standard, namely &lt;a href="http://jcp.org/en/jsr/detail?id=318" target="_blank"&gt;EJB 3.1&lt;/a&gt;, &lt;a href="http://jcp.org/en/jsr/detail?id=317" target="_blank"&gt;JPA 2.0&lt;/a&gt;, &lt;a href="http://jcp.org/en/jsr/detail?id=311" target="_blank"&gt;JAX-RS&lt;/a&gt;, &lt;a href="http://jcp.org/en/jsr/detail?id=314" target="_blank"&gt;JSF 2.0&lt;/a&gt; and &lt;a href="http://jcp.org/en/jsr/detail?id=299" target="_blank"&gt;JCDI&lt;/a&gt; on top of &lt;a href="https://glassfish.dev.java.net/" target="_blank"&gt;GlassFish v3&lt;/a&gt; - and it turned out surprisingly productive, although all implementations were far from being in a release state!&lt;br /&gt;&lt;br /&gt;Only one thing we failed to run in a stable way: The &lt;span style="font-weight:bold;"&gt;new EJB 3.1 container API&lt;/span&gt; refused to run our unit tests. The main problem was JPA support - persistence units got not recognized and EJBs usually failed with a &lt;code&gt;NullPointerException&lt;/code&gt; calling the &lt;code&gt;EntityManager&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.sun.com/alexismp/entry/testing_ejb_3_1_s" target="_blank"&gt;Alexis&lt;/a&gt; and &lt;a href="http://www.adam-bien.com/roller/abien/entry/embedding_ejb_3_1_container" target="_blank"&gt;Adam&lt;/a&gt; recently blogged about this specific feature, and of course I had to get back and try it out myself! Indeed, starting up a container and looking up EJBs works fine. But to test your &lt;span style="font-weight:bold;"&gt;Entities&lt;/span&gt; there are still a few tweaks you might want to apply.&lt;br /&gt;&lt;br /&gt;Start with creating a Maven project and add the &lt;span style="font-weight:bold;"&gt;embeddable GlassFish&lt;/span&gt; dependency. I'm also using &lt;a href="http://testng.org" target="_blank"&gt;TestNG&lt;/a&gt; instead of JUnit, as it has a nice &lt;code&gt;@BeforeSuite&lt;/code&gt; annotation which allows starting the container only once before running your tests.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.glassfish.extras&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&gt;glassfish-embedded-all&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;3.0-b69&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.testng&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&gt;testng&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;5.9&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;    &amp;lt;classifier&amp;gt;jdk15&amp;lt;/classifier&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As described in Alexis' blog, you can start your &lt;code&gt;EJBContainer&lt;/code&gt; with a reference to your &lt;span style="font-weight:bold;"&gt;GlassFish domain&lt;/span&gt;. This will allow you to start up data sources you most probably need to properly test your JPA code.&lt;br /&gt;&lt;br /&gt;The disadvantage here is that you either depend on a hardcoded location or a system property which each of your team members have to set. Or, in case of your &lt;a href="http://hudson-ci.org/" target="_blank"&gt;continuous integration system&lt;/a&gt;, you might not want to have a GlassFish installation at all.&lt;br /&gt;&lt;br /&gt;Fortunately you can create a mini GlassFish domain with only a few files. The image below shows the files you need and how I placed them in my Maven module:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5QjC-pWNxgk/SurzEM4QS0I/AAAAAAAAAoU/FOnf4h0Xjg8/s1600-h/project_layout.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 269px; height: 276px;" src="http://1.bp.blogspot.com/_5QjC-pWNxgk/SurzEM4QS0I/AAAAAAAAAoU/FOnf4h0Xjg8/s400/project_layout.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5398394356859161410" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can take your &lt;span style="font-weight:bold;"&gt;existing &lt;code&gt;domain.xml&lt;/code&gt;&lt;/span&gt; containing your data sources and place it in here - you can reference it now relatively to your module location. Your unit tests then start with:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;private static Context ctx;&lt;br /&gt;private static EJBContainer container;&lt;br /&gt;&lt;br /&gt;@BeforeSuite&lt;br /&gt;public static void createContainer() {&lt;br /&gt;    Map&amp;lt;String, Object&amp;gt; properties = new HashMap&amp;lt;String, Object&amp;gt;();&lt;br /&gt;    properties.put(EJBContainer.MODULES, new File("target/classes");&lt;br /&gt;    properties.put("org.glassfish.ejb.embedded.glassfish.installation.root", &lt;br /&gt;            "./src/test/glassfish");&lt;br /&gt;    container = EJBContainer.createEJBContainer(properties);&lt;br /&gt;    ctx = container.getContext();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This will run your unit tests against your development database. In case you want to run them in a &lt;span style="font-weight:bold;"&gt;local database&lt;/span&gt;, you can simple replace the connection pool config in your &lt;code&gt;domain.xml&lt;/code&gt;, e.g. with a local Derby installation:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource" &lt;br /&gt;        res-type="javax.sql.DataSource" name="[your DS name]" ping="true"&amp;gt;&lt;br /&gt;    &amp;lt;property name="ConnectionAttributes" value="create=true" /&amp;gt;&lt;br /&gt;    &amp;lt;property name="DatabaseName" value="./target/unit-test" /&amp;gt;&lt;br /&gt;    &amp;lt;property name="Password" value="" /&amp;gt;&lt;br /&gt;    &amp;lt;property name="User" value="" /&amp;gt;&lt;br /&gt;&amp;lt;/jdbc-connection-pool&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This creates the database in your &lt;code&gt;target&lt;/code&gt; folder and requires adding Derby to your Maven POM:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.apache.derby&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&gt;derby&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;10.5.3.0_1&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;&lt;/pre&gt;&lt;br /&gt;Unfortunately this setup might not match with the configuration in your &lt;code&gt;persistence.xml&lt;/code&gt; and generate invalid SQL for your test database. You can either solve this with &lt;span style="font-weight:bold;"&gt;Maven filters&lt;/span&gt; in different profiles, or alternatively &lt;span style="font-weight:bold;"&gt;create a staging directory&lt;/span&gt; for your &lt;code&gt;EJBContainer&lt;/code&gt;. I'm using the &lt;a href="http://commons.apache.org/io/" target="_blank"&gt;Apache Commons IO&lt;/a&gt; tools here for convenience:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;...&lt;br /&gt;private static final String MODULE_NAME = "embedded";&lt;br /&gt;private static final String TARGET_DIR = "target/" + MODULE_NAME;&lt;br /&gt;&lt;br /&gt;@BeforeSuite&lt;br /&gt;public static void createContainer() throws Exception {&lt;br /&gt;    File target = prepareModuleDirectory();&lt;br /&gt;    Map&amp;lt;String, Object&amp;gt; properties = new HashMap&amp;lt;String, Object&amp;gt;();&lt;br /&gt;    properties.put(EJBContainer.MODULES, target);&lt;br /&gt;    properties.put("org.glassfish.ejb.embedded.glassfish.installation.root", &lt;br /&gt;            "./src/test/glassfish");&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private static File prepareModuleDirectory() throws IOException {&lt;br /&gt;    File result = new File(TARGET_DIR);&lt;br /&gt;    FileUtils.copyDirectory(new File("target/classes"), result);&lt;br /&gt;    FileUtils.copyFile(new File("target/test-classes/META-INF/persistence.xml"), &lt;br /&gt;            new File(TARGET_DIR + "/META-INF/persistence.xml"));&lt;br /&gt;    return result;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can use the &lt;code&gt;@AfterSuite&lt;/code&gt; annotation to clean up the temporary folder. Note that with this setup, the &lt;span style="font-weight:bold;"&gt;EJB lookups&lt;/span&gt; change:&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;protected &amp;lt;T&amp;gt; T lookupBy(Class&amp;lt;T&amp;gt; type) throws NamingException {&lt;br /&gt;    return (T) ctx.lookup("java:global/" + MODULE_NAME + "/"&lt;br /&gt;            + type.getSimpleName());&lt;br /&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/3305419975676030648-5033830841984735768?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/5033830841984735768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=5033830841984735768' title='29 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5033830841984735768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5033830841984735768'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/10/unit-testing-ejbs-and-jpa-with.html' title='Unit Testing EJBs and JPA with Embeddable GlassFish'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_5QjC-pWNxgk/SurzEM4QS0I/AAAAAAAAAoU/FOnf4h0Xjg8/s72-c/project_layout.gif' height='72' width='72'/><thr:total>29</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-512705322056664656</id><published>2009-10-21T18:40:00.003+02:00</published><updated>2009-10-21T18:59:03.136+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wls'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='applicationserver'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle WebLogic Server Versions</title><content type='html'>I recently got confused with the version numbers of the Oracle WebLogic Application Server, some people use the internal (BEA) version number, some refer to the Oracle release number.&lt;br /&gt;&lt;br /&gt;So the following list should clarify the mapping between these two versioning schemes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;WLS 10g3 (10.3.0) : recent version but used by latest WebLogic Portal 10g3&lt;br /&gt;&lt;/li&gt;&lt;li&gt;WLS 11g R1 (10.3.1) : &lt;a href="http://www.oracle.com/technology/software/products/middleware/index.html"&gt;current version&lt;/a&gt;&lt;/li&gt;&lt;li&gt;WLS 11g R1 PS1 (10.3.2) : upcoming patchset version planned for Nov/Dec 2009&lt;br /&gt;&lt;/li&gt;&lt;li&gt;WLS 11g R1 PS2 (10.3.3) : another patchset anticipated March / April 2010&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;WLS 11g R2 : Planned for 2010. I haven't found any relation to a 10.x version at this moment.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Oracle OpenWorld 2009 Updates:&lt;/span&gt; WebLogic Server 11g R2 in 2010 will get Oracle RAC and Coherence integrated to make them native in the application server. WebLogic Server will get RAC event awareness, providing fast connection and fail over, while Coherence will be managed as part of WebLogic - currently it's an external application.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;WLS 12g : Planned for 2011. I assume this will be the Java EE 6 compliant release along with the release of all other Fusion Middleware 12g products.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Comments are welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-512705322056664656?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/512705322056664656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=512705322056664656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/512705322056664656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/512705322056664656'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/10/oracle-weblogic-server-versions.html' title='Oracle WebLogic Server Versions'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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-3305419975676030648.post-6346391607848051701</id><published>2009-10-16T09:35:00.015+02:00</published><updated>2009-10-21T16:12:15.867+02:00</updated><title type='text'>LambdaJ new trends in Java</title><content type='html'>&lt;div&gt;I must say I really enjoy the presentations from the JUGS. Couple of days ago there was another one about &lt;a href="http://code.google.com/p/lambdaj/"&gt;lambdaj&lt;/a&gt;, presented by its author Mario Fusco. He is a big fan of &lt;a href="http://www.scala-lang.org/"&gt;Scala&lt;/a&gt; and that's why he wanted to bring this functional way of doing things to Java.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I think this is a trend and we are going to see this more and more. It all started with the dynamic languages built on the JVM and now more and more people want functional things. I guess it has to do with the fact that Java the language did not see much change over the last 8 years, and people see solutions that are nice for specific problems in other languages. For instance Rails, it's very good in solving one particular problem and the Java community did notice that. Not only did it get ported to run on the JVM it also brought us Groovy/Grails.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So the latest thing in Java land is functional programming. There are some things one could solve more "elegantly" by using a language that is functional in nature. An example of this is filtering collections, this is what &lt;a href="http://code.google.com/p/lambdaj/"&gt;lambdaj&lt;/a&gt; tries to do, making standard Java behave in a more function manner.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To give a couple of examples. To filter a list of beans in &lt;a href="http://code.google.com/p/lambdaj/"&gt;lambdaj&lt;/a&gt; you could write something like this:&lt;br /&gt;&lt;pre name="code" class="java"&gt; &lt;br /&gt;int totalAge = sum(meAndMyFriends, on(Person.class).getAge());&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This will work because you would do a static import of the Lambda class that has the sum and on methods. So to explain what happens, the sum method will iterate over the collection of Person objects and invoke the getAge() method and sum all the results. Actually it's very readable what will happen. Because the on method uses generics you'll even get code completion and you'll be able to use refactoring.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Even better is the sumFrom method, it will return a bean of the same type of your list and you can then call any method to get the sum from all the properties. Of course this will only work if your collection contains object instances, because java generics are not &lt;a href="http://gafter.blogspot.com/2006/11/reified-generics-for-java.html"&gt;reified&lt;/a&gt;.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;Person totalsPerson = sumFrom(meAndMyFriends);&lt;br /&gt;int totalAge = totalsPerson.getAge();&lt;br /&gt;int totalLength = totalsPerson.getLength();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This works because sumFrom gives back a Proxy object that is the same as the elements in the list. When you invoke a method on it, it still has a reference to the list so it will iterate over the list and sum the properties.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;  &lt;br /&gt;List&amp;lt;Person&amp;gt; oldFriends = filter(having(on(Person.class).getAge(), greaterThan(30)), meAndMyFriends);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;There are of course more frameworks that can do similar things. When I first saw this I thought of &lt;a href="http://commons.apache.org/jxpath/"&gt;jxpath&lt;/a&gt; but the disadvantage of this framework is that when doing refactoring, you'll have to manually change the xpath queries. Another powerful framework that also takes advantage of functional paradigm is &lt;a href="http://code.google.com/p/google-collections/"&gt;google collections&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But as Mario Fusco also pointed out at the end of his presentation.... If you can, you should really give Scala a spin. Then you will not need &lt;a href="http://code.google.com/p/lambdaj/"&gt;lambdaj&lt;/a&gt;, you will have something more powerful.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-6346391607848051701?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/6346391607848051701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=6346391607848051701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6346391607848051701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6346391607848051701'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/10/lambdaj-new-trends-in-java.html' title='LambdaJ new trends in Java'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-2056497889057190821</id><published>2009-09-22T12:43:00.011+02:00</published><updated>2009-09-23T16:33:30.929+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><category scheme='http://www.blogger.com/atom/ns#' term='maven 3'/><title type='text'>Maven 3 early access</title><content type='html'>&lt;div class="deleteBody"&gt;After the &lt;a href="http://ctpjava.blogspot.com/2009/09/thoughts-on-jason-van-zyl-talking-about.html"&gt;talk&lt;/a&gt; from Jason van Zyl, I thought it was time to give Maven 3 a try. So I checked out the &lt;a href="https://svn.apache.org/repos/asf/maven/maven-3/trunk"&gt;sources from svn&lt;/a&gt; and tried to build. That was the first challenge because even though Jason told us they switched from Plexus to Guice there is still a dependency on &lt;a href="https://svn.codehaus.org/plexus/plexus-containers/branches/plexus-containers-1.x"&gt;plexus 1.2.1-SNAPSHOT&lt;/a&gt;. I could not find any binaries for this so I checked that one out and built that too.&lt;br /&gt;&lt;br /&gt;So now I can build and run Maven 3. In the presentation from Jason he told us that they didn't want to change too much because they didn't want to break backwards compatibility. They did a lot of tests to fulfil that promise by checking out &lt;a href="https://grid.sonatype.org/ci/view/Community%20Test%20Projects/"&gt;Maven 2 open source projects&lt;/a&gt; and testing them with maven 3. They even have a Hudson grid running multiple builds to ensure backwards compatibility. So I thought that my project will work without any problem. I never do anything exotic in my builds, but how wrong could I have been, because it does not build with Maven 3. It gives the following error that was very clear:&lt;br /&gt;&lt;p class="postBody" style="color: rgb(119, 119, 119);"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[ERROR] Some problems were encountered while processing the POMs: [ERROR] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: xml-resolver:xml-resolver:jar -&gt; null vs null @ ch.admin.smclient:smclient:1.0.1-SNAPSHOT, /home/edewit/workspace/smclient/smclient/pom.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So what I never noticed before is that I had the xml-resolver twice in my dependency list. Once with a version number and one without. Maven 2 never warned me about this. This shows that the dependency management resolving has improved a lot. Also the way the errors are presented is improved I think.&lt;br /&gt;&lt;/p&gt;&lt;p class="postBody" style="color: rgb(119, 119, 119);"&gt;Also Jason mentioned that the speed of Maven 3 has improved, so I tested this as well and it turns out that on my project the speed increase was about 11%. That is not great but it's not bad as well.&lt;br /&gt;&lt;/p&gt;&lt;p class="postBody" style="color: rgb(119, 119, 119);"&gt;Jason said that everything they are working on (Maven 3, m2eclipse and Nexus) is going to be finalized at the end of this year. So I'll be looking forward to that even though I think this version of maven is already a step forward. After more projects successfully built with Maven 3 I'm sure that they intend to add more new features.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2056497889057190821?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2056497889057190821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2056497889057190821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2056497889057190821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2056497889057190821'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/09/maven-3-early-access.html' title='Maven 3 early access'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-6440872987270542594</id><published>2009-09-18T06:50:00.012+02:00</published><updated>2009-09-18T14:30:24.562+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='erik jan'/><category scheme='http://www.blogger.com/atom/ns#' term='maven 3'/><category scheme='http://www.blogger.com/atom/ns#' term='nexus'/><category scheme='http://www.blogger.com/atom/ns#' term='jason van zyl'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Thoughts on Jason van Zyl talking about Maven 3</title><content type='html'>&lt;div&gt;Today I've been to the talk from Jason van Zyl hosted by the &lt;a href="http://www.jugs.ch/"&gt;JUGS&lt;/a&gt; (Java User Group Switzerland, yes I know it's a ridiculous name). He is one of the authors of &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; 1 and 2, he talked about Maven 3 and what it's going to bring us. And I must say it's quite impressive. Being an open source contributor myself I know that good software is written in 3 times. This was also the main point of his talk. He first made the joke that he never expected us to use Maven 1 but that Maven 2 was useable, and now they are fixing everything in Maven 3. I now use &lt;a href="http://www.netbeans.org/"&gt;Netbeans&lt;/a&gt; because I love the Maven support that it's got. But with Maven 3 they are also developing the m2eclipse plugin. And what Jason told us during his presentation is that also here they are fixing a lot of things there. For instance Maven will have a query-able life cycle, with this eclipse can use only a part of Maven for instance to do a compile. So no longer adding a resource will kickoff an entire maven build and 5 minutes later we are ready to code again. I still think that the editor of &lt;a href="http://eclipse.org/"&gt;Eclipse&lt;/a&gt; is better than the one Netbeans provides and Jason also says that the Maven integration was better in Netbeans. In fact they've used a lot of the Netbeans plugin features in the new m2eclipse plugin. Knowing all this I must really give Eclipse another try. What the new maven 3 also will have is a way to describe your maven model how you would like it, so for instance you could use ruby or groovy to create you're maven object model, instead of a xml, we could do something with this just don't know what. One thing I'm really excited about is they are making the maven integration also communicate with other plugins. For instance when you make changes in the WTP plugin about your war, this will also be put in you're pom. The same holds true for &lt;a href="http://pmd.sourceforge.net/"&gt;PMD plugin&lt;/a&gt;, the settings that are in your pom will also be set in the PMD plugin and changes made will reflect back.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Jason is quite a talker, his slides were full with text and he only briefly stopped talking to take a zip of water. His company also makes &lt;a href="http://nexus.sonatype.org/"&gt;Nexus&lt;/a&gt; a proxy for maven repositories. Other products that do something similar are &lt;a href="http://www.jfrog.org/products.php"&gt;Artifactory&lt;/a&gt; or &lt;a href="http://archiva.apache.org/"&gt;Archiva&lt;/a&gt;. The cool things they've build into Nexus is the ability to also be a proxy for Eclipse plugins. But all the cool things about Nexus are in the commercial version of Nexus like for instance LDAP authentication and lots of features around provisioning repositories.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Talking about their commercial products, they also sell this concept where one can have everything setup for a developer in one go. The m2eclipse plugin will discover where Nexus is, install the necessary plugins, show the projects a developer can work on and even download wiki documentation from confluence or twiki. This can all be configured by the technical lead of the project. I really like this concept, to many times I've seen it take days for a new developer to be up to speed. Not only taking time on his one, but also needing intensive support. With this in place some of that time can be saved.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So all in all I'm very positive about this presentation, &lt;a href="http://www.jugs.ch/"&gt;JUGS&lt;/a&gt; keep up the good work. And I'll be trying the dev build of maven 3 and m2eclipse right away tomorrow. I'll let you know how it works out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-6440872987270542594?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/6440872987270542594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=6440872987270542594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6440872987270542594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/6440872987270542594'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/09/thoughts-on-jason-van-zyl-talking-about.html' title='Thoughts on Jason van Zyl talking about Maven 3'/><author><name>Erik-Jan de Wit</name><uri>http://www.blogger.com/profile/04034591650662962902</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='http://2.bp.blogspot.com/-Mhu4JNsxS8o/TinM8aaR6kI/AAAAAAAAA68/XitZ9riiYhA/s220/DSC01967.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-8260301618285829871</id><published>2009-07-01T22:34:00.002+02:00</published><updated>2009-07-01T23:11:18.747+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jazoon'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>JBoss Seam Archetype - now with ICEfaces</title><content type='html'>Last week I visited &lt;a style="font-weight: bold;" href="http://jazoon.com/"&gt;Jazoon&lt;/a&gt; - and had a great opportunity to see several impressive demos of &lt;a style="font-weight: bold;" href="http://www.icefaces.org/"&gt;ICEfaces&lt;/a&gt;! Of course I had to immediately get my hands on it, and started to integrate ICEfaces in the &lt;a href="http://seamframework.org/"&gt;JBoss Seam&lt;/a&gt; Maven archetype (as described &lt;a href="http://ctpjava.blogspot.com/2009/06/creating-jboss-seam-maven-archetype.html"&gt;in my previous post&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;You can give it a spin by starting a shell and running Maven with the Archetype plugin:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&gt;mvn archetype:generate -DarchetypeCatalog=&lt;span style="font-weight: bold;"&gt;http://tinyurl.com/jbsarch&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;-DajaxLibrary=icefaces&lt;/span&gt;&lt;br /&gt;[INFO] Scanning for projects...&lt;br /&gt;[INFO] Searching repository for plugin with prefix: 'archetype'.&lt;br /&gt;...&lt;br /&gt;Choose archetype:&lt;br /&gt;1: http://tinyurl.com/jbsarch -&gt; jboss-seam-archetype (Archetype for JBoss Seam Projects)&lt;br /&gt;Choose a number:  (1): 1&lt;br /&gt;Define value for serverDir: : &lt;span style="font-weight: bold;"&gt;[your JBoss 5 server location]&lt;/span&gt;&lt;br /&gt;Define value for groupId: : &lt;span style="font-weight: bold;"&gt;[your groupId]&lt;/span&gt;&lt;br /&gt;Define value for artifactId: : &lt;span style="font-weight: bold;"&gt;[your artifactId]&lt;/span&gt;&lt;br /&gt;Define value for version:  1.0-SNAPSHOT: : &lt;span style="font-weight: bold;"&gt;[your version]&lt;/span&gt;&lt;br /&gt;Define value for package: : &lt;span style="font-weight: bold;"&gt;[your package]&lt;/span&gt;&lt;br /&gt;Confirm properties configuration:&lt;br /&gt;serverType: &lt;span style="font-weight: bold;"&gt;jboss5&lt;/span&gt;&lt;br /&gt;ajaxLibrary: &lt;span style="font-weight: bold;"&gt;icefaces&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;Y: : y&lt;br /&gt;[INFO] ------------------------------------------------------------------------&lt;br /&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] ------------------------------------------------------------------------&lt;br /&gt;...&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Make sure you don't misspell &lt;span style="font-weight: bold;"&gt;"icefaces"&lt;/span&gt;, this will otherwise screw up the application. No input validation in Maven Archetype yet, but I started looking into it ;-)&lt;br /&gt;&lt;br /&gt;Again, change to the project directory and build the project:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&gt;mvn package&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now this also executes a sample unit test (fingers crossed it works this time ;-) - thanks to Oscar for the feedback!&lt;br /&gt;&lt;br /&gt;Have fun with it! Anybody mind contributing a decent layout template?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-8260301618285829871?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/8260301618285829871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=8260301618285829871' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8260301618285829871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8260301618285829871'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/07/jboss-seam-archetype-now-with-icefaces.html' title='JBoss Seam Archetype - now with ICEfaces'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-4768148331933818715</id><published>2009-06-19T16:30:00.003+02:00</published><updated>2009-06-19T20:24:19.140+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>Creating a JBoss Seam Maven Archetype</title><content type='html'>In case you're a regular reader of this blog, I guess you're aware that I'm a frequent user of both &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; and &lt;a href="http://seamframework.org/"&gt;JBoss Seam&lt;/a&gt; - and that I'm regularly trying to &lt;a href="http://ctpjava.blogspot.com/search/label/thomas"&gt;combine working with both&lt;/a&gt;! My usual approach for setting up a new project was either to start with an empty Maven web application project and copying the missing files over, or to start with a seam-gen project and move it into a Maven structure. Both less than ideal...&lt;br /&gt;&lt;br /&gt;Maven provides so called &lt;a href="http://maven.apache.org/plugins/maven-archetype-plugin/"&gt;archetypes&lt;/a&gt; for a quick project setup. As there is not (yet?) an official archetype for Seam projects, I've been working on my own - and here's how you can use it as well!&lt;br /&gt;&lt;br /&gt;All you need is&lt;br /&gt;&lt;ul&gt;&lt;li&gt;a recent version of Maven downloaded (I used 2.0.10)&lt;/li&gt;&lt;li&gt;and the Maven executable referenced in your path so you can use it on the console.&lt;/li&gt;&lt;/ul&gt;Open up a console, &lt;code&gt;cd&lt;/code&gt; to your projects directory and type:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;mvn archetype:generate -DarchetypeCatalog=http://tinyurl.com/jbsarch&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will start Maven and show the following command line output:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;[INFO] Scanning for projects...&lt;br /&gt;[INFO] Searching repository for plugin with prefix: 'archetype'.&lt;br /&gt;[INFO] ------------------------------------------------------------------------&lt;br /&gt;[INFO] Building Maven Default Project&lt;br /&gt;[INFO]    task-segment: [archetype:generate] (aggregator-style)&lt;br /&gt;[INFO] ------------------------------------------------------------------------&lt;br /&gt;[INFO] Preparing archetype:generate&lt;br /&gt;[INFO] No goals needed for project - skipping&lt;br /&gt;[INFO] Setting property: classpath.resource.loader.class =&gt; 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.&lt;br /&gt;[INFO] Setting property: velocimacro.messages.on =&gt; 'false'.&lt;br /&gt;[INFO] Setting property: resource.loader =&gt; 'classpath'.&lt;br /&gt;[INFO] Setting property: resource.manager.logwhenfound =&gt; 'false'.&lt;br /&gt;[INFO] [archetype:generate]&lt;br /&gt;[INFO] Generating project in Interactive mode&lt;br /&gt;[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)&lt;br /&gt;Choose archetype:&lt;br /&gt;1: http://tinyurl.com/jbsarch -&gt; jboss-seam-archetype (Archetype for JBoss Seam Projects)&lt;br /&gt;Choose a number:  (1):&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The remote archetype catalog contains so far only one archetype (BTW: the jbsarch in &lt;a href="http://tinyurl.com/jbsarch"&gt;tinyurl.com/jbsarch&lt;/a&gt; stands for &lt;span style="font-weight:bold;"&gt;JB&lt;/span&gt;oss &lt;span style="font-weight:bold;"&gt;S&lt;/span&gt;eam &lt;span style="font-weight:bold;"&gt;ARCH&lt;/span&gt;etype - hope you can remember this better than the full URL :-) Select the archetype by typing &lt;code&gt;1&lt;/code&gt; and enter your Maven project properties as well as your JBoss Server directory:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;[INFO] snapshot com.ctp.archetype:jboss-seam-archetype:1.0.0-SNAPSHOT: checking for updates from jboss-seam-archetype-repo&lt;br /&gt;Define value for serverDir: : /Developer/Servers/JBoss/jboss-5.1.0.GA&lt;br /&gt;Define value for groupId: : com.ctp&lt;br /&gt;Define value for artifactId: : fluxcapacitor&lt;br /&gt;Define value for version:  1.0-SNAPSHOT: :&lt;br /&gt;Define value for package:  com.ctp: : com.ctp.fluxcapacitor&lt;br /&gt;Confirm properties configuration:&lt;br /&gt;serverType: jboss5&lt;br /&gt;serverDir: /Developer/Servers/JBoss/jboss-5.1.0.GA&lt;br /&gt;groupId: com.ctp&lt;br /&gt;artifactId: fluxcapacitor&lt;br /&gt;version: 1.0-SNAPSHOT&lt;br /&gt;package: com.ctp.fluxcapacitor&lt;br /&gt;Y: : y&lt;br /&gt;[INFO] ------------------------------------------------------------------------&lt;br /&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] ------------------------------------------------------------------------&lt;br /&gt;[INFO] Total time: 4 minutes 57 seconds&lt;br /&gt;[INFO] Finished at: Fri Jun 19 19:12:19 CEST 2009&lt;br /&gt;[INFO] Final Memory: 12M/79M&lt;br /&gt;[INFO] ------------------------------------------------------------------------&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that the &lt;span style="font-weight:bold;"&gt;serverType&lt;/span&gt; property defaults to &lt;code&gt;jboss5&lt;/code&gt;. If you have a JBoss 4.2.x installation, quit with &lt;code&gt;n&lt;/code&gt; and retype everything (hmm...) and use &lt;code&gt;jboss4&lt;/code&gt; instead.&lt;br /&gt;&lt;br /&gt;In case anything fails here, make sure your archetype plugin is at least version 2.0-alpha-4 (I had to delete the local repo info file in the local repository once). Now with your project created, lets build and deploy it!&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Aragorn:sandbox thug$ cd fluxcapacitor/&lt;br /&gt;Aragorn:fluxcapacitor thug$ mvn package&lt;br /&gt;[INFO] Scanning for projects...&lt;br /&gt;[INFO] Reactor build order:&lt;br /&gt;[INFO]   [fluxcapacitor]&lt;br /&gt;[INFO]   [fluxcapacitor :: JBoss Configuration]&lt;br /&gt;[INFO]   [fluxcapacitor :: Web Application]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The project currently features two modules: One with the actual web application, and the other one containing JBoss Server configuration files. With the basic archetype you only get a datasource there, but you can also use it to change server ports, define security realms, queues etc.&lt;br /&gt;&lt;br /&gt;Environment specific properties are referenced in filter property files. You can find the development filter file in &lt;code&gt;${artifactId}/environment/filters/${artifactId}-development.properties&lt;/code&gt;. The filter file selection happens in the parent POM. It defines a &lt;code&gt;development&lt;/code&gt; profile which sets the &lt;code&gt;environment&lt;/code&gt; property. Setting this property to &lt;code&gt;test&lt;/code&gt; will look for a &lt;code&gt;${artifactId}/environment/filters/${artifactId}-test.properties&lt;/code&gt; filter file.&lt;br /&gt;&lt;br /&gt;Note that the parent POM contains your JBoss installation directory hard coded. You might want to factor this out into a developer specific profile when working in a team. Fire up your JBoss instance. Everything should start up well (fingers crossed...) and you can point your browser to the base URL of your application.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5QjC-pWNxgk/SjvLVpFtndI/AAAAAAAAAnc/2TlU36RV1rY/s1600-h/seam-archetype.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 306px;" src="http://1.bp.blogspot.com/_5QjC-pWNxgk/SjvLVpFtndI/AAAAAAAAAnc/2TlU36RV1rY/s400/seam-archetype.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5349092555100102098" /&gt;&lt;/a&gt;&lt;br /&gt;Done! Import the project in your favorite IDE and start prototyping!&lt;br /&gt;&lt;br /&gt;Unfortunately this is still far away of what seam-gen provides up to now. Maven archetypes have improved over time but are currently still not as flexible to be useful in complex setups:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Entering project properties is not even close to be user friendly. At least a description, input validation (enumerations) and reasonable handling of default values might help.&lt;/li&gt;&lt;li&gt;Conditional installation of files. If you know how this works - let me know :-) This would be required to distinguish between WAR and EAR projects, and for targeting different applications servers (yeah, like GlassFish!).&lt;/li&gt;&lt;/ul&gt;In case I find some time to contribute something here, I'll report back. If you have feedback / contributions to the archetype, this is as usual very welcome (the code is available at our &lt;a href="http://ctpjava.googlecode.com/svn/trunk/projects/maven-archetypes/jboss-seam-archetype/"&gt;Google Code repository&lt;/a&gt;)!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-4768148331933818715?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/4768148331933818715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=4768148331933818715' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/4768148331933818715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/4768148331933818715'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/06/creating-jboss-seam-maven-archetype.html' title='Creating a JBoss Seam Maven Archetype'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_5QjC-pWNxgk/SjvLVpFtndI/AAAAAAAAAnc/2TlU36RV1rY/s72-c/seam-archetype.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-5569644970210078188</id><published>2009-06-06T10:33:00.025+02:00</published><updated>2009-06-06T12:16:05.299+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>JavaOne 2009 Summary: Friday (Day 4)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SioqN4qNnWI/AAAAAAAAMxo/vlQHr3bJ4_4/s1600-h/DSC_2792.JPG"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SioqN4qNnWI/AAAAAAAAMxo/vlQHr3bJ4_4/s800/DSC_2792.JPG" alt="" id="BLOGGER_PHOTO_ID_5344130325864619362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Related Posts so far:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-monday.html"&gt;Day 0&lt;/a&gt;: CommunityOne, GlassFish&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-tuesday-day-1.html"&gt;Day 1&lt;/a&gt;: JavaOne, Key Note&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-wednesday-day-2.html"&gt;Day 2&lt;/a&gt;: JavaOne, Mobility&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-thursday-day-3.html"&gt;Day 3&lt;/a&gt;: JavaOne, Microsoft and IBM&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;=== The Toy Show hosted by James Gosling! ===&lt;/span&gt;&lt;br /&gt;Welcome back, the final day has come and it's called "Toy Show Time" !&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiosOjA366I/AAAAAAAAMxw/fLK3iS4ERnk/s1600-h/DSC_2728.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 240px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiosOjA366I/AAAAAAAAMxw/fLK3iS4ERnk/s400/DSC_2728.JPG" alt="" id="BLOGGER_PHOTO_ID_5344132536257211298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The whole show is not about standards or technical details, it is about Java, the Java ecosystem and how Java is used in its various situations driven by innovative people around the world:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The &lt;a href="http://bluej.org/"&gt;BlueJ&lt;/a&gt; team received a well-deserved special recognition for building tools that help millions of high school and college students get started with Java.&lt;/li&gt;&lt;li&gt;A fellow from &lt;a href="http://www.runescape.com/"&gt;RuneScape&lt;/a&gt; dev demoed their tools, and I learned how one animates a water troll, something that will surely come in handy one day.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiosxU3NArI/AAAAAAAAMx4/-qBBfECa6rc/s1600-h/DSC_2748.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 220px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiosxU3NArI/AAAAAAAAMx4/-qBBfECa6rc/s400/DSC_2748.JPG" alt="" id="BLOGGER_PHOTO_ID_5344133133753975474" border="0" /&gt;&lt;br /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiosxU3NArI/AAAAAAAAMx4/-qBBfECa6rc/s1600-h/DSC_2748.JPG"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JavaFX&lt;/span&gt; Demo with inversed &lt;span style="font-weight: bold;"&gt;Nintendo Wii&lt;/span&gt; Remote Control. See BOF descriptions in my &lt;a href="http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-thursday-day-3.html"&gt;last post&lt;/a&gt;. Instead of virtually painting on the wall, they used a piece of glass and it therefore looked like a scene &lt;span style="text-decoration: underline;"&gt;of &lt;/span&gt;&lt;a href="http://cm.brainsfactory.org/images/obj/minority_report_interface.png"&gt;Minority Report&lt;/a&gt; :-)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SionncdhfRI/AAAAAAAAMxI/XFsbL8zvm7Q/s1600-h/DSC_2719.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 245px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SionncdhfRI/AAAAAAAAMxI/XFsbL8zvm7Q/s400/DSC_2719.JPG" alt="" id="BLOGGER_PHOTO_ID_5344127466436918546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Tor Norbye (a JavaPosse member) showed a very impressive &lt;span style="font-weight: bold;"&gt;JavaFX authoring tool &lt;/span&gt;whose release is planned in December. When JavaFX was presented the first time at JavaOne 2007 it looked good already but nothing really happened after that announcement. In 2008 it was pushed again but it did not kick off (again). Since the release of Java SE 6 Update 10 and this year's JavaOne, it is now really looking much much better! The demos of the upcoming JavaFX version by end of this year looked even better!! Together with Larry's indication to heavily push JavaFX forward, it might soon be a valid competitor of Flex and Silverlight.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/Siovuf0ml-I/AAAAAAAAMyI/73SC_LXjQ9Y/s1600-h/DSC_2752.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 238px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/Siovuf0ml-I/AAAAAAAAMyI/73SC_LXjQ9Y/s400/DSC_2752.JPG" alt="" id="BLOGGER_PHOTO_ID_5344136383691134946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;There was a demo by the high school kids who won the &lt;a href="http://usfirst.org/"&gt;FIRST robotics contest&lt;/a&gt;. Sun and the FIRST folks just ported the programming environment from C/C++ to Java.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiougovzYRI/AAAAAAAAMyA/UcCYfMBay4Y/s1600-h/DSC_2756.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 237px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiougovzYRI/AAAAAAAAMyA/UcCYfMBay4Y/s400/DSC_2756.JPG" alt="" id="BLOGGER_PHOTO_ID_5344135046057124114" border="0" /&gt;&lt;br /&gt;&lt;/a&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiougovzYRI/AAAAAAAAMyA/UcCYfMBay4Y/s1600-h/DSC_2756.JPG"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;The &lt;a href="http://www.grameenfoundation.org/"&gt;Grameen Foundation&lt;/a&gt; showed off an open source system for helping with microfinance in third world countries. &lt;/li&gt;&lt;li&gt;A fellow showed &lt;span style="font-weight: bold;"&gt;SIM cards&lt;/span&gt; running Java and a web server. The latest ones can interact with sensors and WiFi radios. &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;At the age of 14, James Gosling&lt;/span&gt; was working on some satellite ground station application running on a &lt;a href="http://en.wikipedia.org/wiki/PDP-8"&gt;PDP-8&lt;/a&gt;... as of James, it had less compute power than a modern smart card :-) His mother took this photo by then:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SiowNM3LHrI/AAAAAAAAMyQ/v7l77aolgL0/s1600-h/DSC_2757.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 269px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SiowNM3LHrI/AAAAAAAAMyQ/v7l77aolgL0/s400/DSC_2757.JPG" alt="" id="BLOGGER_PHOTO_ID_5344136911177588402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;He was very excited to have on stage a guy showing a top-notch cutting-edge version of a satellite ground station management application used today and running fully on Java using over 1000 OSGi modules.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Two Hungarian university students showed off the project that won them first price in the &lt;a href="http://edu.ricoh-developer.com/contest/open/about/index.jsp"&gt;&lt;span style="font-weight: bold;"&gt;Ricoh Printer Contest&lt;/span&gt;&lt;/a&gt;. Those printer/copiers are Java-powered and the students used them to grade multiple choice exams.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Atlassian wins Duke's Choice Award for Clover!&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/Sio285jD4gI/AAAAAAAAMy4/k1LFqA7YDLY/s1600-h/DSC_2735.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 364px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/Sio285jD4gI/AAAAAAAAMy4/k1LFqA7YDLY/s400/DSC_2735.JPG" alt="" id="BLOGGER_PHOTO_ID_5344144327696441858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Another interesting guest was &lt;a href="http://www.visuvi.com/"&gt;Visuvi&lt;/a&gt;: Not only can you upload (cell phone cam or hi-res) images to their search engine and have them analyzed (e.g. to answer the question "who painted that?"), but most importantly, the new image analysis technology is used for &lt;span style="font-weight: bold;"&gt;cancer research&lt;/span&gt; (e.g. you can search through a biopsy image database for visually similar cases). The database currently stores about 50 million images whereas a high-resolution image hold 3000 Mega Pixels and is about 60 GB !!!&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sio0nWZPEvI/AAAAAAAAMyw/HCE_KMaukNI/s1600-h/DSC_2760.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 283px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sio0nWZPEvI/AAAAAAAAMyw/HCE_KMaukNI/s400/DSC_2760.JPG" alt="" id="BLOGGER_PHOTO_ID_5344141758459482866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;A musician&lt;/span&gt; showed off a Java-powered &lt;span style="font-weight: bold;"&gt;juke box&lt;/span&gt; that allows independent artists to upload their creations to a web site and have it played in bars. As James put it: “Here's Manuel. He is a musician. He has a problem.”And with the help of a touch screen, a cash reader, and Java FX, he put together a solution. James had to insert a 1$ bill in order to run the demo :-) He said: "1$ for a starving musician"...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/Siox7kotVEI/AAAAAAAAMyY/hT8aOGE31kI/s1600-h/DSC_2763.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 260px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/Siox7kotVEI/AAAAAAAAMyY/hT8aOGE31kI/s400/DSC_2763.JPG" alt="" id="BLOGGER_PHOTO_ID_5344138807344976962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;"Project Bixby"&lt;/span&gt; controls an Audi TT on a dirt rallye course going &lt;em style="font-weight: bold;"&gt;really&lt;/em&gt; fast (160 km/h) without a driver! This was very impressive...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SioyTrBz4tI/AAAAAAAAMyg/IikbihIPBnE/s1600-h/DSC_2767.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 249px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SioyTrBz4tI/AAAAAAAAMyg/IikbihIPBnE/s400/DSC_2767.JPG" alt="" id="BLOGGER_PHOTO_ID_5344139221377737426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SioyWbqC9OI/AAAAAAAAMyo/YtgqlgmZKsM/s1600-h/DSC_2769.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 189px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SioyWbqC9OI/AAAAAAAAMyo/YtgqlgmZKsM/s400/DSC_2769.JPG" alt="" id="BLOGGER_PHOTO_ID_5344139268791137506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;And finally, the&lt;a href="http://www.lincvolt.com/"&gt;“LincVolt”&lt;/a&gt; project controls a 1959 Lincoln Continental with an electric motor, this time with a human driver: Neil Young! There is a Swing-based control panel in the car and while driving around, people can follow the data on the website. Fancy stuff... If I'm right, the car can produce 500 horse power !?&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;=== Technical Sessions ===&lt;/span&gt;&lt;br /&gt;I'm still suffering from this week's firehose of information! It is again 2:35am... there will be only the titles of visited technical sessions without any comments. Sorry!&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JCA 1.6&lt;/span&gt; (by the two spec leads): most important take away: in addition to security context outflow there is now also security context inflow -&gt; JCA 1.6 provides E2E security context propagation!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Google Guice&lt;/span&gt; (by Jesse Wilson)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Async with SCA&lt;/span&gt; (Apache Toscany)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JMS: Performance vs Reliability&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sio6kuLOBHI/AAAAAAAAMzA/7PD-puhSz2U/s1600-h/DSC_2787.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 255px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sio6kuLOBHI/AAAAAAAAMzA/7PD-puhSz2U/s400/DSC_2787.JPG" alt="" id="BLOGGER_PHOTO_ID_5344148310373303410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;=== Bye Bye San Francisco ===&lt;br /&gt;&lt;/span&gt;&lt;span&gt;After the last session (5.10pm) we had early dinner at the Chieftain Irish Pub. After that I headed back to hotel for writing the two posts (yesterday and today).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;On the way to the pub we spotted these here...&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sio656ipclI/AAAAAAAAMzI/9AcLZRQlLpA/s1600-h/DSC_2817.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 229px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sio656ipclI/AAAAAAAAMzI/9AcLZRQlLpA/s400/DSC_2817.JPG" alt="" id="BLOGGER_PHOTO_ID_5344148674470048338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Finally in the Pub: Anchor Steams... aaaah&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/Sio68i8QhEI/AAAAAAAAMzQ/6NnAgeydGJk/s1600-h/DSC_2818.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/Sio68i8QhEI/AAAAAAAAMzQ/6NnAgeydGJk/s400/DSC_2818.JPG" alt="" id="BLOGGER_PHOTO_ID_5344148719674623042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;At 9.30pm, we had a quick walk around block to take some photoshoots of SF by night:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Bye bye JavaOne, Hello WWDC!&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sio7enxmpLI/AAAAAAAAMzY/tOzjhl_go84/s1600-h/DSC_2830.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 268px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sio7enxmpLI/AAAAAAAAMzY/tOzjhl_go84/s400/DSC_2830.JPG" alt="" id="BLOGGER_PHOTO_ID_5344149305087665330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/Sio78Uk0X3I/AAAAAAAAMzg/sbwIyuMhEQw/s1600-h/DSC_2819.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/Sio78Uk0X3I/AAAAAAAAMzg/sbwIyuMhEQw/s400/DSC_2819.JPG" alt="" id="BLOGGER_PHOTO_ID_5344149815329841010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sio8J7KwchI/AAAAAAAAMzo/lwOeejpoTBo/s1600-h/DSC_2844.JPG"&gt;&lt;img style="cursor: pointer; width: 600px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sio8J7KwchI/AAAAAAAAMzo/lwOeejpoTBo/s800/DSC_2844.JPG" alt="" id="BLOGGER_PHOTO_ID_5344150049027813906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sio9FYke5UI/AAAAAAAAMz4/z1QPDMbN3ug/s1600-h/DSC_2849.JPG"&gt;&lt;img style="cursor: pointer; width: 600px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sio9FYke5UI/AAAAAAAAMz4/z1QPDMbN3ug/s800/DSC_2849.JPG" alt="" id="BLOGGER_PHOTO_ID_5344151070532625730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sio9BawqkYI/AAAAAAAAMzw/lAGMDJANLc0/s1600-h/DSC_2845.JPG"&gt;&lt;img style="cursor: pointer; width: 600px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sio9BawqkYI/AAAAAAAAMzw/lAGMDJANLc0/s800/DSC_2845.JPG" alt="" id="BLOGGER_PHOTO_ID_5344151002401116546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/Sio-a8IyBHI/AAAAAAAAM0A/1Swcqk5B49o/s1600-h/DSC_2857.JPG"&gt;&lt;img style="cursor: pointer; width: 600px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/Sio-a8IyBHI/AAAAAAAAM0A/1Swcqk5B49o/s800/DSC_2857.JPG" alt="" id="BLOGGER_PHOTO_ID_5344152540368995442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This year's JavaOne was one of the best so far, not only due to the strong focus on Java EE 6 but also because of having talked to so many people, spec leads, experts and other visitors...&lt;br /&gt;As said, time passed by so quickly, it's quite a shock realizing that all this is already over again...&lt;br /&gt;&lt;br /&gt;Looking forward to bring back lots of infos, impressions and ... gadgets back to Switzerland!&lt;br /&gt;&lt;br /&gt;CU soon&lt;br /&gt;- Balz&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-5569644970210078188?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/5569644970210078188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=5569644970210078188' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5569644970210078188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5569644970210078188'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-friday-day-4.html' title='JavaOne 2009 Summary: Friday (Day 4)'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_1_YR6TdF3aY/SioqN4qNnWI/AAAAAAAAMxo/vlQHr3bJ4_4/s72-c/DSC_2792.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-5761109188060939099</id><published>2009-06-05T05:05:00.018+02:00</published><updated>2009-06-06T10:33:05.766+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>JavaOne 2009 Summary: Thursday (Day 3)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/Sin4g_XcYVI/AAAAAAAAMwo/9YUGgwW2LHs/s1600-h/DSC_2789.JPG"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/Sin4g_XcYVI/AAAAAAAAMwo/9YUGgwW2LHs/s800/DSC_2789.JPG" alt="" id="BLOGGER_PHOTO_ID_5344075678501069138" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Related Posts so far:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-monday.html"&gt;Day 0&lt;/a&gt;: CommunityOne, GlassFish&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-tuesday-day-1.html"&gt;Day 1&lt;/a&gt;: JavaOne, Key Note&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-wednesday-day-2.html"&gt;Day 2&lt;/a&gt;: JavaOne, Mobility&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;JavaOne Day 3 Summary&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;=== General Sessions ===&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Microsoft in a general session!&lt;/span&gt;&lt;br /&gt;Corporate VP Dan'l Lewin started with the 5 year partnership with Sun and mentioned Microsoft's dedication to the interoperability topic between Java and .NET. As of a survey they did last year, 73% out of 5 million interviewed developers work in a mixed environment.&lt;br /&gt;At JavaOne 2006 Sun announced new workforces together with Microsoft to work on the interoperatbility topic. The demoed &lt;a href="http://incubator.apache.org/stonehenge/"&gt;Apache Stonehenge&lt;/a&gt; is certainly an outcome of it, a prove also that Sun joined the project which serves as set of sample applications to demonstrate seamless interoperability across multiple underlying platform technologies (like Java and .NET). Key message here was that given the matured WS-* standards, interoperability was &lt;span style="font-style: italic;"&gt;"possible"&lt;/span&gt; but the last mile on "&lt;span style="font-style: italic;"&gt;how to correctly configure&lt;/span&gt; the products/framworks on each side" was still very hard to do. Now with Stonehenge the last mile gap is closed. The demo was presented by Greg Leake, a Senior Director at Microsoft, and Harold Carr, Sun's Lead Architect for the &lt;a href="https://metro.dev.java.net/"&gt;Metro Web Service Stack&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Further resources: &lt;a href="http://www.interoperabilitybridges.com/"&gt;www.interoperabilitybridges.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sin6hp_mCFI/AAAAAAAAMww/V_1Nk6DVDXE/s1600-h/DSC_2664.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 248px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sin6hp_mCFI/AAAAAAAAMww/V_1Nk6DVDXE/s400/DSC_2664.JPG" alt="" id="BLOGGER_PHOTO_ID_5344077888967018578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;IB&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;M&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;: Extreme Transaction Processing and Elasticity&lt;/span&gt;&lt;br /&gt;Craig Hayman, IBM's vice president of &lt;a href="http://www-01.ibm.com/software/websphere/" target="_blank"&gt;WebSphere&lt;/a&gt; software, focused on the importance on open source and open standards development with Java. To demonstrate some of the work that IBM has been doing with open source to innovate in the middle tier, Hayman called to the stage Ted Ellison, vice president of the Apache Software Foundation and an IBM senior technical staff member, to give a demonstration of the &lt;a href="http://harmony.apache.org/" target="_blank"&gt;Apache Harmony project&lt;/a&gt;.  More details on the session see &lt;a href="http://java.sun.com/javaone/2009/articles/gen_ibm.jsp"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/Sin6tQN9W-I/AAAAAAAAMw4/MRvsJ5VI6uM/s1600-h/DSC_2679.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 251px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/Sin6tQN9W-I/AAAAAAAAMw4/MRvsJ5VI6uM/s400/DSC_2679.JPG" alt="" id="BLOGGER_PHOTO_ID_5344078088206375906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;One particular slide in the presentation I found cool in particular: it showed again the evolution of architectures and their focus points:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Mainframe based Architectures -&gt;&lt;br /&gt;-&gt; Client/Server Architectures -&gt;&lt;br /&gt;-&gt; Focus on Mobility Architectures -&gt;&lt;br /&gt;-&gt; Cloud Architectures&lt;/span&gt;... what comes next? Unfortunately, I was not quick enough to take a photo of the slide... This one is good too:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sin6xaaYXiI/AAAAAAAAMxA/aO1g8p__TEY/s1600-h/DSC_2682.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 201px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sin6xaaYXiI/AAAAAAAAMxA/aO1g8p__TEY/s400/DSC_2682.JPG" alt="" id="BLOGGER_PHOTO_ID_5344078159662308898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;=== Technical Sessions Highlights ===&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Enterprise Integration Patterns in Practice&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;by Andreas Egloff (Lead Architect GlassFish Fuji) and Bruce Snyder (Apache Camel)&lt;/span&gt;&lt;br /&gt;Besides the introduction of some integration patterns (like "Content Based Routing", "Pipeline Routing", "Spitter" and "Aggregator"), both presenters summarized two open source products that address this topic:&lt;br /&gt;- &lt;a href="https://fuji.dev.java.net/"&gt;Fuji&lt;/a&gt;: The core of OpenESB v3, originating from Java CAPS, currently still beta (M6)&lt;br /&gt;- &lt;a href="http://camel.apache.org/"&gt;Apache Camel&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;While both products surprised in their richness of functionality that certainly simplifies many application implementations, Fuji convinced us more and not only because it really cool web based UI (based on JavaScript!):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sin0hV50U1I/AAAAAAAAMwg/39s9zd8zH4o/s1600-h/fuji-screenshot-overall.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 203px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sin0hV50U1I/AAAAAAAAMwg/39s9zd8zH4o/s400/fuji-screenshot-overall.jpg" alt="" id="BLOGGER_PHOTO_ID_5344071286504313682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the Pavilion I talked to Andreas Egloff asking about clusterability: this will come next year with GlassFish AS v3.1 which by then will support clusters and Fuji will be built on top of that. Transaction Support: Fuji's focus is Ease of Development combined with strong focus on Enterprise implementations, so distributed transactions are fully supported as of the first release by end of this year.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Dealing with Asynchronicity in Java Web Services&lt;br /&gt;&lt;span style="font-weight: normal; font-style: italic;"&gt;by Gerard Davison and Manoj Kumar (both Oracle)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;- nothing new, it was pure JAX-WS based async stuff&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Bean Validation: Declare Once, Use Anywhere&lt;br /&gt;&lt;span style="font-weight: normal; font-style: italic;"&gt;by Emmanuel Bernard&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;Actually a very good presentation, Validation Cascadation, Groups (Subset of constraints), Partial Validation, Custom constraints, Metadata API!... Bean Validation is available across layers (JSF, EJBs, JPA): JSF2 requires zero config, JPA2: validate on entity change. In general, Bean Validators can be injected as Resources in Java EE 6.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;eBay: Best Practices for Large-Scale Web Sites&lt;br /&gt;&lt;span style="font-weight: normal; font-style: italic;"&gt;by Randy Shoup (Lead Architect of eBay)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;I expected a special large scale Java EE architecture but it was the &lt;span style="font-weight: bold;"&gt;contradiction&lt;/span&gt; of it:&lt;br /&gt;- no JDBC client transactions, no distributed transactions (2PC, XA)&lt;br /&gt;- no DB constraints in the DB schema&lt;br /&gt;- no HTTP session states (the state is kept in a combination of cookie/URL-params/DB)&lt;br /&gt;- no EJBs&lt;br /&gt;- everything is asynchronously processed&lt;br /&gt;&lt;br /&gt;I was surprised about the architecture very much, somehow I could not believe it but due to the success of eBay, it is obviously like that...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Some backgrounds&lt;/span&gt;:&lt;br /&gt;No DB Constraints: The user profiles are kept in a DB RAC, the auction items are kept in another DB RAC. The 1:many relation between user and item was not based on constraints but was solved by treating it in a bottom-up approach...&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;best practices&lt;/span&gt; in a nut shell were:&lt;br /&gt;- Partition Everything (e.g. User Profile DB RAC, Item DB RAC, split data by load and usage pattern&lt;br /&gt;- Async Everywhere: Synchronous designs must address peak load whereas asnyc designs can flatten out peak loads and compensate at time of low loads&lt;br /&gt;- Automate Everything: Based on feedback loops the systems adapt their configuration automatically (sizing). This is achieved by defining SLA between consumer and producer components. If the consumer tends to violate an SLA, it starts to scale itself horizontally.&lt;br /&gt;- Everything can fail: all systems must be tolerant of failure&lt;br /&gt;- Embrace Inconsistency: He introduced the CAP theorem: Consistency, Availability, Partitioning. As of the theorem you can have only two of them. eBay selected availability (7x24) and partitioning according to its priorities. Consistency is seen as a spectrum and is therefore not comparable to "normal Java EE" designs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Some numbers:&lt;/span&gt;&lt;br /&gt;- 1.6 millions of transactions per second worldwide&lt;br /&gt;- 88.3 millions of user profiles&lt;br /&gt;- 160 millions of items&lt;br /&gt;- 2 Tera Bytes of logfiles per day&lt;br /&gt;- 2 billion page views per day (ebay.com)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Drizzle: A New Database for the Cloud&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Various&lt;/span&gt;:&lt;br /&gt;- &lt;a href="http://www.springsource.com/products/sts"&gt;SpringSource Tool Suite&lt;/a&gt; (STS) is now for free!&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;=== BOFs ===&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style="font-weight: bold;"&gt;Enterprise Web 2.0 Architectures&lt;br /&gt;&lt;span style="font-weight: normal; font-style: italic;"&gt;by Brazilian Consultancy Company Globalcode&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;Goal of the session was to show how they compared different web application stacks and which stack suits best for which customer environment.&lt;/span&gt; &lt;span style="font-weight: normal;"&gt;Stacks considered were:&lt;/span&gt; &lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;br /&gt;1.) &lt;span style="font-weight: bold;"&gt;Pure Web&lt;/span&gt;: JSF 1.2, Facelets 1.1.x&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;2.) &lt;span style="font-weight: bold;"&gt;Web + JMS + EJB&lt;/span&gt;: Compared to Pure Web: Business Logic in EJBs, not in JSF managed beans anymore&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;3.) &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;/span&gt;Spring&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;: &lt;span style="font-weight: normal;"&gt;Pure Web + Spring components, Spring AOP and Spring Security&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;4.) &lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-weight: bold;"&gt;Seam&lt;/span&gt;&lt;/span&gt;: &lt;span style="font-weight: normal;"&gt;Pure Web + JSF/Ajax + Seam components and JBoss Rules&lt;br /&gt;5.) &lt;span style="font-weight: bold;"&gt;Seam + Spring&lt;/span&gt;: As of some customer they have in Brazil, a migration from large-scale Spring based applications was required to a Seam based model. In this very special case, they found out that both worlds can live together at the same time in the same application. They also found out that injecting a Seam component into the Spring container was possible and vice versa.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;It is definitly worth going through these slides and see the last table (criterias vs stacks): red cells indicate high risk, orange a potential risk&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;A big surprise was the public availability of a &lt;span style="font-weight: bold;"&gt;web based CRUD generator&lt;/span&gt; where you can enter the data model, select the stack and export a sample application as ZIP file containing the IDE project... Really nice!&lt;br /&gt;Check it out here: &lt;a href="http://supercrud.com/index.jsf"&gt;supercrud.com&lt;br /&gt;&lt;/a&gt; &lt;a href="http://supercrud.com/index.jsf"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JavaFX and the Nintendo Wiimote&lt;/span&gt;&lt;br /&gt;Take a Wii Remote Controller, mount it near the image source (TV, Beamer) and mount the infrared sensors (that are normally mounted near the image source) on your moving objects, in this BOF a normal glove. Write some JavaFX and off you go with a virtual paint panel wherever the beamer is projecting to :-)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;painting on the wall by using fancy JavaFX gadgets...&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SionncdhfRI/AAAAAAAAMxI/XFsbL8zvm7Q/s1600-h/DSC_2719.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 245px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SionncdhfRI/AAAAAAAAMxI/XFsbL8zvm7Q/s400/DSC_2719.JPG" alt="" id="BLOGGER_PHOTO_ID_5344127466436918546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SionqcPDgxI/AAAAAAAAMxQ/srhIrl2WyMY/s1600-h/DSC_2720.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 242px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SionqcPDgxI/AAAAAAAAMxQ/srhIrl2WyMY/s400/DSC_2720.JPG" alt="" id="BLOGGER_PHOTO_ID_5344127517915841298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;=== After Dark Bash ===&lt;/span&gt;&lt;br /&gt;Back in 1999, I was in San Francisco in the very same hall at the &lt;a href="http://www.isscc.org/isscc/index.htm"&gt;ISSCC&lt;/a&gt; (International Solid State Circuit Conference) presenting the &lt;a href="http://www.iis.ee.ethz.ch/publications/research_review/1999/035digital.pdf"&gt;diploma thesis&lt;/a&gt; from ETH Zurich. In the very same hall, the official JavaOne After Dark Bash party took place... impressive!! Very loud live rock band performing on a huge stage accompanied by a food buffet and various drink bars.&lt;br /&gt;While Dani was still at some JavaFX labs exercise, I spent some 45 minutes there and enjoyed the short break :-) After that, I went back to the last BOF (while Dani enjoyed the last hour of the bashing party :-)...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiooZZ0waZI/AAAAAAAAMxY/CarhuATARO4/s1600-h/DSC_2710.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiooZZ0waZI/AAAAAAAAMxY/CarhuATARO4/s400/DSC_2710.JPG" alt="" id="BLOGGER_PHOTO_ID_5344128324722518418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;=== Bookstore ===&lt;br /&gt;&lt;/span&gt;&lt;span&gt;As usual, the book store always attracts each day again... this time:&lt;br /&gt;- JSF 2 and JBoss Seam / WebBeans&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SioouTJ7TaI/AAAAAAAAMxg/kd4Ae52EiuM/s1600-h/DSC_2690.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SioouTJ7TaI/AAAAAAAAMxg/kd4Ae52EiuM/s400/DSC_2690.JPG" alt="" id="BLOGGER_PHOTO_ID_5344128683709517218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Cu tomorrow, last day!&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-5761109188060939099?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/5761109188060939099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=5761109188060939099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5761109188060939099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5761109188060939099'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-thursday-day-3.html' title='JavaOne 2009 Summary: Thursday (Day 3)'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_1_YR6TdF3aY/Sin4g_XcYVI/AAAAAAAAMwo/9YUGgwW2LHs/s72-c/DSC_2789.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-2566460655617849890</id><published>2009-06-04T07:15:00.003+02:00</published><updated>2009-06-06T04:57:31.661+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>JavaOne 2009 Summary: Wednesday (Day 2)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SijWJxHaH2I/AAAAAAAAMug/tyND2dNjfDE/s1600-h/DSC_2646.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 117px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SijWJxHaH2I/AAAAAAAAMug/tyND2dNjfDE/s400/DSC_2646.jpg" alt="" id="BLOGGER_PHOTO_ID_5343756421166669666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Back again... well I'm sorry to write this but I could not make it yesterday to publish the summary of Wednesday. It was 2:15am and I was very exhausted after having been up since 7am. So, I still hope you enjoy this summary as I try to include as much infos as a can within the given time from different sources in the net and myself.&lt;br /&gt;&lt;br /&gt;Related Posts so far:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-monday.html"&gt;Day 0&lt;/a&gt;: CommunityOne&lt;/li&gt;&lt;li&gt;&lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-tuesday-day-1.html"&gt;Day 1&lt;/a&gt;: JavaOne, Key Note&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijeXTsXPyI/AAAAAAAAMvw/myQTSEm0ris/s1600-h/DSC_2645.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 236px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijeXTsXPyI/AAAAAAAAMvw/myQTSEm0ris/s400/DSC_2645.JPG" alt="" id="BLOGGER_PHOTO_ID_5343765449879797538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JavaOne Day 2 Summary&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;=== Mobility General Session ===&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Christopher David, Head of Development and Partner Engagement at &lt;span style="font-weight: bold;"&gt;Sony Ericsson&lt;/span&gt;, was the main speaker for the talk. During his presentation, Erik Hullman (a Senior Java Developer with Sony Ericsson) was given the task to develop a &lt;span style="font-weight: bold;"&gt;JavaFX&lt;/span&gt; Twitter client from scratch that at the end of the presentation should be deployed to &lt;span style="font-weight: bold;"&gt;three different devices&lt;/span&gt;!&lt;br /&gt;As if the task would not have been complex enough: People in the audience could send questions or comments to his Twitter accound that he answered in parallel to his programming efforts... and at the end, the same deployable artefact worked fine on all three devices. Sounds promising!!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Rikko Sakaguchi, Corporate VP of Creation and Development&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SijWemcIgqI/AAAAAAAAMuo/8LOmiOa1spk/s1600-h/DSC_2600.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 268px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SijWemcIgqI/AAAAAAAAMuo/8LOmiOa1spk/s400/DSC_2600.jpg" alt="" id="BLOGGER_PHOTO_ID_5343756779078058658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;=== Technical Sessions Highlights ===&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Hudson: Continuous Integration in the Cloud with Hudson&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(by Kohsuke Kawaguchi --&gt; &lt;a href="http://weblogs.java.net/blog/kohsuke/"&gt;Blog&lt;/a&gt;)&lt;br /&gt;&lt;/span&gt;- I very much like the &lt;span style="font-weight: bold;"&gt;automated distribution&lt;/span&gt; approach: You start the Master Instance with Hudson installed as well as with the &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/PXE+Plugin"&gt;&lt;span style="font-weight: bold;"&gt;Hudson PXE Plugin&lt;/span&gt;&lt;/a&gt; (Prebuilt Execution Environment). After that you start the Slave Instance (on another machine) and boot from the network. That's it!&lt;br /&gt;- The defined target machines can be flagged with so called &lt;span style="font-weight: bold;"&gt;"labels"&lt;/span&gt; and can be used to ensure that Test Units aimed for Windows machines are executed on Windows boxes (and same for Unix boxes).&lt;br /&gt;- The Hudson Master instance can run on Windows or Unix.&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;- &lt;span style="font-weight: bold;"&gt;Cloud:&lt;/span&gt; The demo was about the creation of a CI environment in &lt;span style="font-weight: bold;"&gt;Amazon EC2&lt;/span&gt;. It was very impressive how quickly the setup was done and executed successfully.&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Hadoop: &lt;/span&gt;Kohsuke also mentioned the rather &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Hadoop+Plugin"&gt;new plugin&lt;/a&gt; for &lt;a href="http://hadoop.apache.org/"&gt;&lt;span style="font-weight: bold;"&gt;Hadoop&lt;/span&gt;&lt;/a&gt; which makes Hudson run on Hadoop.&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;- &lt;span style="font-weight: bold;"&gt;Slides&lt;/span&gt;: &lt;a href="http://wiki.hudson-ci.org/download/attachments/37323793/Hudson+J1+2009.ppt?version=1"&gt;PPT&lt;/a&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijWsUOfliI/AAAAAAAAMuw/XBsz5cXY1rE/s1600-h/DSC_2615.JPG"&gt;&lt;img style="cursor: pointer; width: 267px; height: 400px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijWsUOfliI/AAAAAAAAMuw/XBsz5cXY1rE/s400/DSC_2615.JPG" alt="" id="BLOGGER_PHOTO_ID_5343757014707181090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;"Effective Java": Still effective after all these year&lt;/span&gt;s&lt;span style="font-style: italic;"&gt;&lt;br /&gt;(by Joshua Bloch)&lt;br /&gt;&lt;/span&gt;As in his other presentations, Joshua presented his content in a very nice way accompanied by his typical kind of humour... As of the end of the day, his book was again "Number 1" in the Bookstore's Top Seller List.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JPA 2.0&lt;/span&gt;&lt;span style="font-style: italic;"&gt; (by Linda DeMichiel)&lt;br /&gt;&lt;/span&gt;   The new Criteria API as well as the introduction of the pessimistic locking modes were interesting to follow. Overall, the session was a little bit too much on the theoretical side.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;WebBeans! Sorry: JCDI, Java Contexts and Dependency Injection: JSR-299&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(by Gavin King)&lt;/span&gt;&lt;br /&gt;I just like the way Gavin presents, he has his unique style, very straight forward and nice to follow. JCDI targets to support stateful objects, builds the glue between JSF and EJB, allows loose coupling with strong typing and introduces very nice concepts like BindingTypes and DeploymentTypes.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijW2EXsm1I/AAAAAAAAMu4/bA_jv2nmYdE/s1600-h/DSC_2641.JPG"&gt;&lt;img style="cursor: pointer; width: 267px; height: 400px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijW2EXsm1I/AAAAAAAAMu4/bA_jv2nmYdE/s400/DSC_2641.JPG" alt="" id="BLOGGER_PHOTO_ID_5343757182249507666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;After the speech we asked Gavin about the other "DI" related JSR submitted by Bob Lee (Google) and Rod Johnson (SpringSource): &lt;a href="http://jcp.org/en/jsr/detail?id=330"&gt;JSR-330&lt;/a&gt;. It states &lt;span style="font-style: italic;"&gt;"This JSR targets Java SE, and it will lay a foundation for dependency injection in Java EE."&lt;/span&gt; So it seems that this is a big discussion at the moment as the JSR-299 has started 3 years ago and is nearly finalized now and could make it easily into the final release of Java EE 6 by end of this year whereas the newly submitted JSR would take at least 1 year until its finalization and would eventually postpone the release of Java EE 6 as 299 would directly depend on 330. I'm very curious how this gets resolved. My personal hope is that they agree on a common dependency injection foundation for SE and EE and include that one with potential EE specifics in the nearly finalized 299 (During the Java EE 6 Panel Discussion BOF, William Shannon meant that the EG would never accept two different DI specs on the Java Platform, so a common sense must be found, and quickly).&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Links &lt;/span&gt;around this discusssion:&lt;br /&gt;--&gt; &lt;a href="http://google-code-updates.blogspot.com/2009/05/javaxinjectinject.html"&gt;Bob Lee's initial post&lt;/a&gt; (from May 5th, 2009)&lt;br /&gt;--&gt; &lt;a href="http://in.relation.to/Bloggers/CommentsOnAnnotationsForDependencyInjection"&gt;Gavin King's statement&lt;/a&gt; (from May 7th, 2009)&lt;br /&gt;--&gt; Bob's &lt;a href="http://in.relation.to/Bloggers/CommentsOnAnnotationsForDependencyInjection#comment11225"&gt;comment&lt;/a&gt; on Gavin's statement&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;=== BOFs ===&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JSF Platform and Ajax: State of the Union&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;with Ted Goddard (Lead Architect of ICEfaces), Andy Schwartz (Oracle ADF Faces) and Alexandr Smirnov (RichFaces)&lt;/span&gt;&lt;br /&gt;This kind of panel discussion was very interesting as each of the presenters talked about the current status and the progress towards JSF 2.0. RichFaces and ICEfaces convinced most (RichFaces because of its seemless integration with Seam and ICEfaces because of its architecture and the unique feature of automatic Ajax Push based on server-side DOM-diffing (more &lt;a href="http://www.icefaces.org/main/ajax-java/ajaxpush.iface"&gt;here&lt;/a&gt;)).&lt;br /&gt;&lt;a href="https://woodstock.dev.java.net/"&gt;Woodstock&lt;/a&gt; was not represented. As of the presenters there are no plans for further releases. On ICEfaces there is a migration plan described from Woodstock to ICEfaces.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ted Goddard&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SijYSojPe_I/AAAAAAAAMvA/yFMYOpNAU9Y/s1600-h/DSC_2650.JPG"&gt;&lt;img style="cursor: pointer; width: 265px; height: 400px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SijYSojPe_I/AAAAAAAAMvA/yFMYOpNAU9Y/s400/DSC_2650.JPG" alt="" id="BLOGGER_PHOTO_ID_5343758772509572082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Java EE 6 Experts Discussion Panel&lt;/span&gt;&lt;br /&gt;hosted by Roberto Chinnici and William Shannon&lt;br /&gt;Good discussions, questions and comments... I was surprised that JSR-299 was not mentioned at all in the presentation about Java EE 6. After having asked the question why it is missing, a big *sigh* from Roberto Chinnici :-) (as expected), then responding that they were not yet sure about the inclusion of JSR-299 in Java EE 6. I reformulated my question what the current trend would be, rather "in" or "out". After eye-contacting with William Shannon, William meant "give him the full story"... Then the story around "JSR-299 vs JSR-330" has been described (see WebBeans above for more details).&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SijeExqIIVI/AAAAAAAAMvo/kHVVYDkHQrs/s1600-h/CSC_2698.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 249px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SijeExqIIVI/AAAAAAAAMvo/kHVVYDkHQrs/s400/CSC_2698.JPG" alt="" id="BLOGGER_PHOTO_ID_5343765131505967442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;William Shannon and &lt;/span&gt;&lt;span style="font-style: italic;"&gt;Roberto Chinnici&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijYbUyrU7I/AAAAAAAAMvI/UeGvzBfqeKU/s1600-h/DSC_2652.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 227px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijYbUyrU7I/AAAAAAAAMvI/UeGvzBfqeKU/s400/DSC_2652.JPG" alt="" id="BLOGGER_PHOTO_ID_5343758921824424882" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;=== Pavilion ===&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;At the &lt;span style="font-weight: bold;"&gt;ICEfaces&lt;/span&gt; booth we met Micha Kiener (also from Switzerland) who is working for Mimacom. We were introduced to the overall architecture of ICEfaces and that looked really cool (server-side DOM diffing, Ajax Push). The demo showed a very elegant way of doing Interportlet Communication (IPC) on &lt;span style="font-weight: bold;"&gt;Liferay Portal&lt;/span&gt; 5.2. Really nice!!&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;And some pictures from the Pavilion and its entrance area...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SijfhhbfZaI/AAAAAAAAMwA/n08lwqLsvXo/s1600-h/DSC_2620.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SijfhhbfZaI/AAAAAAAAMwA/n08lwqLsvXo/s400/DSC_2620.JPG" alt="" id="BLOGGER_PHOTO_ID_5343766724877444514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SijdnQyCtoI/AAAAAAAAMvg/jLTn5uM9pXw/s1600-h/DSC_2636.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 209px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SijdnQyCtoI/AAAAAAAAMvg/jLTn5uM9pXw/s400/DSC_2636.JPG" alt="" id="BLOGGER_PHOTO_ID_5343764624464590466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Dani at the SpringSource booth&lt;br /&gt;where it says "Eliminating Enterprise Java Complexity"&lt;/span&gt;...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijdjKl0t_I/AAAAAAAAMvY/D2TvFohwS5o/s1600-h/DSC_2627.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 277px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijdjKl0t_I/AAAAAAAAMvY/D2TvFohwS5o/s400/DSC_2627.JPG" alt="" id="BLOGGER_PHOTO_ID_5343764554083252210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sijdd9N_KxI/AAAAAAAAMvQ/bt6ghcfGvhc/s1600-h/DSC_2618.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/Sijdd9N_KxI/AAAAAAAAMvQ/bt6ghcfGvhc/s400/DSC_2618.JPG" alt="" id="BLOGGER_PHOTO_ID_5343764464594266898" border="0" /&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijfeQaz4nI/AAAAAAAAMv4/MZwnGqudYc8/s1600-h/DSC_2619.JPG"&gt;&lt;img style="cursor: pointer; width: 267px; height: 400px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SijfeQaz4nI/AAAAAAAAMv4/MZwnGqudYc8/s400/DSC_2619.JPG" alt="" id="BLOGGER_PHOTO_ID_5343766668771582578" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2566460655617849890?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2566460655617849890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2566460655617849890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2566460655617849890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2566460655617849890'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/06/javaone-2009-summary-wednesday-day-2.html' title='JavaOne 2009 Summary: Wednesday (Day 2)'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_1_YR6TdF3aY/SijWJxHaH2I/AAAAAAAAMug/tyND2dNjfDE/s72-c/DSC_2646.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-5904360856811123263</id><published>2009-06-03T07:57:00.002+02:00</published><updated>2009-06-05T07:26:47.821+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>JavaOne 2009 Summary: Tuesday (Day 1)</title><content type='html'>Take a deep breath... Time is really rushing away, it is actually Wednesday night now (11pm), 50% already passed, but as promised in the &lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-monday.html"&gt;previous&lt;/a&gt; post, there will be a summary of each day. So here it is!&lt;br /&gt;Before kicking off, read the summary of &lt;a href="http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-monday.html"&gt;Monday's ConferenceOne&lt;/a&gt; if you haven't done so already...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JavaOne Day 1 Summary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As every year, Day 1 started with the General Session, the key note by Sun itself and hosted this year by Sun's CGO (Chief Gaming Officer) Chris Melissinos.&lt;br /&gt;Guests on stage were&lt;br /&gt;&lt;ul&gt;&lt;li&gt;James Barresse, VP of Architecture, Platforms and Systems with eBay&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Alan Brunner, Senior VP for the Blackberry Platform&lt;/li&gt;&lt;li&gt;Dan Eklund, Executive VP of Advanced Technologies at Sony Pictures Home Entertainment&lt;/li&gt;&lt;li&gt;Lowell McAdam, President and CEO of Verizon&lt;/li&gt;&lt;li&gt;Diane Bryant, Executive VP at Intel&lt;/li&gt;&lt;li&gt;Ronan McBrien, JavaFX TV Architect (nice demo, video should be available &lt;a href="http://java.sun.com/javaone/2009/general_sessions.jsp"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Nandini Ramani, Director for JavaFX&lt;/li&gt;&lt;/ul&gt;Some pictures:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SieB7COsPhI/AAAAAAAAMsM/SH44oEgRK7U/s1600-h/DSC_2449.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 237px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SieB7COsPhI/AAAAAAAAMsM/SH44oEgRK7U/s400/DSC_2449.JPG" alt="" id="BLOGGER_PHOTO_ID_5343382334109138450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieCFvQDx8I/AAAAAAAAMsU/8U-_tI2hMHI/s1600-h/DSC_2455.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 236px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieCFvQDx8I/AAAAAAAAMsU/8U-_tI2hMHI/s400/DSC_2455.JPG" alt="" id="BLOGGER_PHOTO_ID_5343382517993162690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Jonathan Schwarz about BDJ and BD Live&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieCKgnDfrI/AAAAAAAAMsc/RM6CI-1coWs/s1600-h/DSC_2456.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 223px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieCKgnDfrI/AAAAAAAAMsc/RM6CI-1coWs/s400/DSC_2456.JPG" alt="" id="BLOGGER_PHOTO_ID_5343382599962427058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Java FX TV Demo:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SieCjQexsPI/AAAAAAAAMss/RsE4CXiBogQ/s1600-h/DSC_2468.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 252px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SieCjQexsPI/AAAAAAAAMss/RsE4CXiBogQ/s400/DSC_2468.JPG" alt="" id="BLOGGER_PHOTO_ID_5343383025129468146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieCm3fmkoI/AAAAAAAAMs0/_TtgwkFX-hg/s1600-h/DSC_2470.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 220px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieCm3fmkoI/AAAAAAAAMs0/_TtgwkFX-hg/s400/DSC_2470.JPG" alt="" id="BLOGGER_PHOTO_ID_5343383087141524098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;=== Key Note Highlights ===&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Oracle and the Future of Java:&lt;/span&gt;&lt;br /&gt;At the end of the key note, Scott McNealy called Oracle CEO Larry Ellison up on stage to address the $7.4 billion dollar question -- what will be the future of Java?&lt;br /&gt;My key notes from his answer are:&lt;br /&gt;- Oracle with a much greater R&amp;amp;D budget than Sun will be able to even more push Java forward. &lt;span style="font-style: italic;"&gt;Quote: "I don't expect a lot of changes, just expanded investment and a lot of enthusiasm coming from Oracle."&lt;/span&gt;&lt;br /&gt;- He mentioned &lt;a href="http://javafx.com/"&gt;JavaFX&lt;/a&gt; many times, he wants OpenOffice to use JavaFX as UI. He also mentioned that it would be interesting to see Android based phones and netbooks from Sun running Java and JavaFX. Rumors say that pushing JavaFX will secure his seat in the UI battle between Silverlight and Flex.&lt;br /&gt;- &lt;span style="font-style: italic;"&gt;"Look at the past to see the future"&lt;/span&gt;: by this he most probably meant Oracle's dedication to Java since its birth, its commitment to support the community and to actively participate in Java's future.&lt;br /&gt;- Interesting &lt;a href="http://technology.amis.nl/blog/5526/javaone-2009-opening-and-general-session-first-glimpse-of-oracle-sun"&gt;Link&lt;/a&gt; about Larry's talk&lt;br /&gt;- Some pictures:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;Scott mentioning that Larry might have more luck&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;to bring the JVM on the iPhone :-)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieDf36atxI/AAAAAAAAMtE/Iiitg2rZNs4/s1600-h/DSC_2505.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 216px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieDf36atxI/AAAAAAAAMtE/Iiitg2rZNs4/s400/DSC_2505.JPG" alt="" id="BLOGGER_PHOTO_ID_5343384066506536722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;"Mr. Oracle"&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SieD9yqU_5I/AAAAAAAAMtM/TX25jHql2WU/s1600-h/DSC_2508.JPG"&gt;&lt;img style="cursor: pointer; width: 250px; height: 400px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SieD9yqU_5I/AAAAAAAAMtM/TX25jHql2WU/s400/DSC_2508.JPG" alt="" id="BLOGGER_PHOTO_ID_5343384580492951442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;- And enjoy the following video:&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;object id="flashObj" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0" width="486" height="322"&gt;&lt;param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9/1640183659?isVid=1&amp;amp;publisherID=1460825906"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="flashVars" value="videoId=25089920001&amp;amp;playerID=1640183659&amp;amp;domain=embed&amp;amp;"&gt;&lt;param name="base" value="http://admin.brightcove.com"&gt;&lt;param name="seamlesstabbing" value="false"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="swLiveConnect" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed src="http://c.brightcove.com/services/viewer/federated_f9/1640183659?isVid=1&amp;amp;publisherID=1460825906" bgcolor="#FFFFFF" flashvars="videoId=25089920001&amp;amp;playerID=1640183659&amp;amp;domain=embed&amp;amp;" base="http://admin.brightcove.com" name="flashObj" seamlesstabbing="false" type="application/x-shockwave-flash" allowfullscreen="true" swliveconnect="true" allowscriptaccess="always" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="486" height="322"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://store.java.com/"&gt;Java Store&lt;/a&gt;! presented by James Gosling: still in beta, community is asked to give feedback on how payments should be implemented.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Release of &lt;a href="http://javafx.com/"&gt;Java FX 1.2&lt;/a&gt; !&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieCVZwQB9I/AAAAAAAAMsk/6bVaWCLEzGM/s1600-h/DSC_2465.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 221px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieCVZwQB9I/AAAAAAAAMsk/6bVaWCLEzGM/s400/DSC_2465.JPG" alt="" id="BLOGGER_PHOTO_ID_5343382787100510162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;"The classpath is dead":&lt;/span&gt; Chief Engineer of Java SE, Mark Reinhold,  said this after having shown a nifty demo on how Java SE 7 manages modules.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SieEifd61aI/AAAAAAAAMtc/ofK8XwKUbq0/s1600-h/DSC_2526.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SieEifd61aI/AAAAAAAAMtc/ofK8XwKUbq0/s400/DSC_2526.JPG" alt="" id="BLOGGER_PHOTO_ID_5343385210995791266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;"The web.xml is dead":&lt;/span&gt; CTO at Sun, Bob Brewin, said this while talking about the next enterprise release Java EE 6.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Announcement of &lt;a href="http://www.jataf.com/"&gt;JATAF&lt;/a&gt; ! The Java Application Terminal Alignment Framework is an open, collaborative community striving for a unified Java ME platform.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Project Dark Chat&lt;/span&gt;: Nice demo app for the JavaOne.&lt;br /&gt;--&gt; Download this &lt;a href="http://baszero.googlepages.com/Darkchat.jnlp"&gt;JNLP file&lt;/a&gt; (jre6u10 required)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;DJ Anna&lt;/span&gt;: for me as a fan of electronic music, the opening sounds mixed live by DJ Anna, a local DJ of San Francisco, are always a pleasure to listen to...&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieAolzHKLI/AAAAAAAAMr0/JtB9biFODsk/s1600-h/DSC_2377.JPG"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieAolzHKLI/AAAAAAAAMr0/JtB9biFODsk/s400/DSC_2377.JPG" alt="" id="BLOGGER_PHOTO_ID_5343380917727996082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SieBk2OMVrI/AAAAAAAAMr8/ItJQwKr3Myk/s1600-h/DSC_2419.JPG"&gt;&lt;img style="cursor: pointer; width: 221px; height: 400px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SieBk2OMVrI/AAAAAAAAMr8/ItJQwKr3Myk/s400/DSC_2419.JPG" alt="" id="BLOGGER_PHOTO_ID_5343381952928700082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SieBuYm5ZEI/AAAAAAAAMsE/x6SfJHARRvo/s1600-h/DSC_2415.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 224px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SieBuYm5ZEI/AAAAAAAAMsE/x6SfJHARRvo/s400/DSC_2415.JPG" alt="" id="BLOGGER_PHOTO_ID_5343382116777944130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;and of course: &lt;span style="font-weight: bold;"&gt;Gosling's T-Shirt Tossing&lt;/span&gt;!!!&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SieDQuBsA3I/AAAAAAAAMs8/vWmVci-0kU4/s1600-h/DSC_2487.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 235px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SieDQuBsA3I/AAAAAAAAMs8/vWmVci-0kU4/s400/DSC_2487.JPG" alt="" id="BLOGGER_PHOTO_ID_5343383806154638194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;=== Technical Sessions Highlights ===&lt;/span&gt;&lt;br /&gt;As it got already very late and I am still writing about yesterday!, more take aways from the technical sessions will follow (as CTP internal Knowledge Shares or in form of upcoming blog posts):&lt;br /&gt;Interesting sessions were EJB 3.1, Servlet 3.0, Java EE 6 and GlassFish v3, Spring 3.0, JSF 2.0 and others...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SieEYUTjSCI/AAAAAAAAMtU/IpKAe27mJBE/s1600-h/DSC_2510.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SieEYUTjSCI/AAAAAAAAMtU/IpKAe27mJBE/s400/DSC_2510.JPG" alt="" id="BLOGGER_PHOTO_ID_5343385036200822818" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;=== BOFs ===&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The most exciting BOF was of course the one of &lt;a href="http://javaposse.com/"&gt;JavaPosse&lt;/a&gt; !&lt;br /&gt;Download the mp3 and listen yourself what happened!! :&lt;br /&gt;&lt;a href="http://media.libsyn.com/media/dickwall/JavaPosse256.mp3"&gt;Episode 0x100 (#256)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As last year, the beer got sponsored by &lt;a href="http://www.atlassian.com/"&gt;Atlassian&lt;/a&gt; and started with some polls from the audience. After that, they talked about topics and news they picked up during the first day...&lt;br /&gt;After the show we joined them for some drinks at the &lt;a href="http://www.kateobriens.com/"&gt;Kate O'Briens&lt;/a&gt; pub near Moscone. I could finally tell &lt;a href="http://joeracer.blogspot.com/"&gt;Joe&lt;/a&gt; to accept my friend request on Xbox360 in order to see his hotlaps in &lt;a href="http://forzamotorsport.net/en-us/forzamotorsport2/default.htm"&gt;Forza2&lt;/a&gt; (he is actually a real race driver, watch &lt;a href="http://www.youtube.com/watch?v=nvt7n7mX8Uc"&gt;this video&lt;/a&gt; if you don't believe me) and &lt;a href="http://www.quinn.org/"&gt;Carl&lt;/a&gt; told us some more details about his brand new &lt;a href="http://picasaweb.google.com/carl.quinn/TeslaTestDrive"&gt;Tesla&lt;/a&gt; (100% electric car)... A great moment in life indeed to finally get to know these dudes! :-) I could not talk much with Dick Wall unfortunately... One more reason to go again to JavaOne! ;-) At least one important thing I could tell him: Talk more about Enterprise stuff!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieFMFvl3qI/AAAAAAAAMts/wa2qXOM2mWg/s1600-h/DSC_2580.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieFMFvl3qI/AAAAAAAAMts/wa2qXOM2mWg/s400/DSC_2580.JPG" alt="" id="BLOGGER_PHOTO_ID_5343385925645098658" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SieFQWdetFI/AAAAAAAAMt0/qJS5zSjcmQ8/s1600-h/DSC_2577.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SieFQWdetFI/AAAAAAAAMt0/qJS5zSjcmQ8/s400/DSC_2577.JPG" alt="" id="BLOGGER_PHOTO_ID_5343385998852011090" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SieFTzqFfJI/AAAAAAAAMt8/323eK4aUSpw/s1600-h/DSC_2579.JPG"&gt;&lt;img style="cursor: pointer; width: 267px; height: 400px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SieFTzqFfJI/AAAAAAAAMt8/323eK4aUSpw/s400/DSC_2579.JPG" alt="" id="BLOGGER_PHOTO_ID_5343386058229120146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SieFTzqFfJI/AAAAAAAAMt8/323eK4aUSpw/s1600-h/DSC_2579.JPG"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/SieFWk78eJI/AAAAAAAAMuE/UqDdELFGpsw/s1600-h/DSC_2596.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 227px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/SieFWk78eJI/AAAAAAAAMuE/UqDdELFGpsw/s400/DSC_2596.JPG" alt="" id="BLOGGER_PHOTO_ID_5343386105817102482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;BOF about Lift: &lt;/span&gt;The Best Way to create RIAs with Scala&lt;br /&gt;(by David Pollak, Lead of the Lift Framework)&lt;br /&gt;&lt;br /&gt;to be honest, I can't comment on this content-wise... The way it was presented was cool (I like the humour of David Pollak), it was also interesting to see how he quickly implemented a fully functioning ajax based chat tool from scratch in less than 100 lines of code :-) but I could only take this one with me: Learn Scala first, then lift off with Lift.... ok! -&gt; &lt;a href="http://www.apress.com/book/view/9781430219897"&gt;Scala book&lt;/a&gt; bought!!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieE6HzRVBI/AAAAAAAAMtk/vro-h_I8J2E/s1600-h/DSC_2551.JPG"&gt;&lt;img style="cursor: pointer; width: 296px; height: 400px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SieE6HzRVBI/AAAAAAAAMtk/vro-h_I8J2E/s400/DSC_2551.JPG" alt="" id="BLOGGER_PHOTO_ID_5343385616959755282" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Good night (oh no... in 5 hours the alarm kicks on :-),&lt;br /&gt;Balz&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-5904360856811123263?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/5904360856811123263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=5904360856811123263' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5904360856811123263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5904360856811123263'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-tuesday-day-1.html' title='JavaOne 2009 Summary: Tuesday (Day 1)'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_1_YR6TdF3aY/SieB7COsPhI/AAAAAAAAMsM/SH44oEgRK7U/s72-c/DSC_2449.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-3196376028656254425</id><published>2009-06-02T06:00:00.010+02:00</published><updated>2009-06-05T07:26:59.536+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>JavaOne 2009 Summary: Monday (CommunityOne)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SiTOr-Hb3_I/AAAAAAAAMqA/4ZUo-YZyPBE/s1600-h/DSC_2331.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 215px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SiTOr-Hb3_I/AAAAAAAAMqA/4ZUo-YZyPBE/s400/DSC_2331.JPG" alt="" id="BLOGGER_PHOTO_ID_5342622312772132850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://java.sun.com/javaone/"&gt;JavaOne&lt;/a&gt; has not officially started yet, it's Monday and not Tuesday, it's &lt;a href="http://developers.sun.com/events/communityone/overview.jsp"&gt;CommunityOne&lt;/a&gt; and not &lt;a href="http://java.sun.com/javaone/"&gt;JavaOne&lt;/a&gt;, but the community spirit already caught us and punched us into the geeky experience of  the world's biggest Java conference in the nice Moscone Center in San Francisco... main focus of today's sessions was on &lt;a href="http://www.sun.com/software/products/glassfish_portfolio/"&gt;GlassFish&lt;/a&gt; stuff... &lt;span style="font-weight: bold;"&gt;In a nutshell: Niiice!!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So here is our summary of today's CommunityOne day (after having had some beers at the OpenSolaris &amp;amp; Sun Cloud Party in Hall A):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;=== Sessions&lt;/span&gt; ===&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Sun GlassFish Application Server Portfolio&lt;/span&gt; (by Eduardo Pelegri-Llopart from Sun): Where Sun's Platform Is Going:&lt;br /&gt;not much news for us actually... no infos regarding how Oracle want to proceed with GF&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Running Seam on the GlassFish Application Server&lt;/span&gt; (by &lt;a href="http://www.mojavelinux.com/"&gt;Dan Allen&lt;/a&gt; from Red Hat):&lt;br /&gt;- Seam best works with Hibernate as persistence provider (and looks for it in the classpath). GlassFish v2 comes with Toplink, Glassfish v3 with EclipseLink. Dan Allen from Red Hat made a nice summary of all the tweeks you have to apply in order to make Seam work with GF's default persistence provider.&lt;br /&gt;- Dan further went into differences of JBoss AS and GlassFish AS which also brought some steps to be done if Seam should run on GF.&lt;br /&gt;- But: from a developer perspective, such details are not necessarily required to be known as "seam-gen" supports both application servers out of the box. We asked Dan about support of Oracle WebLogic Application Server and he pointed us to a &lt;a href="http://www.seamframework.org/Documentation/RunningSeamExamplesWithBEAWebLogic"&gt;chapter&lt;/a&gt; in the Seam documentation. As that is not the whole story (as of my current status), we might come up with our additions soon...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiTQcBTXOQI/AAAAAAAAMqg/KeUs2aTll3g/s1600-h/DSC_2325.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 400px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiTQcBTXOQI/AAAAAAAAMqg/KeUs2aTll3g/s400/DSC_2325.JPG" alt="" id="BLOGGER_PHOTO_ID_5342624237772814594" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Lightning Talks!&lt;/span&gt;&lt;br /&gt;This special type of talks runs throughout the day, split in multiple parts of 50 minutes each where every part again contains up to 8 very short speaches... I visited part 3 covering:&lt;br /&gt;- The &lt;a href="https://mural.dev.java.net/"&gt;Mural Project&lt;/a&gt;&lt;br /&gt;- Deep Dive Sneak Peek Sun Learning Services&lt;br /&gt;- &lt;a href="https://atmosphere.dev.java.net/"&gt;Atmosphere&lt;/a&gt; (by JF Arcand!): good to know that Atmosphere is not only useful in containers not supporting Servlet 3.0: it autodetects Servlet 3.0 and still provides a nice abstraction of the rather complex Async API of Servlet 3.0&lt;br /&gt;- &lt;a href="http://www.icefaces.org/main/home/"&gt;Adding AJAX Push&lt;/a&gt; (Ted Goddard from ICEsoft, focusing on ICEfaces of course)&lt;br /&gt;- &lt;a href="http://www.alice.org/"&gt;Alice&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.bluej.org/"&gt;BluJ&lt;/a&gt;&lt;br /&gt;- In a summary: Cool to listen to, nice to get an impression of the topic and good as decision maker whether to go to the full sessions on certain topics not already being enrolled in your schedule... &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Developing RESTful Web Services with J&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;AX-RS and Jersey&lt;/span&gt; (by Marc Hadley and Paul Sandoz from Sun)&lt;br /&gt;- The two spec leads of &lt;a href="http://jcp.org/en/jsr/detail?id=311"&gt;JSR-311&lt;/a&gt; made a quick walkthrough from the architectural style REST to the JSR-311 (JAX-RS) and showed two demos running on the reference implementation &lt;a href="https://jersey.dev.java.net/"&gt;Jersey&lt;/a&gt;.&lt;br /&gt;- One demo showed how JCDI (&lt;a href="http://jcp.org/en/jsr/detail?id=299"&gt;JSR-299&lt;/a&gt;, fka WebBeans), Java Contexts and Dependency Injection works together with Jersey using Google Guice. This was interesting, and in a side remark he recommended to have a look at &lt;a href="http://code.google.com/p/guiceyfruit/"&gt;Guicey Fruit&lt;/a&gt; running on &lt;a href="http://code.google.com/p/google-guice/"&gt;Guice 2.0&lt;/a&gt;. Geeks... but we like it ;-)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;EclipseLink - The Road to JPA 2.0&lt;/span&gt; (by &lt;a href="http://java-persistence.blogspot.com/"&gt;Doug Clarke&lt;/a&gt; from Oracle and Co-Lead of the EclipseLink project):&lt;br /&gt;- no much news for us at this moment&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;=== Pavilion ===&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The &lt;a href="http://java.sun.com/javaone/2009/pavilion/index.jsp"&gt;Pavilion&lt;/a&gt; opened at 3pm. Between the sessions and after 5pm, it was interesting to walk from one booth to the other until 7pm when it closed. &lt;/li&gt;&lt;li&gt;GlassFish, Portals: We talked to &lt;a href="http://blogs.sun.com/kanthi/"&gt;Srikanth Konjarla&lt;/a&gt; (Software Architect of &lt;a href="http://www.sun.com/software/products/webspace/"&gt;Web Space Server&lt;/a&gt;, aka WebSynergy Project having the same codebase as the &lt;a href="http://www.liferay.com/web/guest/products/portal"&gt;Liferay Portal&lt;/a&gt;). He was also not allowed to talk about how Oracle will continue with the GlassFish products like WebSpace Server (Portal) and the GlassFish Application Server... we hope for more details in tomorrow's general session!&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.atlassian.com/"&gt;Atlassian&lt;/a&gt;: We had quite a deep introduction by Douglas Butler (thanks!) into the new versions of Atlassian's products:&lt;br /&gt;- JIRA (&lt;a href="http://www.atlassian.com/software/jira/beta/"&gt;4.0 beta&lt;/a&gt;)&lt;br /&gt;- Confluence (&lt;a href="http://www.atlassian.com/software/confluence/default.jsp"&gt;3.0&lt;/a&gt; released TODAY!!)&lt;br /&gt;- Fisheye together with &lt;a href="http://www.atlassian.com/software/crucible/"&gt;Crucible&lt;/a&gt;&lt;br /&gt;- Bamboo and Clover -- Really nice what we have seen here!&lt;br /&gt;- The new versions generally invested a lot into the visualization of data, hiding complexities by using more wizards but also many things happened from an integration point of view:&lt;br /&gt;- Atlassian released widgets/gadgets to be deployed into any portlet container in order to create nice dashboards etc.&lt;br /&gt;- They will also soon provide RESTful interfaces for all their products to freely integrate them into any other app.... This sounds very cool indeed.&lt;br /&gt;- And the give-away gadgets are nice too ;-) Have a look at their new T-Shirts: If you wear one of those and have it filmed by an Atlassian camera, some things get out of the shirt!! ;-)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiTPwOeoLmI/AAAAAAAAMqY/89oSJtaEbcU/s1600-h/DSC_2349.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 330px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiTPwOeoLmI/AAAAAAAAMqY/89oSJtaEbcU/s400/DSC_2349.JPG" alt="" id="BLOGGER_PHOTO_ID_5342623485395480162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;- And yes, they acquired &lt;a href="http://www.atlassian.com/greenhopper/?s_kwcid=HM_GreenHopper"&gt;GreenHopper&lt;/a&gt; (announced TODAY).&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiTPWynxsDI/AAAAAAAAMqQ/TjQov-Agohk/s1600-h/DSC_2343.JPG"&gt;&lt;img style="cursor: pointer; width: 301px; height: 400px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiTPWynxsDI/AAAAAAAAMqQ/TjQov-Agohk/s400/DSC_2343.JPG" alt="" id="BLOGGER_PHOTO_ID_5342623048420929586" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.livescribe.com/"&gt;Livescribe&lt;/a&gt;: At last year's Java One, Livescribe presented their JavaME based pen and sold 150 pieces right after the general session... I also bought one. I'm happy to see that the company still exists and that they heavily extended their features (e.g. &lt;a href="http://ctpjava.blogspot.com/2009/05/ctp-java-pencast-1.html"&gt;Pencasts&lt;/a&gt;). At their booth today I got a nice little paper blanks (which is not sold in Europe so far).&lt;/li&gt;&lt;li&gt;&lt;a href="http://vaadin.com/home"&gt;Vaadin&lt;/a&gt;: &lt;a href="http://www.itmill.com/"&gt;IT Mill&lt;/a&gt; has released the 6th version of their server driven RIA framework known as IT Mill Tollkit. Together with the release they rebranded it into Vaadin. It is free, open source and looks actually very much like GWT... The demo looked very nice. Certainly worth having a closer look at it! &lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.sun.com/jag/"&gt;James Gosling&lt;/a&gt;: Spotted early at the Pavilion entrance! ;-)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiTRR5Y07dI/AAAAAAAAMq4/fiBX96TNOoI/s1600-h/DSC_2323.JPG"&gt;&lt;img style="cursor: pointer; width: 328px; height: 400px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SiTRR5Y07dI/AAAAAAAAMq4/fiBX96TNOoI/s400/DSC_2323.JPG" alt="" id="BLOGGER_PHOTO_ID_5342625163361185234" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://cloud.sun.com/"&gt;Sun Cloud&lt;/a&gt;: We haven't had the chance to check out the details of Sun Cloud yet but with the rather big party this evening sponsored by Sun Cloud and OpenSolaris we expect a bigger announcement by tomorrow... so stay tuned.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.nuux.net/"&gt;NUUX&lt;/a&gt;: We also met Ben (an Alumni CTP Consultant) at his booth in the Java Utopia corner. Check out his website!!&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.anchorbrewing.com/"&gt;Anchor Steam Beer&lt;/a&gt;: San Francisco's local beer is really worth to be mentioned here as single item ;-) and it tasted great in the OpenSolaris branded glass!&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiTPDx2V-zI/AAAAAAAAMqI/_Jq8cb2qSBw/s1600-h/DSC_2369.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiTPDx2V-zI/AAAAAAAAMqI/_Jq8cb2qSBw/s400/DSC_2369.JPG" alt="" id="BLOGGER_PHOTO_ID_5342622721796078386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;=== Bookstore ===&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Bought today:&lt;br /&gt;- &lt;a href="http://www.apress.com/book/view/9781430219545"&gt;Java EE 6 with GlassFish 3&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.apress.com/book/view/1430224215"&gt;The Definitive Guide to Lift&lt;/a&gt;&lt;/li&gt;&lt;li&gt;More tomorrow ;-) ...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiTQwyipUiI/AAAAAAAAMqw/MDAvI34PdEA/s1600-h/DSC_2364.JPG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 267px;" src="http://3.bp.blogspot.com/_1_YR6TdF3aY/SiTQwyipUiI/AAAAAAAAMqw/MDAvI34PdEA/s400/DSC_2364.JPG" alt="" id="BLOGGER_PHOTO_ID_5342624594587636258" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;=== Tomorrow ===&lt;/span&gt;&lt;br /&gt;Sure, lots of interesting session are registered in our schedule, but:&lt;br /&gt;tomorrow is also the long expected &lt;a href="http://javaposse.com/"&gt;JavaPosse&lt;/a&gt; BOF from 9.30pm to 10.20pm, so don't expect a summary like this after that :-) We will most probably post a 2-day summary on Wednesday evening... ok?&lt;br /&gt;So cu then! And don't forget to follow &lt;a href="http://twitter.com/baszero"&gt;Balz @ Twitter&lt;/a&gt; for live updates!&lt;br /&gt;- Cheers, Balz &amp;amp; Dani.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-3196376028656254425?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/3196376028656254425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=3196376028656254425' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/3196376028656254425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/3196376028656254425'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/06/java-one-2009-summary-monday.html' title='JavaOne 2009 Summary: Monday (CommunityOne)'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_1_YR6TdF3aY/SiTOr-Hb3_I/AAAAAAAAMqA/4ZUo-YZyPBE/s72-c/DSC_2331.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-980030176666898907</id><published>2009-05-29T23:23:00.003+02:00</published><updated>2009-05-29T23:58:33.799+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>JBoss Seam Hot Deploy with Maven - EAR Projects</title><content type='html'>As requested on some comments on my &lt;span style="font-weight:bold;"&gt;previous posts&lt;/span&gt; (&lt;a href="http://ctpjava.blogspot.com/2008/12/using-jboss-seam-hot-deployment-with.html"&gt;initial&lt;/a&gt; post and &lt;a href="http://ctpjava.blogspot.com/2009/03/jboss-seam-hot-deploy-with-maven-update.html"&gt;update&lt;/a&gt;), the &lt;a href="http://code.google.com/p/ctpjava/wiki/MavenSeamHotdeployPluginUsage"&gt;Seam Hotdeploy Maven plugin&lt;/a&gt; now works also with &lt;span style="font-weight:bold;"&gt;EAR projects&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/ctpjava/wiki/SeamHotdeployPluginEARConfiguration"&gt;Some more details&lt;/a&gt; on how to configure your project can be found in our Google Code Wiki. The plugin now defines a &lt;a href="http://www.sonatype.com/books/maven-book/reference/lifecycle-sect-other-packaging.html"&gt;new packaging type&lt;/a&gt; for Seam WAR modules - the only possibility to override the &lt;code&gt;war:war&lt;/code&gt; goal in the package phase.&lt;br /&gt;&lt;br /&gt;If you're interested in how to override the default lifecycle Maven goal, you can check out the &lt;a href="http://code.google.com/p/ctpjava/source/browse/#svn/trunk/projects/maven-hotdeploy-plugin"&gt;plugin source&lt;/a&gt; - something I haven't been able to google easily. Or, maybe wait for a dedicated blog post - stay tuned!&lt;br /&gt;&lt;br /&gt;Something you should definitely checkout with the Hot Deploy plugin is the Maven CLI plugin. See the &lt;a href="http://www.mojavelinux.com/blog/archives/2009/05/a_gamechanging_maven_2_plugin_you_absolutely_must_use"&gt;great post from Dan here&lt;/a&gt;, or the integration in the &lt;a href="http://code.google.com/p/ctpjava/wiki/MavenSeamSamplePOM"&gt;sample POM&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As usual, feedback and contributions are very welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-980030176666898907?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/980030176666898907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=980030176666898907' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/980030176666898907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/980030176666898907'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/05/jboss-seam-hot-deploy-with-maven-ear.html' title='JBoss Seam Hot Deploy with Maven - EAR Projects'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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-3305419975676030648.post-2440332616008042270</id><published>2009-05-15T17:30:00.002+02:00</published><updated>2009-06-05T07:27:15.005+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='daniel'/><category scheme='http://www.blogger.com/atom/ns#' term='conferences'/><title type='text'>CTP @ JavaOne 2009</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sg0yq7bNd7I/AAAAAAAAMoQ/oAyVlMZ_IBI/s1600-h/09J1_Web_Header_800x108.gif"&gt;&lt;img style="cursor: pointer; width: 400px; height: 54px;" src="http://4.bp.blogspot.com/_1_YR6TdF3aY/Sg0yq7bNd7I/AAAAAAAAMoQ/oAyVlMZ_IBI/s400/09J1_Web_Header_800x108.gif" alt="" id="BLOGGER_PHOTO_ID_5335976846591621042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Only three weeks until Java One! Can't believe it's less than one month away!!&lt;br /&gt;So let's have a look at what we think is hot this year. As every year, the conference has a certain umbrella topic where this year's &lt;a href="http://java.sun.com/javaone/"&gt;JavaOne&lt;/a&gt; is certainly in the light of Java EE 6:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JavaEE6: &lt;span style="font-weight: bold;"&gt;JSF 2.0&lt;/span&gt; @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304640&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-4640&lt;/a&gt; (by Ed Burns)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;JavaEE6: &lt;span style="font-weight: bold;"&gt;Servlet 3.0&lt;/span&gt; @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=303790&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-3790&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JavaEE6: &lt;span style="font-weight: bold;"&gt;JPA 2.0&lt;/span&gt; @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=305214&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-5214&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JavaEE6: Contexts &amp;amp; Dependency Injection (&lt;span style="font-weight: bold;"&gt;WebBeans&lt;/span&gt;) @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=306726&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-6726&lt;/a&gt; (by Gavin King)&lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=306726&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JavaEE6: &lt;span style="font-weight: bold;"&gt;EJB3.1&lt;/span&gt; @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304605&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-4605&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JavaEE6: Developing &lt;span style="font-weight: bold;"&gt;JPA&lt;/span&gt; Applications with NetBeans and &lt;span style="font-weight: bold;"&gt;EclipseLink &lt;/span&gt;@ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=305018&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-5018&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JavaEE6: JAX-RS (&lt;span style="font-weight: bold;"&gt;REST&lt;/span&gt;) @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304878&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;BOF-4878&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;JavaEE6: &lt;span style="font-weight: bold;"&gt;Glassfish v3&lt;/span&gt; (JavaEE6 Reference Implementation) @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304923&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-4923&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JavaEE6: &lt;span style="font-weight: bold;"&gt;JCA&lt;/span&gt; 1.6 @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304733&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-4733&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JBoss &lt;span style="font-weight: bold;"&gt;Seam&lt;/span&gt;: Conversations and Page Flows on the JSF Platform @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=305045&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-5045&lt;/a&gt; (by Seam in Action author Dan Allen)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Java Posse&lt;/span&gt; BOF @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304418&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;BOF-4418&lt;/a&gt; with Dick Wall (he likes the Groovy! :-), Joe Nuxoll and Carl Quinn, why is Tor Norbye not listed? Probably still digesting Snoracle!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Google App Engine&lt;/span&gt; @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=303817&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-3817&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Building JavaEE based Web Apps with &lt;span style="font-weight: bold;"&gt;Google Open-Source Technology&lt;/span&gt; @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304062&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-4062&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Effective Java&lt;/span&gt;: Still effective after all these years @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=305217&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-5127&lt;/a&gt; (by Joshua Bloch!)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Defective Java Code&lt;/span&gt;: Mistakes that matter @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=305335&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-5335&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Metro &lt;/span&gt;Web Services Security @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304402&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-4402&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Enterprise Integration Patterns&lt;/span&gt; in Practice @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=304839&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-4839&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SOA &lt;/span&gt;at Enterprise Scale @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=305123&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-5123&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Spring 3.0&lt;/span&gt; @ &lt;a href="http://www28.cplan.com/cc230/session_details.jsp?isid=305225&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;TS-5225&lt;/a&gt; (by Rod Johnson)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Of course there are much much more topics addressed like Scala, JavaFX, Java Mobile including Bluray Disc Java, lots of sessions about Cloud Computing, GWT, Groovy, OSGi and many more...&lt;br /&gt;&lt;br /&gt;Interesting sessions at the &lt;a href="http://developers.sun.com/events/communityone/2009/west/index.jsp"&gt;CommunityOne West Conference&lt;/a&gt; (starting 1 day before JavaOne):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Oracle &lt;span style="font-weight: bold;"&gt;EclipseLink&lt;/span&gt;: &lt;a href="https://www28.cplan.com/cc239/session_details.jsp?isid=308133&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;S308133&lt;/a&gt;&lt;/li&gt;&lt;li&gt;SUN &lt;span style="font-weight: bold;"&gt;Glassfish Portfolio&lt;/span&gt;: Where is it going?: &lt;a href="https://www28.cplan.com/cc239/session_details.jsp?isid=307894&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;S307894&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Architecting robust Applications for &lt;span style="font-weight: bold;"&gt;Amazon EC2&lt;/span&gt;: &lt;a href="https://www28.cplan.com/cc239/session_details.jsp?isid=307166&amp;amp;ilocation_id=230-1&amp;amp;ilanguage=english"&gt;S304314&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;How to get updates:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Follow Balz live from JavaOne via his &lt;a href="http://twitter.com/baszero"&gt;Twitter account&lt;/a&gt; (also see widget at the end of this post)&lt;/li&gt;&lt;li&gt;Follow other twitworks: &lt;a href="http://twitter.com/diyincite"&gt;Kevin Farnham&lt;/a&gt; or the &lt;a href="http://twitter.com/JavaOneConf"&gt;JavaOne official twitwork&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Java.net will produce again lots of Podcasts (not Pencasts!):&lt;br /&gt;The &lt;a href="https://java-net.dev.java.net/podcast_schedule.html"&gt;Schedule&lt;/a&gt; has been published already.&lt;a href="https://java-net.dev.java.net/podcast_schedule.html"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;And: Check this blog after JavaOne for a summary!&lt;/li&gt;&lt;/ul&gt;Cheers!&lt;br /&gt;&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" id="TwitterWidget" width="290" align="middle" height="350"&gt;&lt;br /&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;br /&gt;&lt;param name="allowFullScreen" value="false"&gt;&lt;br /&gt;&lt;param name="movie" value="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf"&gt;&lt;br /&gt;&lt;param name="quality" value="high"&gt;&lt;br /&gt;&lt;param name="bgcolor" value="#000000"&gt;&lt;br /&gt;&lt;param name="FlashVars" value="userID=14696299&amp;amp;styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml"&gt;&lt;br /&gt;&lt;embed src="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" quality="high" bgcolor="#000000" name="TwitterWidget" allowscriptaccess="sameDomain" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="userID=14696299&amp;amp;styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml" width="290" align="middle" height="350"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2440332616008042270?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2440332616008042270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2440332616008042270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2440332616008042270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2440332616008042270'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/05/ctp-java-one-2009.html' title='CTP @ JavaOne 2009'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_1_YR6TdF3aY/Sg0yq7bNd7I/AAAAAAAAMoQ/oAyVlMZ_IBI/s72-c/09J1_Web_Header_800x108.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-7411253635026382383</id><published>2009-05-08T14:03:00.006+02:00</published><updated>2009-05-14T18:32:12.623+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='pencast'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>CTP Java Pencast #1</title><content type='html'>Welcome to the first &lt;span style="font-weight: bold;"&gt;pencast&lt;/span&gt;!&lt;br /&gt;Switch on audio to fully enjoy the show!&lt;br /&gt;Be aware that this has been recorded in one single shot and without any post-processing...&lt;br /&gt;&lt;br /&gt;&lt;object width="228" height="316"&gt;&lt;param name="movie" value="http://www.livescribe.com/media/swf/embedPlayer.swf"&gt;&lt;param name="FlashVars" value="path=http%3A//www.livescribe.com/cgi-bin/WebObjects/LDApp.woa/wa/flashXML%3Fxml%3D0000C0A80116000009C56EE00000011FBA1D9D74834D2D31&amp;amp;embedversion=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.livescribe.com/media/swf/embedPlayer.swf?path=http%3A//www.livescribe.com/cgi-bin/WebObjects/LDApp.woa/wa/flashXML%3Fxml%3D0000C0A80116000009C56EE00000011FBA1D9D74834D2D31&amp;amp;embedversion=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="228" height="316"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Shownotes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JavaME enabled pen by &lt;a href="http://www.livescribe.com/"&gt;Livescribe&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Customer Technology Stack: JSF 1.2, JBoss Seam 2.1 (with jBPM), Hibernate 3, WebLogic Server 10.3 or JBoss Application Server 5&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javaee/technologies/javaee5.jsp"&gt;Java EE5&lt;/a&gt; : JSF 1.2, EJB 3.0, JPA 1.0, Glassfish v2&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://jcp.org/en/jsr/detail?id=316"&gt;Java EE6&lt;/a&gt; : JSF 2.0, EJB 3.1, JPA 2.0, Glassfish v3&lt;a href="http://jcp.org/en/jsr/detail?id=316"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;So come back to visit us for checking details on the discussed web technology stacks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-7411253635026382383?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/7411253635026382383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=7411253635026382383' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/7411253635026382383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/7411253635026382383'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/05/ctp-java-pencast-1.html' title='CTP Java Pencast #1'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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-3305419975676030648.post-2622551885476406766</id><published>2009-04-20T17:05:00.003+02:00</published><updated>2009-05-14T18:25:32.318+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='portal'/><title type='text'>Portal Update March / April 2009</title><content type='html'>Winter has turned into Spring, at least here in Switzerland... and in parallel to the brighter days, let's bring some light into the Java Portal area as well: What products are interesting these days and which should be followed for sure in 2009?&lt;br /&gt;&lt;br /&gt;From the commercial side, major players are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/products/middleware/user-interaction/weblogic-portal.html"&gt;Oracle WebLogic Portal 10.3&lt;/a&gt;:&lt;br /&gt;formerly known as BEA WebLogic Portal&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/products/middleware/user-interaction/webcenter-suite.html"&gt;Oracle WebCenter Suite 11g TP4&lt;/a&gt;:&lt;br /&gt;WebCenter Suite also includes the formerly known product AquaLogic Interaction by BEA, now called WCI, &lt;a href="http://www.oracle.com/products/middleware/user-interaction/webcenter-interaction.html"&gt;WebCenter Interaction&lt;/a&gt;. Longterm, WLP will probably fully converge with WebCenter Suite where nowadays integration happens via the &lt;a href="http://www.oracle.com/products/middleware/user-interaction/webcenter-services.html"&gt;WebCenter Services&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www-01.ibm.com/software/websphere/portal/"&gt;IBM WebSphere Portal&lt;/a&gt; 6.1&lt;/li&gt;&lt;/ul&gt;Open Source portals that have the most promising potential at the moment are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.liferay.com/web/guest/products/portal"&gt;Liferay Portal&lt;/a&gt; 5.2:&lt;br /&gt;back in August 2008, SUN and Liferay announced their partnership to work jointly on the next portal generation and presented &lt;a href="http://3.bp.blogspot.com/_1_YR6TdF3aY/SLVxXHgvdzI/AAAAAAAAGXU/nd6-ihjjPhM/s1600-h/websynergy-release-2.png"&gt;their roadmap&lt;/a&gt;, Liferay keeping their Liferay Portal and SUN continuing their WebSynergy project).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;SUN's brand new &lt;a href="https://webspace.dev.java.net/"&gt;Web Space Server&lt;/a&gt;:&lt;br /&gt;Since February 2009, SUN has released Web Space Server version 10 which is including all the efforts from the internal &lt;a href="https://portal.dev.java.net/"&gt;Project WebSynergy&lt;/a&gt;. WebSpace Server is not only a portal product, it is a full fletched portal platform and has been integrated into the &lt;a href="http://www.sun.com/software/products/glassfish_portfolio/"&gt;Glassfish Portfolio&lt;/a&gt;.&lt;br /&gt;For more info, read their first &lt;a href="http://docs.sun.com/app/docs/coll/1863.3"&gt;documentations.&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.jboss.org/jbossportal/"&gt;JBoss Portal&lt;/a&gt; 2.7.2:&lt;br /&gt;- On March 12th, JBoss has released the latest version of its portal product and is available for &lt;a href="http://www.jboss.org/jbossportal/download/index.html"&gt;download&lt;/a&gt;.&lt;br /&gt;- On Apr 3rd, JBoss released the JSR-301 compliant &lt;a href="http://blog.jboss-portal.org/2009/04/jboss-portlet-bridge-cr1-released.html"&gt;Portlet Bridge CR1&lt;/a&gt;. Currently the bridge supports any combination of JSF, Seam, and RichFaces to run inside a portlet.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.exoplatform.com/portal/public/en/product/portal/overview"&gt;eXo Portal&lt;/a&gt; 2.5.1&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://portals.apache.org/jetspeed-2/"&gt;Jetspeed 2&lt;/a&gt;: no updates since version 2.1.3 from December 2007.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;From a portal technology point of view, it is interesting to see the product's maturity with regards to the following standards:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://jcp.org/en/jsr/detail?id=168"&gt;JSR-168&lt;/a&gt; - Portlet Specification (final since Oct 2003)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://jcp.org/en/jsr/detail?id=286"&gt;JSR-286 - Portlet Specification 2.0&lt;/a&gt; (final since June 2008)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oasis-open.org/committees/download.php/3343/oasis-200304-wsrp-specification-1.0.pdf"&gt;WSRP 1.0&lt;/a&gt; - The first specification of &lt;span style="font-weight: bold;"&gt;W&lt;/span&gt;eb &lt;span style="font-weight: bold;"&gt;S&lt;/span&gt;ervices for &lt;span style="font-weight: bold;"&gt;R&lt;/span&gt;emote &lt;span style="font-weight: bold;"&gt;P&lt;/span&gt;ortlets (final since August 2003)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.oasis-open.org/wsrp/v2/wsrp-2.0-spec.html"&gt;WSRP 2.0&lt;/a&gt; (final since April 2008)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://jcp.org/en/jsr/detail?id=301"&gt;JSR-301&lt;/a&gt;: Portlet 1.0 (JSR-168) Bridge Specification for JSF 1.x:&lt;br /&gt;Current Status: proposed final draft in Jan 2009&lt;br /&gt;Currently available implementations of JSR-301:&lt;br /&gt;- &lt;a href="http://myfaces.apache.org/portlet-bridge/index.html"&gt;MyFaces Portlet Bridge&lt;/a&gt;&lt;br /&gt;- &lt;a href="https://jsfportletbridge.dev.java.net/"&gt;OpenPortal Portlet Bridge&lt;/a&gt; (used in Liferay Portal)&lt;br /&gt;- &lt;a href="http://www.jboss.org/portletbridge/"&gt;JBoss Portlet Bridge&lt;/a&gt; (used by JBoss Portal)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://jcp.org/en/jsr/detail?id=329"&gt;JSR-329&lt;/a&gt;: Portlet 2.0 (JSR-286) Bridge Specification for JSF 1.2:&lt;br /&gt;too early for products to support this JSR as it has been created in January 2009 and is in the status "Early Draft Review" as of March 2009.&lt;br /&gt;Note that this specification is led by Oracle exclusively at the moment.&lt;/li&gt;&lt;li&gt;&lt;a href="http://jcp.org/en/jsr/detail?id=314"&gt;JSR-314&lt;/a&gt;: JSF 2.0:&lt;br /&gt;The support of JSF 2.0 in a portlet container is not yet officially addressed. There is no JSR around like "Portlet 2.0 Bridge for JSF 2.0".&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://baszeroforza2.googlepages.com/portal_matrix.jpg" target="_blank"&gt;&lt;img width="600px" src="http://baszeroforza2.googlepages.com/portal_matrix.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Besides the Portal related activities, let's have a look on Java related &lt;span style="font-weight: bold;"&gt;quick news&lt;/span&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SUN &lt;/span&gt;has announced that &lt;span style="font-weight: bold;"&gt;Glassfish v3&lt;/span&gt; Milestone 2 will be ready by Java One 2009 in June.&lt;br /&gt;For the complete schedule, click on this &lt;a href="http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV3Schedule"&gt;link&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Liferay &lt;/span&gt;5.2 is now fully supporting WSRP 2.0 with the release of the &lt;a href="http://blogs.sun.com/portal/entry/wsrp_2_0_fcs_binary"&gt;WSRP 2.0 FCS binary&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Oracle &amp;amp; SUN&lt;/span&gt;: &lt;a href="http://www.oracle.com/sun/index.html"&gt;Oracle buys SUN&lt;/a&gt; as of the announcement on April 20th 2009.&lt;br /&gt;It will be very interesting what will happen to SUN's products like&lt;br /&gt;- The whole &lt;a href="http://www.sun.com/software/products/glassfish_portfolio/"&gt;Glassfish Portfolio&lt;/a&gt;&lt;br /&gt;- MySQL&lt;br /&gt;- Netbeans&lt;br /&gt;- OpenSolaris and&lt;br /&gt;- JavaFX&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Java EE 6&lt;/span&gt;: The &lt;a href="http://jcp.org/en/jsr/detail?id=316"&gt;JSR-316&lt;/a&gt; has passed the Public Review state. See its &lt;a href="http://jcp.org/en/jsr/results?id=4821"&gt;results&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2622551885476406766?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2622551885476406766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2622551885476406766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2622551885476406766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2622551885476406766'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/04/portal-update-march-april-2009.html' title='Portal Update March / April 2009'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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-3305419975676030648.post-4204755501616607813</id><published>2009-04-17T21:08:00.003+02:00</published><updated>2009-05-14T18:27:55.334+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='people'/><category scheme='http://www.blogger.com/atom/ns#' term='domenico'/><title type='text'>Java People Spotlight: Domenico Crescenti</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_1_YR6TdF3aY/SeSePVp51SI/AAAAAAAAL64/w5MF6aOlt3c/s1600-h/dc.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 150px; height: 200px;" src="http://1.bp.blogspot.com/_1_YR6TdF3aY/SeSePVp51SI/AAAAAAAAL64/w5MF6aOlt3c/s400/dc.jpg" alt="" id="BLOGGER_PHOTO_ID_5324554645806896418" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;In this edition of the "CTP People Spotlight" series we introduce Domenico, one of the CTP competences for content related topics.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Java Competence Role&lt;/b&gt;:&lt;br /&gt;Messica (insider)&lt;b&gt;&lt;br /&gt;My Master Kung-Fu Skills&lt;/b&gt;:&lt;br /&gt;They call me Mr. Bean&lt;br /&gt;&lt;b&gt;I'd be excited to get my hands dirty on&lt;/b&gt;:&lt;br /&gt;JCR 2.0 (&lt;a href="http://jcp.org/en/jsr/detail?id=283"&gt;JSR-283&lt;/a&gt;)&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Q&amp;amp;A&lt;/span&gt;   &lt;p&gt; &lt;/p&gt;      &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Hi Domenico, how would your message look like if you would have to tell it via Twitter what you are currently doing?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span style="color:#000000;"&gt;I'm buying some insecticide to feed the bug in my code :)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What was the greatest piece of code you have ever written so far?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;That was definitely the play fair chiffre&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have ever heard about programming?&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;A: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;"Cool!!! You didn't mess up my code"&lt;/span&gt;&lt;/p&gt;&lt;span&gt;&lt;/span&gt;&lt;p&gt; &lt;/p&gt;    &lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have heard from our managers?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;"........."&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;    &lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the most cutting-edge technology or framework you actually used on projects?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;a href="http://www.vamosa.com/"&gt;Vamosa&lt;/a&gt;!&lt;br /&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is your favorite podcast?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;Discovery Channel &lt;a href="http://dsc.discovery.com/convergence/podcasts/podcasts.html"&gt;Video Podcast&lt;/a&gt; – the US original of course – and the &lt;a href="http://javaposse.com/"&gt;Java Posse&lt;/a&gt; Podcast&lt;br /&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Which Java book can you recommend and for what reason?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span&gt;&lt;a href="http://www.amazon.de/Stefan-Loose-Travel-Handb%C3%BCcher-Java/dp/3770161092/ref=sr_1_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1233755586&amp;amp;sr=8-2"&gt;Java (Taschenbuch)&lt;/a&gt; &lt;/span&gt;&lt;span&gt;by far the best Java book I’ve ever read.&lt;/span&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-4204755501616607813?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/4204755501616607813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=4204755501616607813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/4204755501616607813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/4204755501616607813'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/04/java-people-spotlight-domenico.html' title='Java People Spotlight: Domenico Crescenti'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_1_YR6TdF3aY/SeSePVp51SI/AAAAAAAAL64/w5MF6aOlt3c/s72-c/dc.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-5951379343930469075</id><published>2009-04-16T19:33:00.008+02:00</published><updated>2009-07-15T16:08:50.174+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><category scheme='http://www.blogger.com/atom/ns#' term='appengine'/><title type='text'>JBoss Seam on Google App Engine - First Steps</title><content type='html'>&lt;span style="font-weight: bold;"&gt;[UPDATE]&lt;/span&gt; The &lt;a href="https://javaserverfaces.dev.java.net/nonav/rlnotes/1.2_13/changelog.html"&gt;latest Morjarra release&lt;/a&gt; 1.2_13 as well as the &lt;a href="http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes"&gt;latest Appengine SDK&lt;/a&gt; 1.2.2 seem to fix a couple of problems described below. My task backlog is actually growing :-) but I hope I find some time to look again how things work with these new versions.&lt;br /&gt;&lt;br /&gt;I spent the last three weeks in a repetition course of the &lt;a href="http://www.armee.ch/"&gt;Swiss army&lt;/a&gt; - far away from any Java code. Naturally my fingers started to itch while reading the announcement of Google that their &lt;a href="http://code.google.com/appengine/"&gt;App Engine&lt;/a&gt; now supports Java! So I grabbed my MacBook to enjoy the sun, Java coding and Eastern holidays.&lt;br /&gt;&lt;br /&gt;As I usually write web applications with &lt;a href="http://www.seamframework.org/"&gt;JBoss Seam&lt;/a&gt;, I decided to give the framework a try in the Google cloud - preparing for a bumpy road as Seam founds on standards which are mostly listed as either &lt;a href="http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine"&gt;not or not known to be working&lt;/a&gt;. The following article describes the (bad) tweaks I had to do to get something basic running - I guess if you start doing serious development, you might hit more walls.&lt;br /&gt;&lt;br /&gt;First, install the &lt;a href="http://code.google.com/appengine/docs/java/tools/eclipse.html"&gt;Eclipse Plugin for App Engine&lt;/a&gt; and create a new project. I'll base my descriptions on this initial setup. Switch on sessions in &lt;code&gt;appengine-web.xml&lt;/code&gt;:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;sessions-enabled&amp;gt;true&amp;lt;/sessions-enabled&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Setting up JSF 1.2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the &lt;a href="https://javaserverfaces.dev.java.net/"&gt;latest Mojarra 1.2&lt;/a&gt; release [1.2_12] and put it in the &lt;code&gt;WEB-INF/lib&lt;/code&gt; directory. You can configure the Faces servlet in web.xml as usual&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;servlet&amp;gt;&lt;br /&gt;   &amp;lt;servlet-name&amp;gt;Faces Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;   &amp;lt;servlet-class&amp;gt;javax.faces.webapp.FacesServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;   &amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&amp;lt;/servlet&amp;gt;&lt;br /&gt;&amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;   &amp;lt;servlet-name&amp;gt;Faces Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;   &amp;lt;url-pattern&amp;gt;*.seam&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;/pre&gt;&lt;br /&gt;Starting Jetty with only this will fail due to some incompatibilities of Jetty and Mojarra. As with Seam we will need JBoss EL anyway, we can configure Mojarra to use the JBoss EL &lt;code&gt;ExpressionFactory&lt;/code&gt;. Add the JBoss EL JAR to &lt;code&gt;WEB-INF/lib&lt;/code&gt; and the following XML to your &lt;code&gt;web.xml&lt;/code&gt;:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;   &amp;lt;param-name&amp;gt;com.sun.faces.expressionFactory&amp;lt;/param-name&amp;gt;&lt;br /&gt;   &amp;lt;param-value&amp;gt;org.jboss.el.ExpressionFactoryImpl&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;/pre&gt;&lt;br /&gt;Now it's already patch time. Jetty in the Google environment seems to have a bug in its Servlet API implementation, missing the &lt;code&gt;ServletContext.getContextPath()&lt;/code&gt; method (new in version 2.5). Also, Mojarra tries to be clever about initialization work and uses Threads in the &lt;code&gt;ConfigManager&lt;/code&gt; - the App Engine &lt;code&gt;SecurityManager&lt;/code&gt; will let the whole thing blow up. Something similar happens in the JBoss &lt;a href="http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jboss-el/trunk/src/org/jboss/el/util/ReferenceCache.java?view=markup&amp;amp;pathrev=39"&gt;&lt;code&gt;ReferenceCache&lt;/code&gt;&lt;/a&gt; class. All patched classes can be found &lt;a href="http://code.google.com/p/ctpjava/source/browse/#svn/trunk/projects/google-appengine/patches"&gt;here&lt;/a&gt;. Drop the Java code in your source folder, Jettys classloader will pick it up.&lt;br /&gt;&lt;br /&gt;This will at least make the whole thing start up. I also added &lt;a href="https://facelets.dev.java.net/"&gt;facelets&lt;/a&gt; (JAR file, view handler in &lt;code&gt;faces-config.xml&lt;/code&gt; and view suffix in &lt;code&gt;web.xml&lt;/code&gt;).&lt;br /&gt;&lt;br /&gt;Unfortunately, using &lt;a href="http://www.jboss.org/jbossrichfaces/"&gt;RichFaces&lt;/a&gt; components is an absolute no go on App Engine. RichFaces is full of references to AWT or JAI classes, which Google blocks completely. If anybody wants to try ICEFaces - good luck!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Adding Seam&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now it's time to add all the Seam stuff. Quite a couple of JARs to put into the application. I basically used Seam 2.1.1.GA and libraries from JBoss 4.2.3.GA. The complete list of what should go into &lt;code&gt;WEB-INF/lib&lt;/code&gt; is shown in the screenshot below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5QjC-pWNxgk/Sedy-WpmCvI/AAAAAAAAAms/-A8BH4o2MVI/s1600-h/seam-jars.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 231px; height: 327px;" src="http://1.bp.blogspot.com/_5QjC-pWNxgk/Sedy-WpmCvI/AAAAAAAAAms/-A8BH4o2MVI/s400/seam-jars.jpg" alt="" id="BLOGGER_PHOTO_ID_5325351499946396402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;JTA is not even on the list of APIs Google gives a recommendation, so let's fall back on Java SE behavior. Configure &lt;code&gt;components.xml&lt;/code&gt; with:&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;transaction:entity-transaction entity-manager="#{entityManager}"/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Although we cannot use Hibernate as persistence provider, Seam has a couple of dependencies to it (e.g. when using Hibernate Validators). As soon as we have it in the classpath, Seam activates its &lt;code&gt;HibernatePersistenceProvider&lt;/code&gt; component. This will behave pretty bad, and for simplicity we just override this component:&lt;br /&gt;&lt;pre name="code" class="java"&gt;@Name("org.jboss.seam.persistence.persistenceProvider")&lt;br /&gt;@Scope(ScopeType.STATELESS)&lt;br /&gt;@BypassInterceptors&lt;br /&gt;@Install(precedence = Install.APPLICATION,&lt;br /&gt;      classDependencies={"org.hibernate.Session", "javax.persistence.EntityManager"})&lt;br /&gt;public class OverrideHibernatePersistenceProvider extends PersistenceProvider {&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Now also add a persistence provider as described in the &lt;a href="http://code.google.com/appengine/docs/java/datastore/usingjpa.html"&gt;Google docs&lt;/a&gt; and disable DataNucleus checking for multiple &lt;code&gt;PersistenceContextFactory&lt;/code&gt; instantiations with this property in &lt;code&gt;appengine-web.xml&lt;/code&gt;.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;property name="appengine.orm.disable.duplicate.emf.exception" value="true"/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As before, also Seam needs a couple of patches. Main reasons for those are references to &lt;code&gt;javax.naming.NamingException&lt;/code&gt; (which is not white listed, credits to &lt;a href="http://groups.google.com/group/google-appengine-java/browse_thread/thread/57dd0d6e02f72ed4"&gt;Toby for the hint&lt;/a&gt;) and session/conversation components not implementing &lt;code&gt;Serializable&lt;/code&gt; correctly. The last point is probably something not hitting Seam or your application the last time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Identity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As a next step I tried to add some users to the application. Seam's Identity module builds around the &lt;code&gt;javax.security.auth.Subject&lt;/code&gt; and &lt;code&gt;Principal&lt;/code&gt; classes. Even though those classes are &lt;a href="http://code.google.com/appengine/docs/java/jrewhitelist.html"&gt;white listed&lt;/a&gt;, the &lt;code&gt;SecurityManager&lt;/code&gt; blocks any attempt to add a Principal to a Subject. Well, how useful is that... As a quick fallback I integrated the &lt;a href="http://code.google.com/appengine/docs/java/users/"&gt;Google Accounts API&lt;/a&gt;:&lt;br /&gt;&lt;pre name="code" class="java"&gt;@Name("org.jboss.seam.security.identity")&lt;br /&gt;@Scope(SESSION)&lt;br /&gt;@Install(precedence = Install.APPLICATION)&lt;br /&gt;@BypassInterceptors&lt;br /&gt;@Startup&lt;br /&gt;public class AppEngineIdentity extends Identity {&lt;br /&gt;&lt;br /&gt;  private static final long serialVersionUID = -9111123179634646677L;&lt;br /&gt;&lt;br /&gt;  public static final String ROLE_USER = "user";&lt;br /&gt;  public static final String ROLE_ADMIN = "admin";&lt;br /&gt;&lt;br /&gt;  private transient UserService userService;&lt;br /&gt;&lt;br /&gt;  @Create&lt;br /&gt;  @Override&lt;br /&gt;  public void create() {      &lt;br /&gt;      userService = UserServiceFactory.getUserService();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public boolean isLoggedIn() {&lt;br /&gt;      return getUserService().isUserLoggedIn();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public Principal getPrincipal() {&lt;br /&gt;      if (isLoggedIn())&lt;br /&gt;          return new SimplePrincipal(getUserService().getCurrentUser().getNickname());&lt;br /&gt;      return null;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public void checkRole(String role) {&lt;br /&gt;      if (!isLoggedIn())&lt;br /&gt;          throw new NotLoggedInException();&lt;br /&gt;      if ((ROLE_ADMIN.equals(role) &amp;amp;&amp;amp; !getUserService().isUserAdmin()) || !ROLE_USER.equals(role))&lt;br /&gt;          throw new AuthorizationException(String.format(&lt;br /&gt;                  "Authorization check failed for role [%s]", role));&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public boolean hasRole(String role) {&lt;br /&gt;      if (!isLoggedIn())&lt;br /&gt;          return false;&lt;br /&gt;      return ((ROLE_ADMIN.equals(role) &amp;amp;&amp;amp; getUserService().isUserAdmin()) || ROLE_USER.equals(role));&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public String getUsername() {&lt;br /&gt;      if (isLoggedIn())&lt;br /&gt;          return getUserService().getCurrentUser().getNickname();&lt;br /&gt;      return null;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public String createLoginURL(String destination) {&lt;br /&gt;      return getUserService().createLoginURL(destination);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public String createLogoutURL(String destination) {&lt;br /&gt;      return getUserService().createLogoutURL(destination);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public User getUser() {&lt;br /&gt;      if (isLoggedIn())&lt;br /&gt;          return getUserService().getCurrentUser();&lt;br /&gt;      return null;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  private UserService getUserService() {&lt;br /&gt;      if (userService == null)&lt;br /&gt;          userService = UserServiceFactory.getUserService();&lt;br /&gt;      return userService;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Both &lt;code&gt;create...&lt;/code&gt; methods can be used in the UI for generating login/logout URLs. Destination defines the URL the user gets redirected after successful login/logout. Also make sure that the &lt;code&gt;identity&lt;/code&gt; configuration is removed from &lt;code&gt;components.xml&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Wrap up&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Running this setup should give you a base for a very simple Seam app like in the screenshot below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5QjC-pWNxgk/SedztodqBmI/AAAAAAAAAm0/L2ANkqdzs88/s1600-h/seam-cloud.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 324px;" src="http://2.bp.blogspot.com/_5QjC-pWNxgk/SedztodqBmI/AAAAAAAAAm0/L2ANkqdzs88/s400/seam-cloud.jpg" alt="" id="BLOGGER_PHOTO_ID_5325352312182015586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This first step has not been doing any persistence work, and my first tries with DataNucleus  were not as straight forward as I had expected from a JPA implementation. Hope Google will catch up here with something more mature. Also, even the simple setup required a couple of nasty tweaks on the frameworks. Another big hurdle here are the runtime differences from production to local environment. For some serious work on App Engine, it's so far more recommendable to look into GWT.&lt;br /&gt;&lt;br /&gt;Anyway, if you found this useful - looking forward to hear from your next steps in the cloud.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-5951379343930469075?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/5951379343930469075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=5951379343930469075' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5951379343930469075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/5951379343930469075'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/04/jboss-seam-on-google-app-engine-first.html' title='JBoss Seam on Google App Engine - First Steps'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_5QjC-pWNxgk/Sedy-WpmCvI/AAAAAAAAAms/-A8BH4o2MVI/s72-c/seam-jars.jpg' height='72' width='72'/><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-2769822035943712607</id><published>2009-03-20T13:46:00.009+01:00</published><updated>2009-05-14T18:28:42.358+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>JBoss Seam Hot Deploy with Maven - Update</title><content type='html'>I just published an updated version of the &lt;span style="font-weight:bold;"&gt;Seam Hotdeploy Maven Plugin&lt;/span&gt; (see my &lt;a href="http://ctpjava.blogspot.com/2008/12/using-jboss-seam-hot-deployment-with.html"&gt;previous post here&lt;/a&gt;). For a detailed description on how to use it, have a look at the &lt;a href="http://code.google.com/p/ctpjava/wiki/MavenSeamHotdeployPluginUsage"&gt;Google Code Wiki&lt;/a&gt;. I also updated the &lt;a href="http://code.google.com/p/ctpjava/wiki/MavenSeamSamplePOM"&gt;sample Maven POM&lt;/a&gt; featuring &lt;a href="http://docs.jboss.com/seam/2.1.1.GA/reference/en-US/html/"&gt;JBoss Seam 2.1.1.GA&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The new version should be &lt;span style="font-weight:bold;"&gt;easier to configure&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;play nicer&lt;/span&gt; with e.g. the &lt;a href="http://m2eclipse.codehaus.org/"&gt;Eclipse Maven plugin&lt;/a&gt; (I'm not using NetBeans/IntelliJ too often, but I hope this works also fine there). The new Eclipse builder configuration looks like shown in the image below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5QjC-pWNxgk/ScOSXWDZVaI/AAAAAAAAAmM/uG7U47aI8-4/s1600-h/eclipse_builder_config.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 329px; height: 400px;" src="http://4.bp.blogspot.com/_5QjC-pWNxgk/ScOSXWDZVaI/AAAAAAAAAmM/uG7U47aI8-4/s400/eclipse_builder_config.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5315252914981787042" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; The Eclipse Maven plugin using its embedded Maven had somehow problems with the extended lifecycle of the Hotdeploy Plugin. Using an external Maven installation (2.0.10) felt not only faster but was also not having problems with it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-2769822035943712607?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/2769822035943712607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=2769822035943712607' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2769822035943712607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/2769822035943712607'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/03/jboss-seam-hot-deploy-with-maven-update.html' title='JBoss Seam Hot Deploy with Maven - Update'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/03406453074932551739</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5QjC-pWNxgk/ScOSXWDZVaI/AAAAAAAAAmM/uG7U47aI8-4/s72-c/eclipse_builder_config.gif' height='72' width='72'/><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-8143852378539494699</id><published>2009-02-13T13:00:00.003+01:00</published><updated>2009-05-14T18:29:02.823+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='people'/><category scheme='http://www.blogger.com/atom/ns#' term='daniel'/><title type='text'>Java People Spotlight: Daniel Käppeli</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1_YR6TdF3aY/SZVqrkSADqI/AAAAAAAALJ0/LDYQWRWiibQ/s1600-h/danik.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 140px; height: 185px;" src="http://2.bp.blogspot.com/_1_YR6TdF3aY/SZVqrkSADqI/AAAAAAAALJ0/LDYQWRWiibQ/s400/danik.jpg" alt="" id="BLOGGER_PHOTO_ID_5302261433004723874" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;The "People Spotlight" series continues with a Java fellow who is at Cambridge Technology Partners since years now: Dani is continuously working in projects that most often deal with  Open Source technology stacks.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Java Competence Role&lt;/b&gt;:&lt;br /&gt;Senior Developer&lt;b&gt;&lt;br /&gt;My Master Kung-Fu Skills&lt;/b&gt;:&lt;br /&gt;... there are so many to choose from ...&lt;br /&gt;&lt;b&gt;I'd be excited to get my hands dirty on&lt;/b&gt;:&lt;br /&gt;Java EE 6 : see how all the bits and pieces fit together&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Q&amp;amp;A&lt;/span&gt;   &lt;p&gt; &lt;/p&gt;      &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Hi Dani, how would your message look like if you would have to tell it via Twitter what you are currently doing?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span&gt;Recovering from a busy week and from yesterday’s dinner.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What was the greatest piece of code you have ever written so far?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;Parsing an XML document in 1 LoC with &lt;a href="http://static.springframework.org/spring-ws/sites/1.5/reference/html/oxm.html"&gt;Spring OXM&lt;/a&gt;. Isn't that cool?&lt;/p&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;@SuppressWarnings("unchecked")&lt;br /&gt;JAXBElement&amp;lt;GpxType&amp;gt; object = (JAXBElement&amp;lt;GpxType&amp;gt;)this.getUnmarshaller().unmarshal(new StreamSource(inputStream));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have ever heard about programming?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;“These performance improvements are quite slow!”, &lt;/span&gt;&lt;span&gt;K. K. 02.09&lt;/span&gt;&lt;p&gt; &lt;/p&gt;    &lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the best quote you have heard from our managers?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;"In the next quarter the hockey stick effect will kick in."&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;    &lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is the most cutting-edge technology or framework you actually used on projects?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;RESTful Web Services with Jersey&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Wow! I actually didn't know that CTP uses that already... so we belong to the very early adopters of &lt;a href="http://jcp.org/en/jsr/detail?id=311"&gt;JSR-311&lt;/a&gt; in customer projects! Nice Dani... when are you doing a Knowledge Share on this? ... Ok let's keep on with this short questionnaire first.&lt;br /&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;What is your favorite podcast?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;Discovery Channel &lt;a href="http://dsc.discovery.com/convergence/podcasts/podcasts.html"&gt;Video Podcast&lt;/a&gt; – the US original of course – and the &lt;a href="http://javaposse.com/"&gt;Java Posse&lt;/a&gt; Podcast&lt;br /&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;&lt;span style="font-weight: bold;"&gt;Q: &lt;/span&gt;Which Java book can you recommend and for what reason?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;&lt;span&gt;&lt;a href="http://www.amazon.de/Effective-Java-Programming-Language-Guide/dp/0321356683/ref=sr_1_1?ie=UTF8&amp;amp;s=books-intl-de&amp;amp;qid=1234528283&amp;amp;sr=8-1"&gt;Joshua Bloch’s Effective Java Second Edition&lt;/a&gt;, by far the best Java book I’ve ever read&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://oreilly.com/catalog/9780596007126/"&gt;&lt;/a&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-8143852378539494699?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/8143852378539494699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=8143852378539494699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8143852378539494699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/8143852378539494699'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/02/java-people-spotlight-daniel-kappeli.html' title='Java People Spotlight: Daniel Käppeli'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_1_YR6TdF3aY/SZVqrkSADqI/AAAAAAAALJ0/LDYQWRWiibQ/s72-c/danik.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3305419975676030648.post-1846725008869694049</id><published>2009-01-30T10:53:00.025+01:00</published><updated>2009-05-14T18:25:32.319+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='balz'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='portal'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Portal Update January 2009</title><content type='html'>After the snowy december we are back with new posts this year and we are looking forward to an interesting year! &lt;span style="font-weight: bold;"&gt;Java EE 6&lt;/span&gt; is the late christmas present for many of us Java aficionados and it is going to be released probably around JavaOne in June...&lt;br /&gt;&lt;br /&gt;In the portal corner, the following was important this month:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SUN: &lt;/span&gt;&lt;span style="font-style: italic;"&gt;no updates&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Liferay:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;- One UI to rule them all: Check out this introduction of a new &lt;a href="http://www.liferay.com/web/jferrer/blog/-/blogs/1791601"&gt;management console&lt;/a&gt; in Liferay Portal. This &lt;/span&gt;&lt;span&gt;portal product is definitely going to be more and more interesting among the free portal products!&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Oracle:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;- &lt;a href="http://www.oracle.com/products/middleware/ofmradio.html"&gt;Oracle Fusion Middleware Radio&lt;/a&gt; has released some talks about portal product roadmaps. No much news if you followed all our portal updates so far ;-). But if you are interested in to listen to them, here they are:&lt;br /&gt;&lt;a href="http://feeds.feedburner.com/%7Er/OracleOfmRadio/%7E3/504645008/7201980_Josh_Lannin_010509.mp3"&gt;Oracle WebLogic Portal&lt;/a&gt; Roadmap (formerly BEA WebLogic Portal)&lt;br /&gt;&lt;a href="http://feeds.feedburner.com/%7Er/OracleOfmRadio/%7E3/504645010/7195543_Ajay_Gandhi_010309.mp3"&gt;Oracle WebCenter Interaction&lt;/a&gt; Roadmap (formerly BEA AquaLogic User Interaction)&lt;br /&gt;&lt;a href="http://feeds.feedburner.com/%7Er/OracleOfmRadio/%7E3/504645009/7201996_Sanjay_Kwatra_010509.mp3"&gt;Oracle Portal&lt;/a&gt;&lt;/span&gt;&lt;span&gt; Roadmap&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;JBoss:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;- Release of JBoss Portal &lt;/span&gt;2.7.1 which is a maintenance release for the 2.7 series that support JSR-286 portlets. The detailed release notes can be &lt;a target="_blank" href="http://sourceforge.net/project/shownotes.php?release_id=655073&amp;amp;group_id=22866"&gt;found here&lt;/a&gt;.&lt;br /&gt;- The JBoss Portlet Bridge has reached Beta 6 and it integrates Seam and RichFaces. Documentation on this Beta release can be found &lt;a href="http://www.jboss.org/files/portletbridge/docs/1.0.0.B6/en/html_single/index.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;span&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/span&gt;Next-Gen Identity API for JBoss Portal&lt;span&gt; is in public review. Check their documentation &lt;a href="http://www.jboss.org/community/docs/DOC-13258"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;eXo:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;- &lt;span style="font-weight: bold;"&gt;eXo Portal 2.5.1&lt;/span&gt;, a maintenance release, is now available and has finalized its support of  Right-To-Left languages like arabic.&lt;/span&gt;&lt;span&gt; See video &lt;a href="http://blog.exoplatform.org/2009/01/18/video-rtl-support-in-exo-portal-251-arabic-sample/"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;- eXo Portal and &lt;a href="http://static.springframework.org/spring-security/site/index.html"&gt;Spring Security&lt;/a&gt;: This is a very nice &lt;a href="http://wiki.exoplatform.com/xwiki/bin/view/Core/String+security+integration"&gt;documentation&lt;/a&gt; released in January about how to integrate Spring Security 2.5.x into eXo Portal.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Other portal and Java related &lt;span style="font-weight: bold;"&gt;quick news&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;Jan-26: &lt;a href="http://blogs.sun.com/theaquarium/entry/jsr_299_webbeans_is_dead"&gt;JSR-299&lt;/a&gt;: &lt;span style="font-weight: bold;"&gt;WebBeans is dead&lt;/span&gt;. Long live Java Contexts and Dependency Injection!&lt;br /&gt;&lt;br /&gt;Jan-23: &lt;a href="http://blogs.sun.com/theaquarium/entry/java_ee_6_public_review"&gt;Java EE 6&lt;/a&gt; has gone Public Review!&lt;br /&gt;- WebBeans  (Gavin King,  &lt;a target="_blank" href="http://jcp.org/en/jsr/detail?id=299"&gt;JSR 299&lt;/a&gt;, &lt;a target="_blank" href="http://blogs.sun.com/theaquarium/tags/webbeans" title="webbeans entries at TheAquarium"&gt;@TA &lt;img src="http://blogs.sun.com/theaquarium/resource/MagnifyingGlass-12_12px.jpg" /&gt;&lt;/a&gt;)&lt;br /&gt;- Bean Validation (Emmanuel Bernard,  &lt;a target="_blank" href="http://jcp.org/en/jsr/detail?id=303"&gt;JSR 303&lt;/a&gt;, &lt;a target="_blank" href="http://blogs.sun.com/theaquarium/tags/beanvalidation" title="beanvalidation entries at TheAquarium"&gt;@TA &lt;img src="http://blogs.sun.com/theaquarium/resource/MagnifyingGlass-12_12px.jpg" /&gt;&lt;/a&gt;)&lt;br /&gt;- JSF 2.0  (Ed Burns &amp;amp; Roger Kitain,   &lt;a target="_blank" href="http://jcp.org/en/jsr/detail?id=314"&gt;JSR 314&lt;/a&gt;,   &lt;a target="_blank" href="http://blogs.sun.com/theaquarium/tags/jsf" title="JSF entries at TheAquarium"&gt;@TA  &lt;img src="http://blogs.sun.com/theaquarium/resource/MagnifyingGlass-12_12px.jpg" /&gt;&lt;/a&gt;)&lt;br /&gt;- Servlet 3.0  (Rajiv Mordani,   &lt;a target="_blank" href="http://jcp.org/en/jsr/detail?id=315"&gt;JSR 315&lt;/a&gt;,   &lt;a target="_blank" href="http://blogs.sun.com/theaquarium/tags/servlet" title="Servlet entries at TheAquarium"&gt;@TA  &lt;img src="http://blogs.sun.com/theaquarium/resource/MagnifyingGlass-12_12px.jpg" /&gt;&lt;/a&gt;)&lt;br /&gt;- JPA 2.0  (Linda DeMichiel, &lt;a target="_blank" href="http://jcp.org/en/jsr/detail?id=317"&gt;JSR 317&lt;/a&gt;, &lt;a target="_blank" href="http://blogs.sun.com/theaquarium/tags/jpa" title="JPA entries at TheAquarium"&gt;@TA &lt;img src="http://blogs.sun.com/theaquarium/resource/MagnifyingGlass-12_12px.jpg" /&gt;&lt;/a&gt;)&lt;br /&gt;- EJB 3.1  (Ken Saks,  &lt;a target="_blank" href="http://jcp.org/en/jsr/detail?id=318"&gt;JSR 318&lt;/a&gt; &lt;a target="_blank" href="http://blogs.sun.com/theaquarium/tags/ejb" title="EJB entries at TheAquarium"&gt;@TA &lt;img src="http://blogs.sun.com/theaquarium/resource/MagnifyingGlass-12_12px.jpg" /&gt;&lt;/a&gt;)&lt;br /&gt;- JCA 1.6  (Binod PG &amp;amp; Sivakumar Thyagarajan,   &lt;a target="_blank" href="http://jcp.org/en/jsr/detail?id=322"&gt;JSR 322&lt;/a&gt;,   &lt;a target="_blank" href="http://blogs.sun.com/theaquarium/tags/jca" title="JCA entries at TheAquarium"&gt;@TA  &lt;img src="http://blogs.sun.com/theaquarium/resource/MagnifyingGlass-12_12px.jpg" /&gt;&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Jan-18: &lt;a href="http://blogs.sun.com/theaquarium/entry/new_visualvm_released"&gt;Performance Analysis&lt;/a&gt;: &lt;span style="font-weight: bold;"&gt;VisualVM 1.1&lt;/span&gt; has been released!&lt;br /&gt;Dec-16: &lt;span style="font-weight: bold;"&gt;JBoss Application Server 5.0&lt;/span&gt; has gone GA. So JBoss has finally &lt;a href="http://java.sun.com/javaee/overview/compatibility.jsp"&gt;joined&lt;/a&gt; the list of "Java EE 5 Compatible Implementations".&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;NetBeans:&lt;/span&gt;&lt;span&gt;&lt;br /&gt;- Portal Pack 3.0 Beta is now &lt;a href="http://www.netbeans.org/kb/articles/portalpack.html"&gt;available&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;IBM:&lt;/span&gt; no portal news&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;Eclipse: &lt;/span&gt;&lt;/span&gt;no portal news&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;IntelliJIDEA&lt;/span&gt;: no portal news&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3305419975676030648-1846725008869694049?l=ctpjava.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ctpjava.blogspot.com/feeds/1846725008869694049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3305419975676030648&amp;postID=1846725008869694049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1846725008869694049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3305419975676030648/posts/default/1846725008869694049'/><link rel='alternate' type='text/html' href='http://ctpjava.blogspot.com/2009/01/portal-update-january-2009.html' title='Portal Update January 2009'/><author><name>basZero</name><uri>http://www.blogger.com/profile/00144024489582407469</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-3305419975676030648.post-3319177112377385365</id><published>2008-12-06T13:06:00.003+01:00</published><updated>2009-05-14T18:28:42.358+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss seam'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><category scheme='http://www.blogger.com/atom/ns#' term='thomas'/><title type='text'>Using JBoss Seam Hot Deployment with a Maven Build</title><content type='html'>[&lt;span style="font-weight:bold;"&gt;UPDATE&lt;/span&gt;: The new plugin version is documented &lt;a href="http://ctpjava.blogspot.com/2009/03/jboss-seam-hot-deploy-with-maven-update.html"&gt;here&lt;/a&gt;]&lt;br /&gt;&lt;br /&gt;As you might have read in &lt;a href="http://ctpjava.blogspot.com/2008/09/top-10-java-technologies-at-cambridge.html"&gt;previous posts&lt;/a&gt;, one of our favorite web application stacks consists of &lt;a href="http://seamframework.org/"&gt;JBoss Seam&lt;/a&gt;. While combining this with our &lt;a href="http://ctpjava.blogspot.com/2008/08/top-10-java-development-tools-at.html"&gt;favorite tooling suite&lt;/a&gt; consisting of &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; and &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;, we had to realize that Seam has a much longer tradition with Ant, and Maven support is only slowly moving in. Today I want to share some ideas on how to tackle the combination issues.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5QjC-pWNxgk/SS_qufD9VXI/AAAAAAAAAdc/NM9RakB_jBY/s1600-h/jboss_server_view.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 53px;" src="http://4.bp.blogspot.com/_5QjC-pWNxgk/SS_qufD9VXI/AAAAAAAAAdc/NM9RakB_jBY/s400/jboss_server_view.gif" alt="" id="BLOGGER_PHOTO_ID_5273691773007123826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;While &lt;a href="http://www.jboss.org/tools/"&gt;JBoss Tools&lt;/a&gt; provides a nice &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;code &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;hot deployment feature&lt;/span&gt; when working with Seam on JBoss, things can get a little hairy when using a Maven build with the project. Seam uses a &lt;span style="font-weight: bold;"&gt;special classloader&lt;/span&gt; and relies on monitoring the &lt;span style="font-weight: bold;font-family:courier new;"&gt;WEB-INF/dev&lt;/span&gt; folder for changed classes - where Maven is completely unaware of this and uses the &lt;span style="font-weight: bold;"&gt;standard &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;"&gt;WEB-INF/classes&lt;/span&gt; folder to deploy all classes in the project. More than once I've seen the situation where JBoss Tools and Maven got in each others way, ending with JBoss rejecting to restart the application due to &lt;span style="font-weight: bold;"&gt;"duplicate components"&lt;/span&gt;. The reason was that Eclipse hot deployed classes to &lt;span style="font-family:courier new;"&gt;WEB-INF/dev&lt;/span&gt; where Seam expects them, but Maven being completely unaware of it packaging all classes in the common &lt;span style="font-family:courier new;"&gt;WEB-INF/classes&lt;/span&gt; folder.&lt;br /&gt;&lt;br /&gt;In order to avoid trouble and also to allow using hot deployment from a command line build, I experimented with several approaches to achieve hot deployment with Maven. The main challenges here are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Distinguishing compiler output&lt;/span&gt;: The Maven compiler plugin by default compiles everything in the same output folder. We need to be able to distinguish between hot and regular deployable code.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Publish updated resources &lt;/span&gt;to JBoss, including domain model classes, seam components as well as XHTML pages.&lt;/li&gt;&lt;li&gt;Make sure &lt;span style="font-weight: bold;"&gt;Seam unit tests&lt;/span&gt; still compile.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The solution I came up with was to write a &lt;span style="font-weight: bold;"&gt;new Maven plugin&lt;/span&gt; which extends the Maven compiler plugin with a new &lt;span style=" font-weight: bold;font-family:courier new;"&gt;hotdeploy:compile&lt;/span&gt; goal and the following functionalities (source code as well as a simple &lt;a href="http://ctpjava.googlecode.com/svn/trunk/repository"&gt;Maven 2 repository&lt;/a&gt; is available in our &lt;a href="http://code.google.com/p/ctpjava/source/browse/#svn/trunk/projects/maven-hotdeploy-plugin"&gt;Google Code account&lt;/a&gt;):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Hook into the compile phase&lt;/span&gt; and compile the source code to a dedicated directory.  The source code location is configurable as well as the output directory.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Remove outdated hot deployable class files&lt;/span&gt; from the JBoss deployment. This is necessary for the Seam classloader to pick up the changes, only updating the file is not enough.&lt;/li&gt;&lt;/ul&gt;The plugin configuration is straight forward as it's based on the regular compiler plugin and is shown in the XML snippet below. Note that it is recommended to create a profile for this build setup as both your continuous build as well as your operations team might not care too much about using hot deployment.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;com.ctp.seam.maven&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;maven-hotdeploy-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;0.1.0&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;configuration&amp;gt;&lt;br /&gt;        &amp;lt;source&amp;gt;${java.source.version}&amp;lt;/source&amp;gt;&lt;br /&gt;        &amp;lt;target&amp;gt;${java.source.version}&amp;lt;/target&amp;gt;&lt;br /&gt;        &amp;lt;hotdeployOutputDirectory&amp;gt;${directory.hotdeployables}&amp;lt;/hotdeployOutputDirectory&amp;gt;&lt;br /&gt;        &amp;lt;includes&amp;gt;&lt;br /&gt;            &amp;lt;include&amp;gt;**/session/**&amp;lt;/include&amp;gt;&lt;br /&gt;        &amp;lt;/includes&amp;gt;&lt;br /&gt;        &amp;lt;deployDirectory&amp;gt;&lt;br /&gt;            ${directory.deploy.jboss}/${build.finalName}.${project.packaging}&lt;br /&gt;        &amp;lt;/deployDirectory&amp;gt;&lt;br /&gt;    &amp;lt;/configuration&amp;gt;&lt;br /&gt;    &amp;lt;executions&amp;gt;&lt;br /&gt;        &amp;lt;execution&amp;gt;&lt;br /&gt;            &amp;lt;phase&amp;gt;compile&amp;lt;/phase&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;                &amp;lt;goal&amp;gt;compile&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;/pre&gt;&lt;br /&gt;The main additions to a regular compiler plugin setup are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This variant uses the common &lt;span style="font-family:courier new;"&gt;/src/main/java&lt;/span&gt;  source folder and uses in- and excludes to distinguish the hot deployable sources. Alternatively you can set the &lt;span style="font-weight: bold;font-family:courier new;"&gt;sourceDirectory&lt;/span&gt; configuration value pointing to a dedicated source folder (similar as JBoss Tools does the setup for you). Don't forget that this requires then the &lt;a style="font-weight: bold;" href="http://mojo.codehaus.org/build-helper-maven-plugin/"&gt;Build Helper Maven plugin&lt;/a&gt; to add source folders to your regular build.&lt;/li&gt;&lt;li&gt;The &lt;span style="font-weight: bold;font-family:courier new;"&gt;deployDirectory&lt;/span&gt; is a reference to your exploded application directory inside the JBoss deploy folder. This is needed in order to remove outdated hot deployable classes.&lt;/li&gt;&lt;li&gt;You can specify the &lt;span style="font-weight: bold;font-family:courier new;"&gt;hotdeployOutputDirectory&lt;/span&gt; directory where the code should be compiled to. Note that this defaults to the value shown in the example - feel free to skip this part. The plugin will compile into this folder after appending a &lt;span style="font-family:courier new;"&gt;WEB-INF/dev&lt;/span&gt; to the path.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The rest of the setup we can do by simply reconfiguring existing plugins. Note the &lt;a href="http://code.google.com/p/ctpjava/w/list"&gt;Google Code Wiki&lt;/a&gt; contains a &lt;a style="font-weight: bold;" href="http://code.google.com/p/ctpjava/wiki/MavenSeamSamplePOM"&gt;complete sample POM&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;ready for you to start your own Seam webapp. The details on the configuration are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Reconfiguring the WAR plugin so the &lt;span style="font-weight: bold;font-family:courier new;"&gt;webappDirectory&lt;/span&gt; points inside our JBoss deploy folder. Maven uses this folder to assemble the WAR file, which perfectly corresponds to an exploded deployment. Additionally we define our hot deployment compilation folder as a &lt;span style="font-weight: bold;font-family:courier new;"&gt;webResource&lt;/span&gt;, which will copy our compilation exactly to the &lt;span style="font-family:courier new;"&gt;WEB-INF/dev&lt;/span&gt; folder in the exploded deployment.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;maven-war-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;configuration&amp;gt;&lt;br /&gt;        &amp;lt;webResources&amp;gt;&lt;br /&gt;            &amp;lt;resource&amp;gt;&lt;br /&gt;                &amp;lt;directory&amp;gt;${directory.hotdeployables}&amp;lt;/directory&amp;gt;&lt;br /&gt;                &amp;lt;filtering&amp;gt;false&amp;lt;/filtering&amp;gt;&lt;br /&gt;            &amp;lt;/resource&amp;gt;&lt;br /&gt;        &amp;lt;/webResources&amp;gt;&lt;br /&gt;        &amp;lt;webappDirectory&amp;gt;&lt;br /&gt;            ${directory.deploy.jboss}/${build.finalName}.${project.packaging}&lt;br /&gt;        &amp;lt;/webappDirectory&amp;gt;&lt;br /&gt;    &amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Similarly, we have to add our output folder to the &lt;span style="font-weight: bold;"&gt;test classpath&lt;/span&gt;. This is simplest done by adding it as a resource folder, which will copy the classes to the &lt;span style="font-family:courier new;"&gt;target/test-classes&lt;/span&gt; directory before the test classes are compiled:&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre name="code" class="xml"&gt;&amp;lt;testResources&amp;gt;&lt;br /&gt;    &amp;lt;testResource&amp;gt;&lt;br /&gt;        &amp;lt;directory&amp;gt;${directory.hotdeployables}/WEB-INF/dev&amp;lt;/directory&amp;gt;&lt;br /&gt;        &amp;lt;filtering&amp;gt;false&amp;lt;/filtering&amp;gt;&lt;br /&gt;    &amp;lt;/testResource&amp;gt;&lt;br /&gt;    ...&lt;br /&gt;&amp;lt;/testResources&amp;gt;&lt;/pre&gt;&lt;br /&gt;If you want to run a similar luxury setup as you get from &lt;span style="font-weight: bold;"&gt;JBoss Tools&lt;/span&gt;, you can add a &lt;span style="font-weight: bold;"&gt;Maven builder&lt;/span&gt; to your project. Simply go to the Eclipse Project properties and click "New" on the "Builders" properties. The new Maven build should look like the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5QjC-pWNxgk/STppLXl2P2I/AAAAAAAAAds/xZb1bZYlo00/s1600-h/eclipse_maven_builder.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 296px; height: 400px;" src="http://4.bp.blogspot.com/_5QjC-pWNxgk/STppLXl2P2I/AAAAAAAAAds/xZb1bZYlo00/s400/eclipse_maven_builder.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5276645557450194786" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Make sure that the following conditions apply to your Eclipse setup:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The JRE you have configured is actual
