Dec 08

You can get a description there. This released was initialy planned for begining of 2007 and is finally out.

JBossAS 5 provides a healthy foundation and the most
advanced and fully extensible, cross component model, aspect integration, server runtime environment.

Apr 30

I had a look at jBoss and wanted to validate its capabilities from a PaaS perspective.

First I prefer to have a kind of factory which includes the minimum software and tools to start. This does not include you JDK that should already be installed. This factory will include Eclipse (I use version Europa Winter (Java EE) 3.2 that you can download here) , maven2 (2.0.8 downloadable here) and jBoss (4.2.2 downloadable here ). I also create a folder in this factory for the eclipse workspace.

Install factory

I suggest to backup it, to reuse a copy of it for each project. Create a folder named factory. Download Eclipse, maven 2 and jboss. Then create a folder for eclipse workspace. You should have something like:

Here are some files (eclipse, vars) to put in the folder factory that will setup environment variables.
Add also a shortcut that will launch a command prompt and use the environement variables setup in vars.bat. Here his the value of the shortcut:

C:\WINDOWS\system32\cmd.exe /k “”vars.bat”"

(you should change only the windows folder according to your machine installation).
Now, update the vars.bat file for the line pointing to your JDK, the other lines should not be changed.

Done, yoiur factory is ready. Next step is to create and build your project.

Project and build creation

Create a folder named as you want (I will use C:\PaaS. Then copy the factory folder there (the factory folder is a sub folder of PaaS).

I’ve created a jBoss/Seam project containing : a webclient (for presentation logic of my application), a separated ejb folder (for business logique of my application), an ear to contain the projects.

Unzip this file mycompany.zip into the PaaS folder (mycompany should be asub folder of PaaS).

This project is based on MySql as RDBMS. You do not need to install it to make this sample working as this sample does not include any access to the database. bitewise, it will requires the jdbc driver. Here is the jdbc driver I used for MySql 5.1.6. I did not handle to include it in the factory, so you have to copy it into the lib folder of the jBoss deployment (factory > jboss-4.2.2.GA > server > default > lib).

Execute short cut that is in factory folder, it should launch a command prompt. Go in mycompany folder and execute folowing command line:

mvn clean install

Use Eclipse as IDE

Execute folowing command line:

mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavaDosc=true

Execute eclipse.bat that will launch eclipse with the right workspace. I then suggest you to declare the jBoss server.

Now import projects that are in mycompany folder. Deploy it and check it works.

Deployment

Go in platform folder and execute folowing command line:

mvn jboss:harddeploy

Go in http://localhost:8080/webclient …should be ok !!

Conclusion

There are 3 important points in that sample:

  • usage a factory to bootstrap a new project (I think this is the right direction for a PaaS approch, even if that requires lot more work…this is only a prototype…not more),
  • the maven2 pom.xml files which demonstrate how to separate business logic, presentation…and can be extended easily to host morte than one application,
  • the IDE is nicely included into the picture through maven, and the IDE is NOT the build process.

I will improve it and create a dedicated page on this blog and post updates using regular posts.

If you try it and have any question or see any problem, feel free to add a comment.

Apr 23

…is a valid option to write a full software entreprise stack?

Even if JBoss is not listed in my CV, I had recently a looked at it to check its capabilities as of environemtn for a full software entreprise stack (I may update my CV now even if we do not use it…but I made some prototyping with it and have a clear view of its capabilities).

First, what we need?

  • container for decoupled applications
  • persistance
  • UI (web 2.0 would be a plus)
  • engines as workflow and scripting
  • scallable
  • …and more

Back to some fundamentals…

I had AOP

AOP that SoC ?

Beyond AOP…

I had a AOP

Their are 2 ortogonal (I like orthogonality :-) ) concpets: OOP and AOP.

OOP (Object Oriented Programing) is a software technic which is based on the concept of object (attributs and methodes) and inheritency (a car is a vehicul which is a tranportation mode…etc).

AOP (Aspect Oriented Programing) is a software technic ortogonal to OOP which help in “doing repetitive stuff” amongs objects in a simple manner as for example: logging, security, transaction management…etc (always the same examples).

In our case, the AOP is the entry point to get more…

AOP that SoC ?

AOP can also be used to do SoC (that I like too). SoC is Seperation Of Concern. The idea is to deintroduce decoupling between layers and services of the application stack. The trend is to use AOP as a support to do SoC.

Beyond AOP…

AOP as support to do decoupling…

  • some says IoC (Invertion of Control) … technical detail
  • some says DI (Dependency Injection) … I hate this wording
  • through a Service locator … Yes that’s it !

A service locator allows you to access services (transversal as logging, or not as an application) without bothering with wirering (managing dependencies) and creation (resolution).

You just request a specific service to your AOP system.

Back to jBoss…

So what jBoss is proposing?

  • Application Container: jBoss AS
  • Service Locator : jBoss IoC + ejb
  • Web UI : jBoss Seam (+ ajax4Jsf or RichFaces or IcesFaces for the Web 2.0)
  • Workflow engine: jBoss Seam + jBoss jBPM
  • Scripting engine: jBoss Seam + groovy
  • Rule engine: jBoss Seam + drool
  • Wizard engine: jBoss Seam conversation context
  • Persistance: jBoss + JPA + hibernate

It’s preatty amazing how jBoss is exhaustive. I may miss some important features … but that’s a good start.