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 Nicolas Arni-Bloch <ni...@cui.unige.ch> on 2004/04/14 14:06:29 UTC

JDO and OJB newbie Question

Hi all,
I want to try JDO with OJB but I have some misunderstood.
I am not very clear about where to put the MetaData for the mapping ? 
In the repository.xml or in the XXX.jdo ?
I look in the tutorial5 and I see that information for the mapping are 
stored in the Product.jdo.
So should we put this information in the .jdo and in the repository.xml 
?
My second question is : with the JDO should we use the 
ManageableCollection interface for the collection or not. I have try 
the jdo implementation with a single class and its work. But I try with 
1..n relation and it doesn't ?
Is some body as code example for using JDO with OJB ?



Nicolas


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: JDO and OJB newbie Question

Posted by Thomas Mahler <th...@web.de>.
Use ANT.
Using ANT to build OJB should work without problems on any platform.

Thomas

Charles N. Harvey III wrote:
> I'm having a lot of trouble building from HEAD.  Do I use "maven" or "ant"?
> I get the STRANGEST error when I try to use ant.  Its probably something 
> with
> my maven/ant installation though.
> 
> Ok, so, I'm getting there.  I'm starting to understand JDO a bit.  I hadn't
> actually looked at it before today.
> 
> I have some questions:
> 
> 1) TransactionImpl
>   Where should I use it?  Should I use TransactionImpl over jdo's 
> Transaction?
>   More importantly, when I do use it, where do I get these two classes 
> to pass
>   to the TransactionImpl's constructor:
>     org.apache.ojb.otm.OTMKit
>     org.apache.ojb.otm.OTMConnection
>   I see where they are, sure, but what are they for?
> 
> 2) Should I be trying to do all of my coding based off of "otm" instead of
>   "jdo" or previously, "broker"?
> 
> 3) PersistenceManagerFactoryImpl
>   I can create a properties file, possibly, "jdo.properties" and set all 
> those
>   properties and then use that.  That gets around the "cheat" that is 
> used in
>   all the test cases correct?
>   A lot of these properties (username, password, url) are in the 
> repository.xml
>   so should I be re-setting them in "jdo.properties" or no?
> 
> 4) What is "swizzle"?
> 
> Thanks a lot.
> 
> 
> Charlie
> 
> 
> 
> Brian McCallister wrote:
> 
>> You will need CVS HEAD, correct -- also make sure you are comfy 
>> looking around the sources to see what is implemented and not. I have 
>> tried to throw OperationUnsupportedException("Not yet imeplemented!") 
>> when a feature isn't actually implemented yet =)
>>
>> This code is being actively written so it may be in states of flux at 
>> times as well, but I make sure all the unit tests pass before checking 
>> anything in.
>>
>> Also, you will need to either figure out the properties used to get 
>> ahold of the correct PersistenceManagerFactory, or just use the 
>> org.apache.ojb.jdo.PersistenceManagerFactoryImpl directly. I haven't 
>> spent any time making the discovery element work, nor testing the code 
>> Matt wrote -- it may or may not work.
>>
>> Let me know anything odd/etc you find, please!
>>
>> -Brian
>>
>> On Apr 14, 2004, at 9:51 AM, Charles N. Harvey III wrote:
>>
>>> Brian,
>>> I _don't_ want to filter my queries.  Can I give the native 
>>> implementation a try?
>>> Would that be the CVS Head or would it be a different branch?
>>>
>>> Thanks.
>>>
>>>
>>> Charlie
>>>
>>>
>>> Brian McCallister wrote:
>>>
>>>> You need both if you are using the JDORI plugin. It is annoying =(
>>>>
>>>> The native JDO impl I am working on for OJB will allow you to just 
>>>> use the OJB mappings as the .jdo files will only be used for 
>>>> (optional in OJB but not for spec-compliant JDO) bytecode 
>>>> enhancement process. This JDO impl is *far* from ready for use yet 
>>>> (well, actually it works great as long as you don't want to filter 
>>>> your queries as JDOQL isn't implemented yet).
>>>>
>>>> -Brian
>>>>
>>>> On Apr 14, 2004, at 8:06 AM, Nicolas Arni-Bloch wrote:
>>>>
>>>>> Hi all,
>>>>> I want to try JDO with OJB but I have some misunderstood.
>>>>> I am not very clear about where to put the MetaData for the mapping 
>>>>> ? In the repository.xml or in the XXX.jdo ?
>>>>> I look in the tutorial5 and I see that information for the mapping 
>>>>> are stored in the Product.jdo.
>>>>> So should we put this information in the .jdo and in the 
>>>>> repository.xml ?
>>>>> My second question is : with the JDO should we use the 
>>>>> ManageableCollection interface for the collection or not. I have 
>>>>> try the jdo implementation with a single class and its work. But I 
>>>>> try with 1..n relation and it doesn't ?
>>>>> Is some body as code example for using JDO with OJB ?
>>>>>
>>>>>
>>>>>
>>>>> Nicolas
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: JDO and OJB newbie Question

Posted by "Charles N. Harvey III" <ch...@alloy.com>.
I'm having a lot of trouble building from HEAD.  Do I use "maven" or "ant"?
I get the STRANGEST error when I try to use ant.  Its probably something 
with
my maven/ant installation though.

Ok, so, I'm getting there.  I'm starting to understand JDO a bit.  I hadn't
actually looked at it before today.

I have some questions:

1) TransactionImpl
   Where should I use it?  Should I use TransactionImpl over jdo's 
Transaction?
   More importantly, when I do use it, where do I get these two classes 
to pass
   to the TransactionImpl's constructor:
     org.apache.ojb.otm.OTMKit
     org.apache.ojb.otm.OTMConnection
   I see where they are, sure, but what are they for?

2) Should I be trying to do all of my coding based off of "otm" instead of
   "jdo" or previously, "broker"?

3) PersistenceManagerFactoryImpl
   I can create a properties file, possibly, "jdo.properties" and set 
all those
   properties and then use that.  That gets around the "cheat" that is 
used in
   all the test cases correct?
   A lot of these properties (username, password, url) are in the 
repository.xml
   so should I be re-setting them in "jdo.properties" or no?

4) What is "swizzle"?

Thanks a lot.


Charlie



Brian McCallister wrote:

> You will need CVS HEAD, correct -- also make sure you are comfy 
> looking around the sources to see what is implemented and not. I have 
> tried to throw OperationUnsupportedException("Not yet imeplemented!") 
> when a feature isn't actually implemented yet =)
>
> This code is being actively written so it may be in states of flux at 
> times as well, but I make sure all the unit tests pass before checking 
> anything in.
>
> Also, you will need to either figure out the properties used to get 
> ahold of the correct PersistenceManagerFactory, or just use the 
> org.apache.ojb.jdo.PersistenceManagerFactoryImpl directly. I haven't 
> spent any time making the discovery element work, nor testing the code 
> Matt wrote -- it may or may not work.
>
> Let me know anything odd/etc you find, please!
>
> -Brian
>
> On Apr 14, 2004, at 9:51 AM, Charles N. Harvey III wrote:
>
>> Brian,
>> I _don't_ want to filter my queries.  Can I give the native 
>> implementation a try?
>> Would that be the CVS Head or would it be a different branch?
>>
>> Thanks.
>>
>>
>> Charlie
>>
>>
>> Brian McCallister wrote:
>>
>>> You need both if you are using the JDORI plugin. It is annoying =(
>>>
>>> The native JDO impl I am working on for OJB will allow you to just 
>>> use the OJB mappings as the .jdo files will only be used for 
>>> (optional in OJB but not for spec-compliant JDO) bytecode 
>>> enhancement process. This JDO impl is *far* from ready for use yet 
>>> (well, actually it works great as long as you don't want to filter 
>>> your queries as JDOQL isn't implemented yet).
>>>
>>> -Brian
>>>
>>> On Apr 14, 2004, at 8:06 AM, Nicolas Arni-Bloch wrote:
>>>
>>>> Hi all,
>>>> I want to try JDO with OJB but I have some misunderstood.
>>>> I am not very clear about where to put the MetaData for the mapping 
>>>> ? In the repository.xml or in the XXX.jdo ?
>>>> I look in the tutorial5 and I see that information for the mapping 
>>>> are stored in the Product.jdo.
>>>> So should we put this information in the .jdo and in the 
>>>> repository.xml ?
>>>> My second question is : with the JDO should we use the 
>>>> ManageableCollection interface for the collection or not. I have 
>>>> try the jdo implementation with a single class and its work. But I 
>>>> try with 1..n relation and it doesn't ?
>>>> Is some body as code example for using JDO with OJB ?
>>>>
>>>>
>>>>
>>>> Nicolas
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: JDO and OJB newbie Question

Posted by Brian McCallister <mc...@forthillcompany.com>.
You will need CVS HEAD, correct -- also make sure you are comfy looking 
around the sources to see what is implemented and not. I have tried to 
throw OperationUnsupportedException("Not yet imeplemented!") when a 
feature isn't actually implemented yet =)

This code is being actively written so it may be in states of flux at 
times as well, but I make sure all the unit tests pass before checking 
anything in.

Also, you will need to either figure out the properties used to get 
ahold of the correct PersistenceManagerFactory, or just use the 
org.apache.ojb.jdo.PersistenceManagerFactoryImpl directly. I haven't 
spent any time making the discovery element work, nor testing the code 
Matt wrote -- it may or may not work.

Let me know anything odd/etc you find, please!

-Brian

On Apr 14, 2004, at 9:51 AM, Charles N. Harvey III wrote:

> Brian,
> I _don't_ want to filter my queries.  Can I give the native 
> implementation a try?
> Would that be the CVS Head or would it be a different branch?
>
> Thanks.
>
>
> Charlie
>
>
> Brian McCallister wrote:
>
>> You need both if you are using the JDORI plugin. It is annoying =(
>>
>> The native JDO impl I am working on for OJB will allow you to just 
>> use the OJB mappings as the .jdo files will only be used for 
>> (optional in OJB but not for spec-compliant JDO) bytecode enhancement 
>> process. This JDO impl is *far* from ready for use yet (well, 
>> actually it works great as long as you don't want to filter your 
>> queries as JDOQL isn't implemented yet).
>>
>> -Brian
>>
>> On Apr 14, 2004, at 8:06 AM, Nicolas Arni-Bloch wrote:
>>
>>> Hi all,
>>> I want to try JDO with OJB but I have some misunderstood.
>>> I am not very clear about where to put the MetaData for the mapping 
>>> ? In the repository.xml or in the XXX.jdo ?
>>> I look in the tutorial5 and I see that information for the mapping 
>>> are stored in the Product.jdo.
>>> So should we put this information in the .jdo and in the 
>>> repository.xml ?
>>> My second question is : with the JDO should we use the 
>>> ManageableCollection interface for the collection or not. I have try 
>>> the jdo implementation with a single class and its work. But I try 
>>> with 1..n relation and it doesn't ?
>>> Is some body as code example for using JDO with OJB ?
>>>
>>>
>>>
>>> Nicolas
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: JDO and OJB newbie Question

Posted by "Charles N. Harvey III" <ch...@alloy.com>.
Brian,
I _don't_ want to filter my queries.  Can I give the native 
implementation a try?
Would that be the CVS Head or would it be a different branch?

Thanks.


Charlie


Brian McCallister wrote:

> You need both if you are using the JDORI plugin. It is annoying =(
>
> The native JDO impl I am working on for OJB will allow you to just use 
> the OJB mappings as the .jdo files will only be used for (optional in 
> OJB but not for spec-compliant JDO) bytecode enhancement process. This 
> JDO impl is *far* from ready for use yet (well, actually it works 
> great as long as you don't want to filter your queries as JDOQL isn't 
> implemented yet).
>
> -Brian
>
> On Apr 14, 2004, at 8:06 AM, Nicolas Arni-Bloch wrote:
>
>> Hi all,
>> I want to try JDO with OJB but I have some misunderstood.
>> I am not very clear about where to put the MetaData for the mapping ? 
>> In the repository.xml or in the XXX.jdo ?
>> I look in the tutorial5 and I see that information for the mapping 
>> are stored in the Product.jdo.
>> So should we put this information in the .jdo and in the 
>> repository.xml ?
>> My second question is : with the JDO should we use the 
>> ManageableCollection interface for the collection or not. I have try 
>> the jdo implementation with a single class and its work. But I try 
>> with 1..n relation and it doesn't ?
>> Is some body as code example for using JDO with OJB ?
>>
>>
>>
>> Nicolas
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: JDO and OJB newbie Question

Posted by Brian McCallister <mc...@forthillcompany.com>.
You need both if you are using the JDORI plugin. It is annoying =(

The native JDO impl I am working on for OJB will allow you to just use 
the OJB mappings as the .jdo files will only be used for (optional in 
OJB but not for spec-compliant JDO) bytecode enhancement process. This 
JDO impl is *far* from ready for use yet (well, actually it works great 
as long as you don't want to filter your queries as JDOQL isn't 
implemented yet).

-Brian

On Apr 14, 2004, at 8:06 AM, Nicolas Arni-Bloch wrote:

> Hi all,
> I want to try JDO with OJB but I have some misunderstood.
> I am not very clear about where to put the MetaData for the mapping ? 
> In the repository.xml or in the XXX.jdo ?
> I look in the tutorial5 and I see that information for the mapping are 
> stored in the Product.jdo.
> So should we put this information in the .jdo and in the 
> repository.xml ?
> My second question is : with the JDO should we use the 
> ManageableCollection interface for the collection or not. I have try 
> the jdo implementation with a single class and its work. But I try 
> with 1..n relation and it doesn't ?
> Is some body as code example for using JDO with OJB ?
>
>
>
> Nicolas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org