right yes - the JNDI binding of JCR would make sense - but I wasn&#39;t sure how that could be delivered as a self contained war to &quot;drop in&quot; and not require significant container specific integration (correct me if wrong). <br>
<br><div class="gmail_quote">On Wed, Mar 3, 2010 at 8:08 PM, Bernd Rücker <span dir="ltr">&lt;<a href="mailto:bernd.ruecker@camunda.com">bernd.ruecker@camunda.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hmm, okay REST is one option. But I still would prefer to bind the JCR<br>
Repository in the JNDI (which is easily possible). This is an option we<br>
used already a couple of times for JackRabbit applications. By doing so,<br>
everybody in the app server can access it via JNDI, like any other<br>
datasource as well (and basically that&#39;s what a JCR Repository is).<br>
<br>
The only dependency is to have JCR on the classpath, ok.<br>
<br>
I think for the moment I will create a Servlet which reads it from Seam<br>
and binds the Repository to JNDI. What do you think?<br>
<br>
Having a REST or Webdav API INSIDE of the Appserver to talk from Java to<br>
Java just sounds technically unnecessary complicated to me...<br>
<br>
-----Ursprüngliche Nachricht-----<br>
<div class="im">Von: <a href="mailto:rules-dev-bounces@lists.jboss.org">rules-dev-bounces@lists.jboss.org</a><br>
</div>[mailto:<a href="mailto:rules-dev-bounces@lists.jboss.org">rules-dev-bounces@lists.jboss.org</a>] Im Auftrag von Jervis Liu<br>
Gesendet: Mittwoch, 3. März 2010 08:55<br>
<div class="im">An: Rules Dev List<br>
Betreff: Re: [rules-dev] Accessing JCR repository directly<br>
<br>
</div><div><div></div><div class="h5">Bernd Rücker wrote:<br>
&gt;<br>
&gt; Hi Michael.<br>
&gt;<br>
&gt; Thanks for the quick answer!<br>
&gt;<br>
&gt; Our use case at the moment is, that we maintain the HEAD version of<br>
&gt; the rules in an own table locally in the app, where we have a<br>
&gt; specialized GUI for authoring. As soon as they get released we<br>
&gt; leveraged the RuleTemplate to generate a DRL file, which we want to<br>
&gt; check in Guvnor, from where the deployment snapshots are created,<br>
&gt; versioned and so on. So we have to access Guvnor programmatically<br>
&gt; (doesn’t have to be JCR).<br>
&gt;<br>
&gt; A second nice use case we face is to hang in the Drools Repository<br>
&gt; into a bigger JCR-Content-Tree (in the area of ModeShape), so there<br>
&gt; JCR would be nice. Then we could use the JCR Explorer, written from<br>
&gt; one of my colleagues, to have a look at the repos as well. But okay,<br>
&gt; this is why we want to use JCR.<br>
&gt;<br>
&gt; But the most important issue is to access the Repository<br>
&gt; programmatically from an EJB3. Maybe we could get around classloading<br>
&gt; isolation and just access some static stuff for that. Or making the<br>
&gt; ServiceImplementation really more generic usable, that would be<br>
&gt; wonderful as well. But as it sounds it will take some time and will<br>
&gt; not be released pretty soon? Then we have to find another way for now,<br>
&gt; since if avoidable I don’t want to patch drools. So you mean I should<br>
&gt; use the internal Remote Interface the GWT GUI is using? Where can I<br>
&gt; find that and how can I create a correct reference?<br>
&gt;<br>
&gt; Or I have to use Webdav, but this looks pretty cumberstone to use it<br>
&gt; internally in one JBoss server instead of pure Java mechanisms?<br>
&gt;<br>
&gt; Thanks and cheers<br>
&gt;<br>
&gt; Bernd<br>
&gt;<br>
<br>
Hi Bernd, this might be related:<br>
*<a href="http://lists.jboss.org/pipermail/rules-users/2009-December/011618.html" target="_blank">http://lists.jboss.org/pipermail/rules-users/2009-December/011618.html</a><br>
<br>
*Basically the idea is that you expose ServiceImplementation as a remote<br>
service. As far as how the remote service is implemented, one way to go<br>
is to expose ServiceImplementation as RESTful service. Guvnor already<br>
has some Atom/Pub capabilities.It may not match your request yet, but if<br>
you have a concrete requirement on what methods in ServiceImplementation<br>
you want to expose remotely, we can look into it and get it addressed<br>
either by extending Atom/Pub capabilities that Guvnor already has (for<br>
this, take a look at<br>
<a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-guvnor/sr
c/main/java/org/drools/guvnor/server/files/" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-guvnor/sr<br>
c/main/java/org/drools/guvnor/server/files/</a>)<br>
or by providing a truly RESTful service layer on top of Guvnor server.<br>
<br>
Cheers,<br>
Jervis<br>
&gt;<br>
&gt; *Von:* <a href="mailto:rules-dev-bounces@lists.jboss.org">rules-dev-bounces@lists.jboss.org</a><br>
&gt; [mailto:<a href="mailto:rules-dev-bounces@lists.jboss.org">rules-dev-bounces@lists.jboss.org</a>] *Im Auftrag von *Michael<br>
Neale<br>
&gt; *Gesendet:* Montag, 1. März 2010 00:27<br>
&gt; *An:* Rules Dev List<br>
&gt; *Betreff:* Re: [rules-dev] Accessing JCR repository directly<br>
&gt;<br>
&gt; Hi Bernd. yes you have it correctly - seam starts things up.<br>
&gt;<br>
&gt; IN terms of accessing JCR directly, this came up before and one idea<br>
&gt; was to use the &quot;remote&quot; JCR interface - that means some refactoring I<br>
&gt; guess.<br>
&gt;<br>
&gt; So the basic design is that there is a JCR server that starts up, and<br>
&gt; the &quot;clients&quot; connect remotely (a client in this case is also the<br>
&gt; Guvnor server side).<br>
&gt;<br>
&gt; That way you can access it from multiple places. However, it may be a<br>
&gt; bit too low level for this - the question is what do you want to<br>
&gt; access JCR for from your external app?<br>
&gt;<br>
&gt; A better approach, is to make the ServiceImplementation a true remote<br>
&gt; interface (at the moment it is, but for GWT clients only) - so ANY<br>
&gt; sort of client can connect and access the guvnor services, without<br>
&gt; messing with low level data structures - I am thinking the latter is<br>
&gt; the superior approach (and someone else was looking at it).<br>
&gt;<br>
&gt; Michael.<br>
&gt;<br>
&gt; On Sun, Feb 28, 2010 at 4:53 AM, Bernd Rücker<br>
&gt; &lt;<a href="mailto:bernd.ruecker@camunda.com">bernd.ruecker@camunda.com</a> &lt;mailto:<a href="mailto:bernd.ruecker@camunda.com">bernd.ruecker@camunda.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; Hey guys.<br>
&gt;<br>
&gt; I thought I better ask that question on the dev list, correct me if<br>
&gt; that was a bad choice ;-)<br>
&gt;<br>
&gt; I want to programmatically access the JCR repository from another<br>
&gt; application (basically to author rules). I understood the<br>
&gt; RulesRepository (which is a nice interface by the way). I tried to<br>
&gt; understand how the JCR Session is created and can be accessed. As far<br>
&gt; as I found it, it seems that a Seam Bean just starts everything<br>
&gt; (RulesRepositoryManager). Now the question is: How can I access this<br>
&gt; from another application? Because the workspace is locked, I cannot<br>
&gt; create another Session from there.<br>
&gt;<br>
&gt; Wouldn’t it be nice to bind the stuff in JNDI correctly or something<br>
&gt; like that? Or if I do that, can I inject it into the Seam application?<br>
&gt; Or maybe I can access the seam bean somehow from external?<br>
&gt;<br>
&gt; I think it would be the easiest and best to access the JCR repos<br>
&gt; instead of using WebDav or whatever if I am in another EJB3 application…<br>
&gt;<br>
&gt; Thanks a lot for any hint<br>
&gt;<br>
&gt; Cheers<br>
&gt;<br>
&gt; Bernd<br>
&gt;<br>
&gt; --<br>
&gt;<br>
&gt; Blog: _<a href="http://www.bpm-guide.de" target="_blank">www.bpm-guide.de</a> &lt;<a href="http://www.bpm-guide.de" target="_blank">http://www.bpm-guide.de</a>&gt;_<br>
&gt;<br>
&gt; ---------------------------------------------<br>
&gt;<br>
&gt; camunda services GmbH - The Business Process Company<br>
&gt;<br>
&gt; Zossener Straße 55-58 - 10961 Berlin<br>
&gt;<br>
&gt; <a href="http://www.camunda.com" target="_blank">www.camunda.com</a> &lt;<a href="http://www.camunda.com" target="_blank">http://www.camunda.com</a>&gt; - <a href="mailto:info@camunda.com">info@camunda.com</a><br>
&gt; &lt;mailto:<a href="mailto:info@camunda.com">info@camunda.com</a>&gt;<br>
&gt;<br>
&gt; ---------------------------------------------<br>
&gt;<br>
&gt; Bernd Rücker<br>
&gt;<br>
&gt; Geschäftsführer<br>
&gt;<br>
&gt; Telefon +49 30 664040 901<br>
&gt;<br>
&gt; Mobil +49 171 1473461<br>
&gt;<br>
&gt; <a href="mailto:bernd.ruecker@camunda.com">bernd.ruecker@camunda.com</a> &lt;mailto:<a href="mailto:bernd.ruecker@camunda.com">bernd.ruecker@camunda.com</a>&gt;<br>
&gt;<br>
&gt; ---------------------------------------------<br>
&gt;<br>
&gt; Amtsgericht Charlottenburg: HRB 113230 B<br>
&gt;<br>
&gt; Geschäftsführer: Jakob Freund, Bernd Rücker<br>
&gt;<br>
&gt; ---------------------------------------------<br>
&gt;<br>
&gt; BPMN-Buch: <a href="http://www.hanser.de/buch.asp?isbn=978-3-446-41768-7" target="_blank">http://www.hanser.de/buch.asp?isbn=978-3-446-41768-7</a><br>
&gt;<br>
&gt; EJB-3-Buch: <a href="http://www.ejbbuch.de/" target="_blank">http://www.ejbbuch.de/</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing list<br>
&gt; <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>&gt;<br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Michael D Neale<br>
&gt; home: <a href="http://www.michaelneale.net" target="_blank">www.michaelneale.net</a> &lt;<a href="http://www.michaelneale.net" target="_blank">http://www.michaelneale.net</a>&gt;<br>
&gt; blog: <a href="http://michaelneale.blogspot.com" target="_blank">michaelneale.blogspot.com</a> &lt;<a href="http://michaelneale.blogspot.com" target="_blank">http://michaelneale.blogspot.com</a>&gt;<br>
&gt;<br>
&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing list<br>
&gt; <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Michael D Neale<br>home: <a href="http://www.michaelneale.net">www.michaelneale.net</a><br>blog: <a href="http://michaelneale.blogspot.com">michaelneale.blogspot.com</a><br>