stuartw
stuartw

Reputation: 120

Modeshape/Java Application/JBoss how many JVM's

I have had the misfortune of attempting a jee application using Apache Jackrabbit. It purports to have resource adapter such that one could deploy the jcr in a jee server (geronimo or glassfish) along with the server components of your application. If you e.g. have a document repository with tags in nodes, you don't want all the thrashing associated with crossing jvm and memory space boudaries. It turns out that Jackrabbits resource adapter is in such miserable shape that it's useless.

It was recommended that I check out Modeshape. I see that it likes JBoss, which is new to me. Since I see more information regarding JBoss deployment, I'm pushed in that direction, but face more than one new learning curve. Modeshape seems to be a vibrant project, but in any case, the big deal these days is webapps, where the performance concerns I have are not relevant.

I'd like to know if I can achive the same integrated deployment I was looking for with Modeshape and JBoss. If I cannot, I need to keep looking, or for expediency's sake fall back to the jackrabbit standalone repository and put up with the performance hit until I can find something better.

Thanks for your consideration.

Upvotes: 0

Views: 112

Answers (1)

Randall Hauch
Randall Hauch

Reputation: 7187

At the highest level, ModeShape can be embedded into a single JVM, and these JVMs can optionally be clustered together.

With Java SE, embedding is really the correct way to go. ModeShape runs within the same JVM as your application, so all access is local (though ModeShape may still persist content to a remote database or system). Your application instantiates the ModeShapeEngine and starts one or more repositories; the application obtains sessions from those repositories; and the application shuts down the engine when the application terminates.

Within app servers like Geronimo, Tomcat and JBoss there are a few more options:

  • You can still embed a repository inside your (web) application, and it's done in the same way as mentioned above; or
  • You have the server run/manage the ModeShape engine, and your application(s) simply lookup the repository in JNDI

The latter is done either via ModeShape's JCA adapter, which just manages the engine lifecycle, or for JBoss (either EAP or Wildfly, depending upon ModeShape version) via ModeShape's "subsystem" that is managed directly by the server's management system (which includes dynamically managing repositories (deploying or undeploying repositories, changing configurations, monitoring, etc.).

Either way, your applications deal directly with a local ModeShape repository using the JCR API. The only question is how the engine is managed.

Upvotes: 1

Related Questions