You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Armin Waibel <ar...@code-au-lait.de> on 2002/11/30 01:48:36 UTC

Re: Sequence Descriptor in different repository

Hi Tal,

----- Original Message -----
From: "Tal Yalon" <ta...@trivnet.com>
To: "'OJB Users List'" <oj...@jakarta.apache.org>
Sent: Thursday, November 28, 2002 6:16 PM
Subject: RE: Sequence Descriptor in different repository


> Hi Armin,
>
>   Unfortunately it doesn't solve my problem because I want to seperate
the
> sequence management queries from the application queries

This exactly should be possible when using the SequenceManagerRepository
property with a different (non-transactional) datasource.
I read your first mail again and
think you are right, this is a bug.
Try to fix this. Thanks.

regards,
Armin

 (because the
> sequence manager's implementation does begin/commit and thus
committing all
> changes from the application as well).
>
> Can I control to which datasource each descriptor is mapped?
>
> Tal
>
> -----Original Message-----
> From: Armin Waibel [mailto:armin@code-au-lait.de]
> Sent: Thursday, November 28, 2002 6:41 PM
> To: OJB Users List
> Subject: Re: Sequence Descriptor in different repository
>
>
> Hi Tal,
>
> in the current version it is mandatory that the default
> repository (repository file specified in OJB.properties)
> knows about all class descriptors (This will change in
> further releases).
>
> Let the default repository via 'Entity substitution' know
> about your seqMan.
> Example see repositoryXXX.xml and repositoryFarAwayXXX.xml
> files.
>
> Does this solve your problem, or do have a real bug?
>
> regards,
> Armin
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- This is a sample metadata repository for the ObJectBridge System.
>      Use this file as a template for building your own mappings-->
>
> <!-- defining entities for include-files -->
> <!DOCTYPE descriptor-repository SYSTEM "repository.dtd" [
> <!ENTITY user SYSTEM "repository_user.xml">
> <!ENTITY internal SYSTEM "repository_internal.xml">
> -->#### <!ENTITY seqMan SYSTEM "repositorySeqMan_data.xml">
> ]>
> ......
> ......
>     <!-- include user defined mappings here -->
>     &user;
>
>     <!-- include ojb internal mappings here -->
>     &internal;
>
>  -->#### <!-- user data of seqMan class descriptors -->
>     &seqMan;
>
> </descriptor-repository>
>
>
> ----- Original Message -----
> From: "Tal Yalon" <ta...@trivnet.com>
> To: "OJB User List (E-mail)" <oj...@jakarta.apache.org>
> Sent: Thursday, November 28, 2002 4:37 PM
> Subject: Sequence Descriptor in different repository
>
>
> > [OBJ 0.9.7, singlevm]
> >
> > Hi,
> >
> >   I failed to enable the property "SequenceManagerRepository" (I
need
> it so
> > I can use the sequence management with a different datasource).
> Although it
> > parses the file correctly, it fails to find the relevant descriptor
> for the
> > sequence.
> >
> > From what I could figure out, it looks like a bug(?) and here's why:
> > The problem occurs when creating a new Identity(obj) object without
> > supplying the sequence-specific PersistenceBroker.
> > It occurs (as far as I could figure out) in two places:
> > - SequenceGenerator tries to create a new Identity for the object,
it
> calls
> > Identity(obj). Fixing it is trivial.
> > - It also repeats when trying to store the updated sequence object
to
> the DB
> > and calling cache(Object) that creates a new Identity() object w/o
the
> > specialized PB. This is more problematic because the cache object
> doesn't
> > know it is now working with a different PB and tries to use the
> default one.
> > Two solutions: couple each PB with the cache (and vice versa) or
> always give
> > the oid to the cache.
> >
> > Any suggestions?
> >
> > Thanks,
> > Tal
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
>