9/27/2011

JPA, Eclipselink and Lotus Domino Integration

You might be curious, what my last post about doing geo-spatial queries in JPA has to do with Lotus Domino development - here is the answer, and a question:

After developing the classes for my spatial search along a specified route (tested perfectly well in the eclipse environment), now is the time to intregrate this beast with Lotus Domino server - this should be pretty simple - but only on first sight.

JPA stores its configuration inside a persistence.xml file in the /META-INF directory - but this does not seem to be available to the runtime - causing this error:

No Persistence provider for EntityManager named myPersistenceUnit
(LDD Bug Report X-Pages Forum Report)

Now - after some searching, it could be done theoretically (but does not work for me, and its russian, too - google translates it into a funny description):

Lotus Domino + JPA + GUICE

A rough description of the procedure:
  • Use Guice to inject your dependencies to the JPA Framework Implementation (eclipse in this case). Put all the code into a WEB-INF/src folder which is in the build path.
  • Put the persistence.xml and orm.xml into WEB-IF/src/META-INF
  • Put all the libraries you need into WEB-INF/lib
  • Remove all security restrictions from java.policy in c:\Domino\jvm\lib\security by using

grant {

    permission java.security.AllPermission;

};


The downsides:

If you do all this, it works (but is still very hard to handle while develop, test and deploy), very slow to compile because all data has to be put to and from the database, not secure and not really possible to deploy in a productive customer environment.
Addidtionally, the whole server has to be restarted for every tiny change.

Is there any other possibility, to deploy this via jar?

So i guess it's time to set up a Glassfish Server along Domino to make it happen in a convenient way.

More work to do...

No comments:

Post a Comment