On 7/11/2010 7:00 PM, Scott Gray wrote:
On 12/07/2010, at 11:33 AM, Adrian Crum wrote:
--- On Sun, 7/11/10, Scott Gray<[email protected]> wrote:
On 12/07/2010, at 4:04 AM, Adrian
Crum wrote:
The factory will try to find a repository via JNDI,
and if that fails, use Java's SPI to find a
javax.jcr.Repository instance (which would return the
Jackrabbit implementation OOTB).
I think it needs to be more explicit than that, what if for
some reason your external repository isn't
registered/available in jndi? OFBiz would start up the
embedded instance and pretend like nothing was wrong.
Good point. Then we might need a configuration xml file that contains something
like the datasource element in entityengine.xml.
My idea originally was to use the container to start up the
embedded instance and register it in jndi. Then you
have a separate class that retrieves a repository from jndi
regardless of whether it is embedded or not.
That's a good idea. I can work on that next.
Cool thanks man, it's all yours until the weekend, I won't have time to look at
the branch again until then.
I committed some code that allows the Repository factory to support
multiple repositories. Basically, each repository is given a name and
client code gets Repository instances by name.
I'm thinking we need a connection class that contains the objects needed
to manage a JCR connection (Repository instance, workspace name,
credentials, session, etc).
I will be on vacation this week, so I will be offline until next Monday
(July 19). We can touch base then.
-Adrian