New and Noteworthy (5.0.0 M1)



JOnAS 5.0 M1: New and Noteworthy


  • Important: A JDK 1.5 is now required for building and running JOnAS 5.

Components Update

Servlet 2.5/JSP 2.1

JOnAS 5.0 is using Java EE 5 api and allow to use the new versions of the Web Container including Apache Tomcat and Jetty in theirs sixth version.

Apache Tomcat version is 6.0.13 and Jetty version is 6.1.4 

Note that the support of Tomcat 5.5 and Jetty 5.X has been removed.

New 'web' service in jonas.properties:

\#
\#\#\#\#\#\# JOnAS Web container service configuration
\#
\#  Set the name of the implementation class of the web container service.
jonas.service.web.class    org.ow2.jonas.web.tomcat6.Tomcat6Service
\#jonas.service.web.class    org.ow2.jonas.web.jetty6.Jetty6Service

OW2 components

Updates of JORAM (5.0.4), Carol (2.2.10) and Monolog (2.1.8) 

EJB3 with new Persistence model.

  • Support of EJB3 through OW2 EasyBeans container.
  • New persistence model available with JPA
    • This simplify the EJB CMP2 model. The default persistence provider in JOnAS 5.0 is Hibernate EntityManager.
    • But tests have been done with Apache OpenJPA 0.9.8+, Oracle Toplink Essentials or others.

All Java EE 5 annotations may be found here: http://www.easybeans.net/xwiki/bin/download/Main/Documentation/ejb3-annotations.pdf 

This new service is deployed under the name 'ejb3' in jonas.properties:

\#
\#\#\#\#\#\# JOnAS EJB 3 container service configuration
\#
\#  Set the name of the implementation class of the EJB 3 service.
jonas.service.ejb3.class    org.ow2.jonas.ejb.easybeans.EasyBeansService

Main Changes

Deployment

A new deployment framework is being implemented in JOnAS 5.0 M1. For now, EJB3 and EAR may use this deployment.

This new framework is shared by EasyBeans and JOnAS.

By dropping files in JONAS_ROOT/deploy directory, they're automatically loaded and monitored. If a change is happpening on a file, it is reloaded.

Removing a file undeploy the associated module.

Example:

2007-07-11 15:52:47,685 : DeployableMonitorService.doInit : Use the deploy directories '[/home/sauthieg/jonasbases/jb.50/deploy]',
        development mode is 'true'
2007-07-11 15:52:47,686 : ServiceManager.startServices : depmonitor service started

An ear placed in the JONAS_BASE/deploy directory will be automatically deployed:

mv /home/sauthieg/jonasbases/jb.50/apps/j2ee-1.4.ear /home/sauthieg/jonasbases/jb.50/deploy/

...
2007-07-11 15:57:28,152 : Rar.processRar : Starting deployment of /tmp/JOnAS-Deployer-sauthieg/EAR/j2ee-1.4.ear/ra-sample.rar
2007-07-11 15:57:28,245 : Rar.processRar : /tmp/JOnAS-Deployer-sauthieg/EAR/j2ee-1.4.ear/ra-sample.rar available
2007-07-11 15:57:28,614 : JContainer.addBean : EarOp available
2007-07-11 15:57:29,137 : AbsJWebContainerServiceImpl.registerWar : War /tmp/JOnAS-Deployer-sauthieg/EAR/j2ee-1.4.ear/earsample.war
   available at the context /j2ee-1.4.
2007-07-11 15:57:29,141 : EarDeployer.deployEAR : 'EARDeployableImpl[archive=/tmp/JOnAS-Deployer-sauthieg/EAR/j2ee-1.4.ear]'
   EAR Deployable is now deployed

It is configurable in the jonas.properties:

\#
\#\#\#\#\#\#\# JOnAS Deployment Monitor
\#
\# Set the name of the implementation class of the deployment monitor service
\#
jonas.service.depmonitor.class          org.ow2.jonas.deployablemonitor.DeployableMonitorService
jonas.service.depmonitor.development    true
jonas.service.depmonitor.directories

Ant tasks

Antlib, Ease of use

Antlib are now used to simplify JOnAS tasks usage (jonas-ejb-jar, genic, wsgen, newjb, ...)

<project . . .
        xmlns:jant="http://jonas.objectweb.org/ant">
. . .
 <typedef resource="org/objectweb/jonas/ant/antlib.xml"
          classpath="lib/common/ow_jonas_ant.jar"
          uri="http://jonas.objectweb.org/ant" />
. . .
  <jant:jonas jonasroot="${jonas.root}"
              jonasbase="${jonas.base}"
              mode="ping" />
. . .
</project>

Supports for discovery ttl configuration in newjb

Property 'discovery.ttl' has been added in build-jb.properties

Allow to specify the number of network equipment that the discovery message can traverse. (0 means local only)

Example of usage in newjb:

<discovery sourcePort="${discovery.sourceport}"
          greetingPort="${discovery.greetingport}"
          mcastAddr="${discovery.mcastaddr}"
          mcastPort="${discovery.mcastport}"
          ttl="${discovery.ttl}" />

OSGi bundles

As a first step in the process of OSGi-zation of JOnAS, multiples modules have been provided. They are a first and essential step, next move is to move JOnAS runtime on an OSGi gateway with OSGi-enabled modules.

Introduction of the 'wm' (WorkManager) service

The WorkManager API was managed by both 'ejb' and 'resource' services.

It's now an individual service that is configured in the jonas.properties:

\#
\#\#\#\#\#\# JOnAS WorkManager service configuration
\#
\#  Set the name of the implementation class of the wm service
jonas.service.wm.class org.objectweb.jonas.workmanager.internal.JOnASWorkManagerService

\#  Set the size of the worker thread pool
jonas.service.wm.minworkthreads   3

\#  Set the maximun size of the worker thread pool
jonas.service.wm.maxworkthreads   80

\#  Set the max # of seconds that a thread will wait for work
\#  This is used to shrink the worker thread pool back to minimum
jonas.service.wm.threadwaittimeout 60

Name changes

As part of the JOnAS 5 refactoring, many classes have been moved and renamed (services included).

service namenew service classname
registryorg.objectweb.jonas.registry.carol.CarolRegistryService
web (tomcat)org.ow2.jonas.web.tomcat6.Tomcat6Service
web (jetty)org.ow2.jonas.web.jetty6.Jetty6Service
earorg.objectweb.jonas.ear.internal.JOnASEARService
dbmorg.objectweb.jonas.dbm.internal.JOnASDataBaseManagerService
mailorg.objectweb.jonas.mail.internal.JOnASMailService
jtmorg.objectweb.jonas.jtm.jotm.JOTMTransactionService
discoveryorg.objectweb.jonas.discovery.internal.DiscoveryServiceImpl

To avoid any issues during the migration to JOnAS 5, it's advised to recreate a new JONAS_BASE using 'newjb' command.


Side Notes

Partial support for Java EE 5.0 XML Schemas

The modules (apps, ejbjars, webs, ...) using a new Java EE 5.0 XML Schema (xmlns:javaee="http://java.sun.com/xml/ns/javaee") can be deployed in JOnAS

GenIC: templates removed from JONAS_ROOT/templates

They are now directly loaded from the classloader.

Deletion of Jeremie protocol

Jeremie (the RMI personality of the ORB Jonathan) has finally be removed from JOnAS codebase.

It has been deprecated since JOnAS 4.7.X and was no more maintained by the community.

The user who are still using Jeremie have to move to JRMP or IRMI protocols.

MEJB: EAR no more deployed (no webservices for MEJB)

MEJB is no more deployed as an Ear. So the MEJB webservices is no more available in the 5.0 M1 version.

GenIDL removed

A useless module no more maintained and not asked by the community has been removed from the codebase. If someone was relying on it, it could be revived in a separate module...


Samples

New Java EE 5 Example

JOnAS examples were cleaned up to make room for new Java EE 5 samples.

In particular, there is new ear sample wich is using Java EE 5.

This is an Ear with a WebApp and an EjbJar that shows new EJB3 development style (Annotations, POJOs).

Check the EasyBeans Getting Started documentation for more information.


JOnAS Admin

Live logs

This is a really nice new feature were the JOnAS administrator can see directly in the web console all the Log messages (Error, Warn, Debug, ...).

This is really useful when the administrator do not have an access to the machines (terminal, ...).

This can be activated in the 'trace.properties'. First, uncomment the jmxhandler:

\# -----------------------------------------------------------------------
\# jmxHandler : jmx handler
\# -----------------------------------------------------------------------
handler.jmxHandler.type jmx
handler.jmxHandler.output System.out
handler.jmxHandler.pattern %m%n

Then, add the handler in the list:

\# -----------------------------------------------------------------------
\# logger definitions
\# -----------------------------------------------------------------------
logger.root.handler.0 tty
logger.root.handler.1 logf
logger.root.handler.2 jmxHandler

Cluster Daemon support

jonasAdmin now offers a view of managed cluster daemons

If the cluster daemons are declared in the domain.xml of the JOnAS master instance, jonasAdmin will display the available cluster daemons nodes.

Some clusterd properties are showed to the administrator:

  • JMX Service URL: for a direct JMX connection
  • ...

Ability to start/stop at once all JOnAS managed by a cluster daemon instance

This is now possible to start or stop all the JOnAS instances managed by a cluster daemon instance.

Cluster daemon management

Now, jonasAdmin offers some cluster daemon management capabilities:

  • Add/Remove JOnAS servers to a cluster daemon
  • Save the clusterd.xml configuration file

For JOnAS Developers

JOnAS build switch to maven2

In order to have clean modules with clear dependencies, the JOnAS team have choosed Apache Maven2 as its new build system.

This is the base when coming into the OSGi world.

Contributors interested to build the new JOnAS should read the build guide.

Usage of Java SE 5.0 features

JOnAS needs a JDK 5.0 to be build because of the active rewriting of the codebase using Java 5 features.

Java 5 generics (typed list) are being used where possible for code simplification.