You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Kevin O'Neill <ke...@rocketred.com.au> on 2003/07/08 12:40:16 UTC

[patch] managed driver

I've added a new driver whos database instance is managed externally.
Unlike the embeded driver if the database is not available the driver will
fail to load. It's designed specifically for use in environments where there an
external process is managing the lifecycle of the database.

The patch also includes some updates to database to prevent a registration
race condition (outlined in an earlier email). This has some flow on effects in
the embeded driver.

I've been able to run all the test EXCEPT the xmlrpc one as I haven't
figured out how to make it work :) (I can't run it without the patches
either).

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21402

-k.


Re: [patch] managed driver

Posted by Kevin O'Neill <ke...@rocketred.com.au>.
On Fri, 11 Jul 2003 23:29:49 -0700, Vladimir R. Bossicard wrote:

>> I've added a new driver whos database instance is managed externally.
>> Unlike the embeded driver if the database is not available the driver
>> will fail to load. It's designed specifically for use in environments
>> where there an external process is managing the lifecycle of the
>> database.
> 
> Many users (including myself) find confusing that the database is
> created if not found.  A solution could be to have yet another system
> property (e.g. XINDICE_AUTOCREATE) to specify the behaviour of the
> driver if the database is not found
>
> Without attacking you by any mean, could you explain why you couldn't
> use the embed driver?  I don't know why you developed the managed
> driver/server but from what I've seen, couldn't you pass a Database
> object to the embed driver?  The embed driver would then only be a
> wrapper.

Questioning is not attacking. I found the embeded driver difficult to use
in a managed environment (for example jboss) as it would create the
database and relied on system properties for configuration.

The managed server privides a simple implementation of a class that will
establish a database. It's handy for testing and instances when you want
to ensure a clean shutdown of the database. The managed driver/managed
server combination provides equivelant functionality to the embeded
driver. For a more concrete example of usage in a managed environment have
a look at:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/belts/store/src/main/au/edu/educationau/belts/management/xmldb/xindice/XindiceService.java?rev=1.1&content-type=text/vnd.viewcvs-markup

It may be that the ManagedServer should be removed from the main tree and
placed in a samples directory.

The creation of the database was to make the combination a drop in
replacement for the emdeded driver.

> just curious
> 
> -Vladimir


Re: [patch] managed driver

Posted by "Vladimir R. Bossicard" <vl...@apache.org>.
> I've added a new driver whos database instance is managed externally.
> Unlike the embeded driver if the database is not available the driver will
> fail to load. It's designed specifically for use in environments where there an
> external process is managing the lifecycle of the database.

Many users (including myself) find confusing that the database is 
created if not found.  A solution could be to have yet another system 
property (e.g. XINDICE_AUTOCREATE) to specify the behaviour of the 
driver if the database is not found.

Without attacking you by any mean, could you explain why you couldn't 
use the embed driver?  I don't know why you developed the managed 
driver/server but from what I've seen, couldn't you pass a Database 
object to the embed driver?  The embed driver would then only be a wrapper.

just curious

-Vladimir

-- 
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice