Hi,

I've started the migration of nuxeo5 to glassfish (SUN application server)
For now Nuxeo Core is working (I've connected to it from remote - using
the core API)
So the first step in migration is done. (but without authentication)

The next is to find solutions for removing any dependences on jboss.
For now we have some .sar (declaring mbeans), datasources (ds.xml) that
are all jboss specific.
And also a big problem is the login mechanism which is jboss specific.

A side effect of the migration will be the packaging of the ear and the
preprocessing

J2EE 5 standards do not allow using declaration like this (in
application.xml)
<module>
   <java>NXCore.jar</java>
</module>

for POJO modules like NXCore.

The modules of an EAR application can be of one of these types:
1. ejb - modules that contains session beans and/or EJB2 (modules with
only EJB3 and without any session bean are considered to be POJO)
2. web - war modules
3. connector - RAR modules (JCA adapters)
4. java - application client modules. This means client applications
that connect from remote to an EAR application through JawaWebStart or
from command line. These are no POJO libraries but application client
modules.

Currently we use <java> to add our POJO libraries as application modules
but this is wrong.
So we must declare our POJO libraries as shared libraries used by the
application EAR
The only flexible way to define shared libraries in JEE 5 is to put all
of them inside a single directory inside the EAR
This directory is by default named "lib" but cna be changed using the
library-directory element inside application.xml
Example:
 <library-directory>shared</library-directory>

The problem is that these libraries cannot be put in separate
directories - which sucks (we cannot define more than one lib directory)
so we are forced to change the structure of Nuxeo5 EAR and remove all
the platform, core, system, plugins directories and use
a single directory "lib" for all non JEE modules and another (or several
ones) for JEE modules

So in future nuxeo.ear will be packaged this way:
nuxeo.ear
   lib
   ejb
   nuxeo.ear
   nuxeo-core-jca-connector.rar

Ugly isn't it?

About deployment in glassfish
---------------------------------------------------
Deployment in glassfish (and in JEE) is not as we used to call
"deployment" in JBoss.
Deployment means the installation of an application inside the
application server and then  the application will be loaded
at each app server startup
This means in JEE deploying an application is done only once. Then the
application is loaded every time the server starts
IN JBoss the term deployment is also used for loading the application
but this is a separate step.

About EAR preprocessing
--------------------------------------------
Preprocessing at runtime in glassfish is not possible because when
deployed the EAR is checked to follow JEE standards
So the EAR must be validated at deploy time - thus we cannot use dynamic
preprocessing when laoding the application
since the application cannot be deployed if it is not in its final form
and JEE compliant.
May be the auto-deploy feature of glassfish can be used as a workaround
- I am not sure since I haven't tested it yet.
Anyway to be JEE compliant we need to do the preprocessing at build time.
We can make a custom maven task (or ant task) that perform the
preprocessing on the generated EAR at build time and then
we deploy the EAR in jboss (or glassfish)


Bogdan


--
http://lists.nuxeo.com/mailman/listinfo/dev

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to