Archive for the ‘GateIn’ Category

Juzu 0.4.2

Monday, December 12th, 2011

We have been working hard to get this release done with a great set of new features!!!

First and foremost, I’m very proud of the level support we have now reached for Eclipse. As you may know, Juzu relies much on Annotation Processing Tools (APT) since the beginning to bring exclusive features. Making Juzu work with Eclipse incremental compiler was very challenging because APT simply works differently. Among those features, the type safe template parameters with Eclipse is showed in this screencast

The dev mode feature has been improved a lot, specially now the error reporting is more accurate and sexy, this screencast will teach you everything about switching an application to dev mode in Liferay

Juzu comes as a package to download on this page. Alternatively you can also use the maven archetype to bootstrap an application

Finally, the Dependency Injection has been improved in order to allow the injection of external providers, in particular this is useful if you are using Juzu in the GateIn server and you want to inject GateIn services in a Juzu application, this is now trivial to do and is explained in the wiki.

For the future we plan to develop new features and improve step by step the project, on top of my mind the integration with Bean Validation would be a good thing to do. If you are interested to follow the Juzu project development you can join our Juzu group.

Juzu Web Framework

Monday, October 31st, 2011

Juzu is an open source web framework I started to work on recently, for several reasons, the most important one is that there is no decent framework for developing portlet application in a simple and productive manner. There are other good and valid reasons.

Juzu deploys on the GateIn Portal and on the Liferay Portal. Perhaps it also deploys on other portals, there aren’t any good reason why Juzu would not work on other portal (except bugs).

Juzu integrates with dependency injection frameworks such as Weld (CDI) and Spring, theoretically it should work with any injection framework providing a good support of the JSR-330 specification (however it requires some custom integration work, as JSR-330 is really lightweight…)

Juzu is a work in progress, however it is advanced enough to deliver the infamous Booking application.

If you are interested in Juzu (using or helping), you can start to read this page.

CRaSH gets an installer!

Tuesday, August 16th, 2011

CRaSH 1.0.0-beta22 release features an IZPack installer that will let you configure a CRaSH runtime throughout a serie of screens, here is a short video showing an installation:

You can download them from the usual page.

GateIn 3.2 M1

Monday, June 27th, 2011

We released last week the first milestone of GateIn 3.2, it was a long time since the 3.1 release and both Red Hat and eXo teams were quite busy working on the product and project side of GateIn.

Among the noticeable changes, you will find now a support for Jetty 6.1/Tomcat 7/JBoss AS 6 web containers, a improved Maven build compatible with Maven 3, a few UI improvements and many bug fixes. You can read more about it there.

I’m proud now to work with Bolek that will replace Thomas Heute as GateIn technical lead. Bolek was involved in the effort since the JBoss Portal projects and earned his credits by providing an Hibernate implementation of the now dead Slide project (JCR ancestor) and implementing much of the Portlet 1 TCK assertions in our testsuite (that proved to be invaluable when JSR 286 was implemented). He blogged about his new role in the project here.

If you are a fan of GateIn, the CRaSH shell is a must have companion for GateIn. CRaSH is a shell that provides a JCR access and allows to do stuff and hack GateIn. Use it at your own risks of course ;-) . Download of the latest beta-21 is here.

Finally it’s time of a few words about GateIn stuff that is another GateIn companion I started a few months ago on GitHub. It’s something more informal than a real project, it’s like a bunch of stuff that could be useful if you’re a GateIn user, at least it’s useful to me, it contains so far

  • a CRaSH folder with command for adding users to GateIn
  • gen : an XML generator for generating large navigations
  • sqlman : a tool based on the great JBoss Byteman project that measures the access to resources, very valuable for monitoring database activity. Note that this tool is generic and does not depend on GateIn itself. We could extract it and find a better name (containing “spy”)

Yet another CRaSH beta (21)

Wednesday, June 8th, 2011

Nothing fancy, in it, mostly bug fixes (in particular for SCP CRASH-23 and CRASH-24).

I updated also the Google Code page to add links to GitHub where the project is now hosted and the online docs now have the PDF and the Javadoc.

Finally the project CI is now Jenkins hosted by my friends at Cloudbees. A special thanks to Arnaud for helping me setting this up.

The release is available on Google Code as usual.

CRaSH 1.0.0-beta12 released

Wednesday, October 6th, 2010

We just release the 1.0.0-beta12 of CRaSH that add two new commands:

  1. The addnode command adds one or several JCR nodes
  2. The setperm command provides security configuration of JCR nodes
The rm command has also be improved and provides the capability to remove several nodes at the same time.

CRaSH 1.0.0-beta9 release

Thursday, July 8th, 2010

CRaSh 1.0.0-beta9 minor feature and fix a few issues with GateIn 3.1:

  • export/import uses now the SSH username and password for accessing JCR for GateIn 3.1
  • connect now always require a password for GateIn 3.1
  • documentation now has a front cover page
enjoy!

CRaSH 1.0.0 Beta 8 released

Thursday, May 27th, 2010

We have just released CRaSH 1.0.0 Beta 8 on Google Code forge, in that release we have worked on two usability aspects of the shell:

  • The capability for a command to prompt a value with or without echo of the value entered by the user. It is mainly used by the connect command to prompt the password when it is not entered via the -p option.
  • The second feature is the up/down arrow associated to recalling previously entered commands.
The prompt command implementation required a refactor of the CRaSH architecture, the main challenge coming from the following facts:
  • the shell is invoked by a term and the term has blocking IO
  • the execution of a command needs to be interruptible
The refactoring was quite fun to do, and lead to a few improvements in the architecture that consisted mostly in decoupling the various systems, now we can distinguish:
  1. The Shell that executes the commands and returns a result. The current implementation is connected to JCR to execute Groovy commands.
  2. The Shell Connector, a state machine executing commands in a synchronous or asynchronous manner, it depends on its configuration. The execution of a command can be cancelled.
  3. The Term: a state machine that translates IO into actions, managing also the command history.
  4. The TermIO: the input/output of the Term, that is implemented using Apache SSHD and Wimpi TelnetD
At the moment I am quite satisfied by the current features. I think it is still missing the command completion and I don’t have a clue if it is easy or complex to do and which system should manage it, I’ll leave it for later fun. Maybe it will be easy to do, or it could require some new important refactor to make it possible to happen, who knows?

CRaSH 1.0.0-beta3 release

Tuesday, February 16th, 2010

Just released the 1.0.0-beta3 release of CRaSH, you can get it there.

The first and foremost new features in that release are contributed by Patrice Lamarque that gave us very important commands such as cp to copy a JCR node, mv to move a JCR node and xpath to perform an xpath query in a similar way you can perform a SQL query.

Beside that, the pwd command was bugged in beta2 and is fixed in beta3.

Chromattic support for embedded types

Monday, February 8th, 2010

The embbeded type support for Chromattic brings much power to object modeling on top of Java Content Repository that allows to fully take advantage of how JCR models node types. JCR type model provides two features that don’t match the Java type mode.

The first feature is multiple inheritance that is supported natively by JCR which allows a type to extend several super types. The other feature is the mixin support which is pretty much similar to multiple inheritance except that it can be dynamic, meaning that a node can be assigned with a mixin type. Conversely a mixin type can be removed from a node.

Both features are difficult with classic Java inheritance and the most appropriate way for modeling those is to leverage object delegation. Actually often object delegation is preferable over inheritance as it decouples the object types and provides support for dynamicity.

Mixin type support

The following example is taken from GateIn and it shows how several java type can support templatization with the embedded support.

The Templatized class is a delegate object that provides a relationship to a Template type.

@MixinType(name="templatized")
public abstract class Templatized {

  @OneToMany(type=RelationshipType.PATH)
  @MappedBy("template")
  public abstract Template getTemplate();
  public abstract void setTemplate(Template template);

}

The Page class has an embedded relationship with a Templatized type.

@PrimaryType(name="page")
public abstract class Page {

  // Returns null if the mixin is not present
  @OneToOne(type=RelationshipType.EMBEDDED)
  public abstract Templatized getTemplatized();

  // Controls the life cycle of the mixin
  public abstract void setTemplatized(Templatized templatized);
}

At runtime this would likely be used in the following manner:

Page page = session.findByPath(Page.class, "page");
Templatized templatized = session.create(Templatized.class);
page.setTemplatized(templatized);
Template template = session.findByPath("template");
templatized.setTemplate(template);

Primary type support

Likewise Chromattic supports primary type, the only difference is that the dynamicity aspect does not occur therefore the relationship always exists between the types and it is obviously not possible to destroy it. This feature provides to my opinion a very good alternative for reusability.

Supports in GateIn

The embedded type feature has been added for GateIn in order to allow the Model Object for Portal (MOP). Indeed the model itself does not care about certain aspects and the portal needs to be able to make the base model richer than it is. With the embedded type we have the opportunity to keep the base model simple and have GateIn add its own mixins such as security, templatization, etc… Likewise eXo WCM that is built on top of GateIn will be able to add its own mixins for the purpose of web content management.