Hi all,
I like that JDO allows implementations to support this, and I do feel
that this could be a differentiator from JPA. The things that come
to my mind are the following:
* this should be an optional feature so that we don't slow down
implementations from being compliant
* we should examine the proposed JDO 2.1 metadata formats to ensure
that it can support but not require multiple data sources
* we need to examine the impact of configuring multiple data sources
on the API (i.e., new method JDOHelper.getPersistenceManagerFactory
(String... names), PersistenceManager#getDataStoreConnection() &
JDOConnection#getNativeConnection?)
* configuration of JTA and the coordination of transactions across
all data sources
* this would slow down work on 2.1 -- can we add in another
maintenance release?
-matthew
On Oct 29, 2007, at 10:05 AM, Eric Samson wrote:
Hello Erik,
Once again you start an important topic here! :-)
We also are working on a multi-data sources PMF.
I think the name "resource" could be confusing (I tend to prefer
"data source").
Maybe the data source properties should be defined elsewhere (as
you can have quite complex configurations when you want to access
non-relational data stores)?
Best Regards,
....: Eric Samson, Founder & CTO, Xcalia
Service your Data!
-----Message d'origine-----
De : Erik Bengtson [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 26 octobre 2007 15:49
À : [email protected]; [EMAIL PROTECTED]
Objet : multiple databases one PM/TX
In JPOX we are implementing the access to multiple datastores
within a single
PM/TX. If not too late, I’m wonder if you like to hear a proposal to
standardize the configuration of the “jdoconfig” and jdo metadata
to be able to
handle this scenario. It may sound overkill, but IMO is a major
advance over
JPA.
To introduce the subject, the goal is to handle persistence in
multiple
databases (e.g. derby, oracle, DB4O, Versant, XML) within a single JDO
transaction/ single PM. From the user point of view, there are two
items that
must be configured, jdo metadata, jdo configuration, in which would
be part of
this proposal, so I show below an example of the configurations:
/jdoconfig/ sequence unbounded PMF
/jdoconfig/ sequence unbounded Resource
/PMF/
/PMF/@Class
/PMF/@TransactionTimeout
/PMF/@...
/Resource/
/Resource/@Name
/Resource/Connection Settings/
/Resource/Connection Settings/@ConnectionFactoryName
/Resource/Connection Settings/@ConnectionClientID
/Resource/Connection Settings/@ReadOnly
/Resource/Connection Settings/@...
/Resource/Transaction/
/Resource/Transaction/@TwoPhaseCommit
/Resource/Transaction/@Timeout
ConnectionClientID
----------------------------
ConnectionClientID is the identifier for the connection. Some
databases such as
Oracle use this to identify the end user (not the connection user).
ConnectionClientID would accept the values:
1 - CredentialMapping - the CredentialMapping takes the principal
of the running
application and sets it as client id - eg.
ConnectionClientID=CredentialMapping
2 - Identity – the client id is taken from the id right after the
Identity word
- eg. ConnectionClientID=Identity:MyUser
ReadOnly
----------------------------
ReadOnly (accepts true, false) will block write operations to this
connection
TwoPhaseCommit
--------------------------
Two options:
1 – LastLoggingResource - If the resource is non XA, push down this
resource in
commit order.
2 – Emulated – Emulates non XA protocol. Heuristics errors could
happen
Example:
<jdoconfig>
<pmf name=”snowdog” default-resource=”Oracle”>
</pmf>
<resource name=”ERP”>
<connection connectionfactoryname=”BSCS_Hot”/>
</resource>
<resource name=”PeopleSoft”>
<connection connectionfactoryname=”PS_Onyx”/>
</resource>
<resource name=”Oracle”>
<connection connectionfactoryname=”ORA_Vinci”
connection-client-id=”CredentialMapping”/>
<transaction two-phase-commit=”LLR” timeout=”30”/>
</resource>
<resource name=”Xml”>
<connection readonly=”true”/>
<extension>
<jpox:xml file=”file:/usr/home/myxml.xml”/>
</extension>
</resource>
</jdoconfig>
<jdo>
<package>
<class name=”Invoice” resource=”ERP”/>
<class name=”ClassData”/> <!-- uses default-resource -->
<class name=”Person” resource=”PeopleSoft”/>
<class name=”ReferenceData” resource=”Xml”/>
</package>
</jdo>
Quoting Michelle Caisse <[EMAIL PROTECTED]>:
> Hi,
>
> We will have our regular meeting Friday, October 26 at 9 am PDT to
> discuss JDO TCK issues and status.
>
> Dial-in numbers are:
> 866 230-6968 294-0479#
> International: +1 865 544-7856
>
> Agenda:
>
> 1. Subquery spec update
> 2. Other issues
>
> Action Items from weeks past:
>
> [Oct 12 2007] AI Michael take a look at subquery tck tests.
> https://issues.apache.org/jira/browse/JDO-446
>
> [Sep 14 2007] AI Matthew provide examples for 8.6.1.1 jdoconfig.xml.
>
> [June 22 2007] AI Craig discuss svn:eol-style on email.
>
> [June 22 2007] AI Craig write a proposal on annotation overrides for
> the expert group.
>
> [May 25 2007] AI everyone Download the Grails demo from
grails.org and
> check it out. Also look at Grails/Groovy ExpandoMetaClass that
has the
> magic to avoid reflection and enhancement.
>
> [May 25 2007] AI Matthew Adams prepare a proposal with just the
basics
> of schema synchronization with jdo and orm metadata.
>
> [May 18 2007] AI Craig update http://wiki.apache.org/jdo/
> CurrentDevelopment wiki page
>
> [Apr 27 2007] AI Craig review Query API and send email to experts.
>
> [Apr 27 2007] AI Erik file a JIRA regarding JPA style
transactions and
> attach his discussion document to it.
>
> [Mar 9 2007] AI Craig: Update the spec to require that the key of
the
> listener is the class name of the listener, for consistency with
> proposed xml..
>
> [Mar 2 2007] AI Craig: update the JDOHelper class to include a
string
> constant "META-INF/jdo.xml" and a new method
> getPersistenceManagerFactory taking no arguments.
>
> [Aug 11 2006] AI Craig propose some semantics for behavior if user
> tries to add to a list where the ordering element is incorrect.
>
> [Jul 14 2006] AI: Erik document 220 annotations that don't have a
> corresponding JDO concept.
>
> [Jun 23 2006] AI Martin look at what Hibernate and TopLink support
> for Enum types. In progress.
>
> [Apr 14 2006] AI Craig: update the roadmap for JDO. In progress.
>
> [Nov 4 2005] AI Martin: Update Martin's wiki with discusion of
JDK 1.5
> issues. In progress
>
> [Sep 2 2005] AI: To recruit members, update the web site.
Articles on
> TheServerSide directing attention to the site. T-shirts, logo.
AI:
> Craig write a ServerSide article.
>
> -- Michelle
>
> >
>