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 Hans Novak <hn...@repcom.de> on 2007/09/12 10:14:58 UTC

storing objects

Hi,

i am not shure, but is ist correct when i have an object, witch is a 
tree of some other objects (colletions) and i delete a part of the tree 
and then store the hole object (tree) - in the database the deleted 
object will also be deleted ?

Everything works fine, when i store or update the object, but not when i 
delete.
The deleted part of the object will not be deleted in the database. I 
can remove it by hand, when i run a remove.object  (the part of the 
tree) and then store the (changed) tree.

Is this normal ?


Hans



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


Re: TO: Alessandro Colantoni: Problems with "LogicSqlCondition"

Posted by Hans Novak <hn...@repcom.de>.
Ok, this helps.

thx

Hans


Alessandro Colantoni schrieb:
> Hi Hans
> I think that in an other post I got mistake.
>
> If you want all beginning with r you have to put RIGHTLIKE.
>  when you use RIGHTLIKE just updated a criteria in this  way
>
>
> criteria.addLike(field,value+"%");
>
> with leftLike
>
> criteria.addLike(field,"%"+value);
>
> I hope this help
> Regards
> Alessandro
>
>   


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


Re: TO: Alessandro Colantoni: Problems with "LogicSqlCondition"

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi Hans
I think that in an other post I got mistake.

If you want all beginning with r you have to put RIGHTLIKE.
 when you use RIGHTLIKE just updated a criteria in this  way


criteria.addLike(field,value+"%");

with leftLike

criteria.addLike(field,"%"+value);

I hope this help
Regards
Alessandro



On 9/25/07, Hans Novak <hn...@repcom.de> wrote:
>
> Hi Allesandro,
>
> i have a question to the "LogicSqlCondition"
>
> When i ask mandragora with
>
>    Partner.class, new LogicSqlCondition("NAME","leftlike","r")
>
> i get not the object, whats beginnig with r, but one, who have an "r"
> somewhere in the name (and only 1 object, but there are more with "r" in
> the name).
>
> When i call it
>
>    Partner.class, new LogicSqlCondition("NAME","leftlike","r*")
>
> i get all object beginning with "r" and containig a "r" in the "NAME"
> Field.
>
> What i doing wrong ?
>
>
> Hans
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

TO: Alessandro Colantoni: Problems with "LogicSqlCondition"

Posted by Hans Novak <hn...@repcom.de>.
Hi Allesandro,

i have a question to the "LogicSqlCondition"

When i ask mandragora with

    Partner.class, new LogicSqlCondition("NAME","leftlike","r")  

i get not the object, whats beginnig with r, but one, who have an "r" 
somewhere in the name (and only 1 object, but there are more with "r" in 
the name).

When i call it

    Partner.class, new LogicSqlCondition("NAME","leftlike","r*") 

i get all object beginning with "r" and containig a "r" in the "NAME" Field.

What i doing wrong ?


Hans

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


Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi again,
thanks Armin for your interest, and of course you can criticize all that you
want, you are welcome.
I started this project just because I would generalize the dao based on Ojb
Pb methods I use most often and share them, above all with other Ojb people,
hoping to push people doing an effort to make general his method and share
too. Then came BD methods and the bd and dao factories, and so on.
So every help and critic to improve these methods are really welcome.
I will start modify the method as you told as soon as possible.

Regards

Alessandro





On 9/12/07, Armin Waibel <ar...@apache.org> wrote:
>
> Hans Novak wrote:
> >
> > Did you read the post from Alessandro ?
> > He wrote something to catch this known problem ...
> > I will try it later.
> >
>
> yep, I read it. Sorry I don't have the time to check the source code of
> this project for performance issues/bottlenecks/"bugs".
>
> I checked method #updateCollectionReference(...):
> Performs an additional DB roundup to get all persisted collection
> objects and compare these objects with objects of the reference. It
> compares the objects based on #equals(..) method. So you need a proper
> equals method implementation. It doesn't use OJB's PersistentField
> implementation
>
> http://db.apache.org/ojb/docu/guides/advanced-technique.html#Change+PersistentField+Class
> to access the members - you need proper public setter/getter.
> But generally speaking this method should do the job (as workaround till
> we fix this in OJB)
>
> [For Alessandro]
> Think this method can be improved (I don't want to criticize you ;-)).
> Use a report query an query only the PK fields of the collection. Then
> build the Identity objects and compare against the Identity objects of
> the current collection to find the deleted objects - No need for proper
> object.equals(..) method implementation of the persistence capable
> objects.
> Use
> Object value =
> FieldDescriptor/CollectionDescriptor.getPersistentField().get(source)
> to read the field value of an persistence capable object.
> Use PB.getDescriptorRepository() to lookup the current used
> DescriptorRepository instance.
>
> regards,
> Armin
>
> > Hans
> >
> > ---------------------------------------------------------------------
> > 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: storing objects

Posted by Armin Waibel <ar...@apache.org>.
Hans Novak wrote:
> 
> Did you read the post from Alessandro ?
> He wrote something to catch this known problem ...
> I will try it later.
>

yep, I read it. Sorry I don't have the time to check the source code of 
this project for performance issues/bottlenecks/"bugs".

I checked method #updateCollectionReference(...):
Performs an additional DB roundup to get all persisted collection 
objects and compare these objects with objects of the reference. It 
compares the objects based on #equals(..) method. So you need a proper 
equals method implementation. It doesn't use OJB's PersistentField 
implementation
http://db.apache.org/ojb/docu/guides/advanced-technique.html#Change+PersistentField+Class
to access the members - you need proper public setter/getter.
But generally speaking this method should do the job (as workaround till 
we fix this in OJB)

[For Alessandro]
Think this method can be improved (I don't want to criticize you ;-)). 
Use a report query an query only the PK fields of the collection. Then 
build the Identity objects and compare against the Identity objects of 
the current collection to find the deleted objects - No need for proper 
object.equals(..) method implementation of the persistence capable objects.
Use
Object value = 
FieldDescriptor/CollectionDescriptor.getPersistentField().get(source)
to read the field value of an persistence capable object.
Use PB.getDescriptorRepository() to lookup the current used 
DescriptorRepository instance.

regards,
Armin

> Hans
> 
> ---------------------------------------------------------------------
> 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: storing objects

Posted by Hans Novak <hn...@repcom.de>.

Armin Waibel schrieb:
> It's how OJB currently work. But I agree this is not the behavior a 
> user expects when using a "removal aware" collection and above all the 
> odmg-api implementation detects the removed/orphan objects and delete 
> them.
> OJB (PB-api) ignore the objects detected by the removal aware 
> collection on delete of the main object. I will have a look at this.

Did you read the post from Alessandro ?
He wrote something to catch this known problem ...
I will try it later.

Hans

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


Re: storing objects

Posted by Armin Waibel <ar...@apache.org>.
Hi Hans,

Hans Novak wrote:
> Hi,
> 
> i am not shure, but is ist correct when i have an object, witch is a 
> tree of some other objects (colletions) and i delete a part of the tree 
> and then store the hole object (tree) - in the database the deleted 
> object will also be deleted ?
> 
> Everything works fine, when i store or update the object, but not when i 
> delete.
> The deleted part of the object will not be deleted in the database. I 
> can remove it by hand, when i run a remove.object  (the part of the 
> tree) and then store the (changed) tree.
> 
> Is this normal ?

It's how OJB currently work. But I agree this is not the behavior a user 
expects when using a "removal aware" collection and above all the 
odmg-api implementation detects the removed/orphan objects and delete them.
OJB (PB-api) ignore the objects detected by the removal aware collection 
on delete of the main object. I will have a look at this.

regards,
Armin


> 
> 
> Hans
> 
> 
> 
> ---------------------------------------------------------------------
> 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: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi Hans,
I'm very happy you appreciated it.
Any help you need, just ask;
Any suggestion is welcome

Alessandro


On 9/14/07, Hans Novak <hn...@repcom.de> wrote:
>
> only one word: wonderful !!!
>
>
> Hans
>
>
> Alessandro Colantoni schrieb:
> > if you  want that name begin with r put leftlike in place of like
> >
> >
> > 2nd. No you have to use the updateCreateTrees, or
> updatecollectionreference,
> > or updatecollectionreferences
> >
> > Mandragora update method just do the ojb store. It just save you to to
> deal
> > with transaction, create broker, closing an other annoying things that
> are
> > always the same.
> >
> > Alessandro
> >
> >
> > On 9/14/07, Hans Novak <hn...@repcom.de> wrote:
> >
> >> oh... ok :-)
> >>
> >> but when i write
> >>
> >>            Collection collection = bd.findCollectionByLogicCondition(
> >>                    Partner.class, new
> >> LogicSqlCondition("NAME","like","r*")
> >>                    );
> >>
> >> i get a collection of partners, who have a "r" somewhere in his name,
> >> not partners, who begins with it !
> >>
> >> 2nd, the first question in this ng was, if its normal, that ojb do not
> >> delete a subtree of an object in the database,
> >> when i delete it in the object and then make an dao.update(object) to
> >> the database.
> >> mangragora do it not too !?
> >>
> >> Hans
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >> For additional commands, e-mail: ojb-user-help@db.apache.org
> >>
> >>
> >>
> >
> >
>
> --
>
>
>
> ------------------------------------------------------------------------
>
>
> Repcom Datentechnik GmbH <http://www.repcom.de/>
> Hauptstr. 103 - 63110 Rodgau
> Tel. 06106-638081
> Fax 06106-638083
> Steuernummer 03524225030
> Ust-IdNr.: DE151061445  Bankverbindung:
> Deutsche Bank Dietzenbach,
> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
>
> Internationale  Zahlungen
> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
> de54505700240151030400 BIC deutdedb538
> Öffnungszeiten:
> Mo.-Fr. 14.00-18.30 Uhr
> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
> Sie finden uns hier: Anfahrtsbeschreibung
> <http://www.repcom.de/images/repcom/anfahrt.jpg>
> Messenger
> Yahoo
> ICQ
>        : bforpc
> : 174290900
>        MSN
> Skype
>        : bforpc@hotmail.com
> : bforpc
>
> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
> und   www.dataportal.de <http://www.dataportal.de/>
>
> Unsere AGB's finden Sie hier
> <http://www.repcom.de/index.php?main_page=conditions>.
>
> Vertraulichkeitshinweis
> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so
> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
> in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail
> nebst Anhängen und aller Kopien.
>
>
> ------------------------------------------------------------------------
>
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
only one word: wonderful !!!


Hans


Alessandro Colantoni schrieb:
> if you  want that name begin with r put leftlike in place of like
>
>
> 2nd. No you have to use the updateCreateTrees, or updatecollectionreference,
> or updatecollectionreferences
>
> Mandragora update method just do the ojb store. It just save you to to deal
> with transaction, create broker, closing an other annoying things that are
> always the same.
>
> Alessandro
>
>
> On 9/14/07, Hans Novak <hn...@repcom.de> wrote:
>   
>> oh... ok :-)
>>
>> but when i write
>>
>>            Collection collection = bd.findCollectionByLogicCondition(
>>                    Partner.class, new
>> LogicSqlCondition("NAME","like","r*")
>>                    );
>>
>> i get a collection of partners, who have a "r" somewhere in his name,
>> not partners, who begins with it !
>>
>> 2nd, the first question in this ng was, if its normal, that ojb do not
>> delete a subtree of an object in the database,
>> when i delete it in the object and then make an dao.update(object) to
>> the database.
>> mangragora do it not too !?
>>
>> Hans
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>     
>
>   

-- 


	
------------------------------------------------------------------------

	
Repcom Datentechnik GmbH <http://www.repcom.de/>
Hauptstr. 103 - 63110 Rodgau
Tel. 06106-638081
Fax 06106-638083
Steuernummer 03524225030 
Ust-IdNr.: DE151061445 	Bankverbindung:
Deutsche Bank Dietzenbach,
Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik

Internationale  Zahlungen
Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
de54505700240151030400 BIC deutdedb538
Öffnungszeiten: 
Mo.-Fr. 14.00-18.30 Uhr 
Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
Sie finden uns hier: Anfahrtsbeschreibung 
<http://www.repcom.de/images/repcom/anfahrt.jpg> 	
Messenger
Yahoo
ICQ
	: bforpc
: 174290900
	MSN
Skype
	: bforpc@hotmail.com
: bforpc

Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/> 
  und   www.dataportal.de <http://www.dataportal.de/> 	

Unsere AGB's finden Sie hier 
<http://www.repcom.de/index.php?main_page=conditions>. 

Vertraulichkeitshinweis
Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist 
vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn 
Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so 
beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung, 
Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts 
nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie 
in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail 
nebst Anhängen und aller Kopien.

	
------------------------------------------------------------------------



Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
if you  want that name begin with r put leftlike in place of like


2nd. No you have to use the updateCreateTrees, or updatecollectionreference,
or updatecollectionreferences

Mandragora update method just do the ojb store. It just save you to to deal
with transaction, create broker, closing an other annoying things that are
always the same.

Alessandro


On 9/14/07, Hans Novak <hn...@repcom.de> wrote:
>
> oh... ok :-)
>
> but when i write
>
>            Collection collection = bd.findCollectionByLogicCondition(
>                    Partner.class, new
> LogicSqlCondition("NAME","like","r*")
>                    );
>
> i get a collection of partners, who have a "r" somewhere in his name,
> not partners, who begins with it !
>
> 2nd, the first question in this ng was, if its normal, that ojb do not
> delete a subtree of an object in the database,
> when i delete it in the object and then make an dao.update(object) to
> the database.
> mangragora do it not too !?
>
> Hans
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
oh... ok :-)

but when i write

            Collection collection = bd.findCollectionByLogicCondition(
                    Partner.class, new LogicSqlCondition("NAME","like","r*")
                    );

i get a collection of partners, who have a "r" somewhere in his name, 
not partners, who begins with it !

2nd, the first question in this ng was, if its normal, that ojb do not 
delete a subtree of an object in the database,
when i delete it in the object and then make an dao.update(object) to 
the database.
mangragora do it not too !?

Hans


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


Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi Hans,

I'm writing these days the documentation about how to extend Mandragora,
that now have just some line bad written.

You will see how it easy write the methods you want and integrate them in
Mandragora, so you could do
bd.yourMethods(....)

Anyway to do what you need should have a look at
findCollectionByLogicCondition

You should do:

Collection yourcollection = bd.findCollectionByLogicCondition(YourVO.Class,
new LogicSqlCondition("yourfield","LIKE",value1,"OR",new
LogicSqlCondition("yourfield","LIKE",value2,"OR", ...... ,
newLogicSqlCondition(("yourfield","LIKE",valueN).... )));



http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html#findCollectionByLogicCondition

I hope this helps.

Alessandro

On 9/14/07, Hans Novak <hn...@repcom.de> wrote:
>
> Hi Allessandro,
>
> first of all - it is working and looks great.
>
> I try first the findCollectionByOrValues.
>
> Is there a chance, that it would search not by equal '=', but by "like"
> operator ?
>
>
> Hans
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
Hi Allessandro,

first of all - it is working and looks great.

I try first the findCollectionByOrValues.

Is there a chance, that it would search not by equal '=', but by "like" 
operator ?


Hans



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


Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
OK!
You are welcome

Alessandro


On 9/14/07, Hans Novak <hn...@repcom.de> wrote:
>
> Yes, thats it !
> Without the repository and the 2 properties files it works !!!
> I dont have the time this morning to test everything, but both apps are
> runnunig (my app and the test app for mandragora) without errors.
> I will test it later for more information. first of all thank you. I
> would let you all informations about at little later :-)
>
> Hans
>
> Alessandro Colantoni schrieb:
> > Ok!
> > I will start using it with ojb-blank and if I fail I will ask you for
> your
> > app.
> >
> >
> > Anyway I think that the problem is not the ojb-blank structure, as I use
> the
> > very similar maven structure in my projects and it works fine. I think
> just
> > that I always use it in a web app, and maybe your structure can conflict
> > with the same properties files that are inside the jar.
> >
> > I explain better, and hope this could solve it:
> >
> > Open the mandragora-0.1-SNAPSHOT.jar you are using for example with
> winrar
> > or winzip.
> > Inside it you will see the files log4j.properties, OJB.properties,
> > Mandragora.properties, Ojb-logging.properties, repository.dtd and
> > repository_internal.xml.
> > Delete all of them and try again.
> >
> > In a tipical web-app structure this files don't go in the conflict,
> (anyway
> > are totally useless, they are there for a mistake of the jar packaging
> > process). In the Ojb.properties there it sets
> >
> > *repositoryFile=repository.xml*
> >
> > So it could be that Ojb read this file  it expects in the same directory
> the
> > repository.xml.
> >
> > Deleting mandragora.jar it reads the proper file and works.
> >
> > So please try * *to delete all of them from the inside the jar
> >
> > Regards
> >
> > Alessandro
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On 9/13/07, Hans Novak <hn...@repcom.de> wrote:
> >
> >> Hi,
> >>
> >>
> >> When i add the mandragora jar to my project and start my standard main
> >> class, i get this error when calling:
> >>
> >> broker = PersistenceBrokerFactory.defaultPersistenceBroker();
> >>
> >> org.apache.ojb.broker.PBFactoryException: There was no
> >> 'default-connection' attribute enabled in the jdbc connection
> descriptor
> >>    at
> >>
> >>
> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
> >> (Unknown
> >> Source)
> >>    at
> >> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
> >> (Unknown
> >> Source)
> >>    at
> >> de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(
> >> PartnerFactoryCore.java:30)
> >>    at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java
> >> :52)
> >>    at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java
> >> :42)
> >>    at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java
> :28)
> >>
> >> when i remove the madragora jar from my project, it works fine.
> >> Every other files, prperties, etc are untouched.
> >> It seems like, that mandragora search the repositories on the wrong dir
> >> and change my system settings also.
> >>
> >>
> >>> Can you tell me how  do you lookup the persistence broker in your app?
> >>> Mandragora just do:
> >>> broker=PersistenceBrokerFactory.defaultPersistenceBroker();
> >>> To use the three file for the repository is not a problem. I use too
> >>>
> >> except
> >>
> >>> the repository- user
> >>> I keep waiting  your news
> >>>
> >>>
> >> i think it very important, that the ojb-blank project have a - i will
> it
> >> call - "unusual" directory structure and according to this my project
> >> too (i wrote it in the last mail)
> >> It is very important for me, that i can use the hole ojb-blank project
> >> with the buld file, to generate all neede files etc., because in
> >> development phase we change often times the database structure or
> >> similar and dont want to change all related prperties.
> >>
> >> I had not the time, to make a new Project, to test it and i dont have a
> >> web-development enviroment here.
> >> so i can sadly only help and test on standard java apps ... ;-)
> >>
> >> if you find the time, get the ojb_blank projekt and try to merge it
> with
> >> mandragora.
> >>
> >> if you like, i can send you my hole app without jars etc as zip to your
> >> email - the finel app would be opensource, so no problem :-)
> >>
> >> Hans
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
Yes, thats it !
Without the repository and the 2 properties files it works !!!
I dont have the time this morning to test everything, but both apps are 
runnunig (my app and the test app for mandragora) without errors.
I will test it later for more information. first of all thank you. I 
would let you all informations about at little later :-)

Hans

Alessandro Colantoni schrieb:
> Ok!
> I will start using it with ojb-blank and if I fail I will ask you for your
> app.
>
>
> Anyway I think that the problem is not the ojb-blank structure, as I use the
> very similar maven structure in my projects and it works fine. I think just
> that I always use it in a web app, and maybe your structure can conflict
> with the same properties files that are inside the jar.
>
> I explain better, and hope this could solve it:
>
> Open the mandragora-0.1-SNAPSHOT.jar you are using for example with winrar
> or winzip.
> Inside it you will see the files log4j.properties, OJB.properties,
> Mandragora.properties, Ojb-logging.properties, repository.dtd and
> repository_internal.xml.
> Delete all of them and try again.
>
> In a tipical web-app structure this files don't go in the conflict, (anyway
> are totally useless, they are there for a mistake of the jar packaging
> process). In the Ojb.properties there it sets
>
> *repositoryFile=repository.xml*
>
> So it could be that Ojb read this file  it expects in the same directory the
> repository.xml.
>
> Deleting mandragora.jar it reads the proper file and works.
>
> So please try * *to delete all of them from the inside the jar
>
> Regards
>
> Alessandro
>
>
>
>
>
>
>
>
>
>
>
> On 9/13/07, Hans Novak <hn...@repcom.de> wrote:
>   
>> Hi,
>>
>>
>> When i add the mandragora jar to my project and start my standard main
>> class, i get this error when calling:
>>
>> broker = PersistenceBrokerFactory.defaultPersistenceBroker();
>>
>> org.apache.ojb.broker.PBFactoryException: There was no
>> 'default-connection' attribute enabled in the jdbc connection descriptor
>>    at
>>
>> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
>> (Unknown
>> Source)
>>    at
>> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
>> (Unknown
>> Source)
>>    at
>> de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(
>> PartnerFactoryCore.java:30)
>>    at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java
>> :52)
>>    at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java
>> :42)
>>    at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java:28)
>>
>> when i remove the madragora jar from my project, it works fine.
>> Every other files, prperties, etc are untouched.
>> It seems like, that mandragora search the repositories on the wrong dir
>> and change my system settings also.
>>
>>     
>>> Can you tell me how  do you lookup the persistence broker in your app?
>>> Mandragora just do:
>>> broker=PersistenceBrokerFactory.defaultPersistenceBroker();
>>> To use the three file for the repository is not a problem. I use too
>>>       
>> except
>>     
>>> the repository- user
>>> I keep waiting  your news
>>>
>>>       
>> i think it very important, that the ojb-blank project have a - i will it
>> call - "unusual" directory structure and according to this my project
>> too (i wrote it in the last mail)
>> It is very important for me, that i can use the hole ojb-blank project
>> with the buld file, to generate all neede files etc., because in
>> development phase we change often times the database structure or
>> similar and dont want to change all related prperties.
>>
>> I had not the time, to make a new Project, to test it and i dont have a
>> web-development enviroment here.
>> so i can sadly only help and test on standard java apps ... ;-)
>>
>> if you find the time, get the ojb_blank projekt and try to merge it with
>> mandragora.
>>
>> if you like, i can send you my hole app without jars etc as zip to your
>> email - the finel app would be opensource, so no problem :-)
>>
>> Hans
>>
>>     


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


Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Ok!
I will start using it with ojb-blank and if I fail I will ask you for your
app.


Anyway I think that the problem is not the ojb-blank structure, as I use the
very similar maven structure in my projects and it works fine. I think just
that I always use it in a web app, and maybe your structure can conflict
with the same properties files that are inside the jar.

I explain better, and hope this could solve it:

Open the mandragora-0.1-SNAPSHOT.jar you are using for example with winrar
or winzip.
Inside it you will see the files log4j.properties, OJB.properties,
Mandragora.properties, Ojb-logging.properties, repository.dtd and
repository_internal.xml.
Delete all of them and try again.

In a tipical web-app structure this files don't go in the conflict, (anyway
are totally useless, they are there for a mistake of the jar packaging
process). In the Ojb.properties there it sets

*repositoryFile=repository.xml*

So it could be that Ojb read this file  it expects in the same directory the
repository.xml.

Deleting mandragora.jar it reads the proper file and works.

So please try * *to delete all of them from the inside the jar

Regards

Alessandro











On 9/13/07, Hans Novak <hn...@repcom.de> wrote:
>
> Hi,
>
>
> When i add the mandragora jar to my project and start my standard main
> class, i get this error when calling:
>
> broker = PersistenceBrokerFactory.defaultPersistenceBroker();
>
> org.apache.ojb.broker.PBFactoryException: There was no
> 'default-connection' attribute enabled in the jdbc connection descriptor
>    at
>
> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
> (Unknown
> Source)
>    at
> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
> (Unknown
> Source)
>    at
> de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(
> PartnerFactoryCore.java:30)
>    at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java
> :52)
>    at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java
> :42)
>    at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java:28)
>
> when i remove the madragora jar from my project, it works fine.
> Every other files, prperties, etc are untouched.
> It seems like, that mandragora search the repositories on the wrong dir
> and change my system settings also.
>
> > Can you tell me how  do you lookup the persistence broker in your app?
> > Mandragora just do:
> > broker=PersistenceBrokerFactory.defaultPersistenceBroker();
> > To use the three file for the repository is not a problem. I use too
> except
> > the repository- user
> > I keep waiting  your news
> >
> i think it very important, that the ojb-blank project have a - i will it
> call - "unusual" directory structure and according to this my project
> too (i wrote it in the last mail)
> It is very important for me, that i can use the hole ojb-blank project
> with the buld file, to generate all neede files etc., because in
> development phase we change often times the database structure or
> similar and dont want to change all related prperties.
>
> I had not the time, to make a new Project, to test it and i dont have a
> web-development enviroment here.
> so i can sadly only help and test on standard java apps ... ;-)
>
> if you find the time, get the ojb_blank projekt and try to merge it with
> mandragora.
>
> if you like, i can send you my hole app without jars etc as zip to your
> email - the finel app would be opensource, so no problem :-)
>
> Hans
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
Hi,


When i add the mandragora jar to my project and start my standard main 
class, i get this error when calling:

broker = PersistenceBrokerFactory.defaultPersistenceBroker();   

org.apache.ojb.broker.PBFactoryException: There was no 
'default-connection' attribute enabled in the jdbc connection descriptor
    at 
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown 
Source)
    at 
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown 
Source)
    at 
de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(PartnerFactoryCore.java:30)
    at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java:52)
    at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java:42)
    at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java:28)

when i remove the madragora jar from my project, it works fine.
Every other files, prperties, etc are untouched.
It seems like, that mandragora search the repositories on the wrong dir 
and change my system settings also.

> Can you tell me how  do you lookup the persistence broker in your app?
> Mandragora just do:
> broker=PersistenceBrokerFactory.defaultPersistenceBroker();
> To use the three file for the repository is not a problem. I use too except
> the repository- user
> I keep waiting  your news
>   
i think it very important, that the ojb-blank project have a - i will it 
call - "unusual" directory structure and according to this my project 
too (i wrote it in the last mail)
It is very important for me, that i can use the hole ojb-blank project 
with the buld file, to generate all neede files etc., because in 
development phase we change often times the database structure or 
similar and dont want to change all related prperties.

I had not the time, to make a new Project, to test it and i dont have a 
web-development enviroment here.
so i can sadly only help and test on standard java apps ... ;-)

if you find the time, get the ojb_blank projekt and try to merge it with 
mandragora.

if you like, i can send you my hole app without jars etc as zip to your 
email - the finel app would be opensource, so no problem :-)

Hans





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


Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi Hans,

you get an error on your application or on Mandragora?

I understand that you start your application without mandragora.jar and all
is ok
then add the mandragora.jar  in your classpath , use it to test , and is ok.
then you remove mandragora. jar to go back your main app and is all ok.


But

 if you start your app with mandragora.jar in classpath is ok or get an
error in your main app too?
 you go to the test of mandragora and get the error,
 you back to your main application and get error or not?


Can you tell me how  do you lookup the persistence broker in your app?

Mandragora just do:

broker=PersistenceBrokerFactory.defaultPersistenceBroker();

To use the three file for the repository is not a problem. I use too except
the repository- user

I keep waiting  your news



On 9/13/07, Hans Novak <hn...@repcom.de> wrote:
>
> Hi Allesandro,
>
> first of all 2. questions:
> if it works together with ojb, why i get an error, if i want to start my
> standard app, when mandragora.jar is included in classpath of my app ?
> (everything else is like it was).
>
> I get an "no default-connection" error. I must alway add the lib, if i
> want to test it and remove it, when developing on the main app (its not
> nice)
>
> 2nd, it must be a problem with the path. ojb_blank projekt have 3
> additional xml files,
> repository.xml,                   // the file, who describes the 3
> following xml files)
> repository_user.xml           // my database
> repository_database.xml   // the database  props
> default-connection="true" are existing
> repository_internal.xml     //the ojb hi low seuenzer
>
>
> I use the ojb blank project with ant also to generate the xml files ans
> other things.
> the path structure of ojb_blank are:
>
> ./                 //root dir with OJB.properties needed by ojb_blank
> and ant
> ./lib            // alle needed libs
> ./src/java   //java classes
> ./build                  // the build dir with the xml files like above
> and things like the dtd, file, log4j.properties etc.
> ./build/database //the sql generation and xml files
>
>
> there are much more dirs, but not important to mandragora, i think.
>
>
> Hans
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
Hi Allesandro,

first of all 2. questions:
if it works together with ojb, why i get an error, if i want to start my 
standard app, when mandragora.jar is included in classpath of my app ? 
(everything else is like it was).

I get an "no default-connection" error. I must alway add the lib, if i 
want to test it and remove it, when developing on the main app (its not 
nice)

2nd, it must be a problem with the path. ojb_blank projekt have 3 
additional xml files,
repository.xml,                   // the file, who describes the 3 
following xml files)
repository_user.xml           // my database
repository_database.xml   // the database  props          
default-connection="true" are existing
repository_internal.xml     //the ojb hi low seuenzer


I use the ojb blank project with ant also to generate the xml files ans 
other things.
the path structure of ojb_blank are:

./                 //root dir with OJB.properties needed by ojb_blank 
and ant
./lib            // alle needed libs
./src/java   //java classes
./build                  // the build dir with the xml files like above 
and things like the dtd, file, log4j.properties etc.
./build/database //the sql generation and xml files


there are much more dirs, but not important to mandragora, i think.


Hans

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


Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
HI,
YES of course that they could work together.
Mandragora can be seen as just a collection of reusable methods using Ojb.
So where you want you can use them, and where not you use your methods as
you like.

Up now all methods of the Ojb DAO use the defaultPersistenceBroker().
So in your repository.xml you have in the jdbc-connection-descriptor you
have to put

<jdbc-connection-descriptor jcd-alias="default" default-connection="true"
........

If for some reason you are using an other jdbc-alias, I think that just
putting     ...default-connection="true"... should be enough.

Anyway you passed all Mandragora configuration step and you arrived to use
the mehod of the DAO.
So this last error is an error of Ojb configuration, surly we solve it, or
in this forum we get help.

On 9/13/07, Hans Novak <hn...@repcom.de> wrote:
>
> Ok, i understand.
> But is it possible, that madragora works together with ojb in the same
> project ?
> My app is very big and i dont want to change everything now.
> The idea was, that new code can use mandragora and the old code will be
> changed step by step later.
>
>
> however, the code ist now:
>        try {
>            BD bd =
> ServiceLocator.getInstance
> ().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
>            bd.findByPrimaryKey(Partner.class,"Repcom");
>            //this class is persistant in db with data
>        } catch (ApplicationException e) {
>        }
>
>
> i get now this error (all libs are included, prop file are in the same
> dir as repository.xml, the other files in class dir from blank i have
> already:
>
> [INFO] SimpleThreadPool - Job execution threads will use class loader of
> thread: main
> [INFO] RAMJobStore - RAMJobStore initialized.
> [INFO] StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler'
> initialized from default resource file in Quartz package: 'quartz.pro
> perties'
> [INFO] StdSchedulerFactory - Quartz scheduler version: 1.4.5
> [BOOT] INFO: -- boot log messages -->
> [BOOT] INFO: Loading OJB's properties:
>
> jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/nadragora-lib/mandragora-
> 0.1-20070912.204127-17
> .jar!/Mandragora.properties
> [BOOT] INFO: Loading OJB's properties:
>
> jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/nadragora-lib/mandragora-
> 0.1-20070912.204127-17
> .jar!/OJB.properties
> [BOOT] INFO: Found logging properties file: OJB-logging.properties
> [BOOT] INFO: Logging: Found logger class
> 'org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
>
> org.apache.ojb.broker.PBFactoryException: There was no
> 'default-connection' attribute enabled in the jdbc connection descriptor
>    at
>
> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
> (Unknown
> Source)
>    at
> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
> (Unknown
> Source)
>    at
> it.aco.mandragora.common.ServiceLocator.findBroker(ServiceLocator.java
> :451)
>    at
> it.aco.mandragora.dao.ojb.pb.OjbPbDAO.findByPrimaryKey(OjbPbDAO.java:453)
>    at
> it.aco.mandragora.bd.standard.StandardManagerBD.findByPrimaryKey(
> StandardManagerBD.java:442)
>    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:28)
>    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:19)
>    at de.repcom.osfaktura.aStartups.Test.main(Test.java:16)
> 0     ERROR [main] pb.OjbPbDAO - ServiceLocatorException thrown in
> OjbPbDAO.findByPrimaryKey(Class realClass, java.lang.Object pkValue): it
> .aco.mandragora.exception.ServiceLocatorException: PBFactoryException
> error occurred while parsing the repository.xml file in ServiceLocator
> .findBroker()
>
>
>
>
> Hans
>
> Alessandro Colantoni schrieb:
> > Hi Hans.
> >
> > Yes you have to add lots of jar.
> > You can see the dependencies here
> >
> > http://mandragora.sourceforge.net/dependencies.html
> >
> >
> > Then you have to add the Mandragora.properties file to your classpath.
> >
> > Anyway you find all jar you need int the mandragora-blank.zip.
> >
> > 1 open mandrgora-blank.zip;
> > 2 in Web-Inf/lib you have all the jar you need.
> > 3 in Web-inf/classes you find the Mandragora.properties. Put it in your
> > classpath, (in the same directory of your repository.xml). You can see
> other
> > properies files, add the log4.properties if you have not already yours
> (but
> > I think you have). The other file I think you already have in your
> > classpath, if so don't add.
> >
> > Here
> > http://mandragora.sourceforge.net/quickstart.html
> >
> > there is a quick start, but I wrote it thinking at web-app. I will
> change
> > it.
> >
> > I always work with web-app. So I will appreciate if , when you make it
> work
> > , write a small quickstart for Swing.
> >
> > I keep here to help.
> >
> > Regards
> >
> >
> > On 9/13/07, Hans Novak <hn...@repcom.de> wrote:
> >
> >> Alessandro Colantoni schrieb:
> >>
> >>> HI, I upload a new release and improved a bit documentation.
> >>> I solved (I think) the problem noticed by Hans, so it is not need put
> >>>
> >> the
> >>
> >>> quartz servlet in the web.xml, and it should work in no web
> application.
> >>>
> >> I
> >>
> >>> hope this helps you Hans.
> >>>
> >>>
> >> Hi Alessandro,
> >>
> >> i have try the new Version, but the same Problem.
> >> The Code was only:
> >>        try {
> >>            BD bd =
> >> ServiceLocator.getInstance
> >> ().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
> >>        } catch (ApplicationException e) {
> >>            //manage the exception
> >>        }
> >>
> >>
> >> Exception in thread "main" java.lang.NoClassDefFoundError:
> >> org/quartz/SchedulerException
> >>    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:22)
> >>    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:15)
> >>    at de.repcom.osfaktura.aStartups.Test.main(Test.java:12)
> >>
> >> When i start my standard App with the Mandragora jar addedd, then i get
> >> this error:
> >>
> >>
> >> osf] INFO : AppStart
> >> [BOOT] INFO: -- boot log messages -->
> >> [BOOT] INFO: Loading OJB's properties:
> >> jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/mandragora-
> >> 0.1-20070912.204127-17.jar!/OJB.prop
> >> erties
> >> [BOOT] INFO: Found logging properties file: OJB-logging.properties
> >> [BOOT] INFO: Logging: Found logger class
> >> 'org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
> >>
> >> Exception in thread "main" org.apache.ojb.broker.PBFactoryException:
> >> There was no 'default-connection' attribute enabled in the jdbc connect
> >> ion descriptor
> >>    at
> >>
> >>
> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
> >> (Unknown
> >> Source)
> >>    at
> >> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
> >> (Unknown
> >> Source)
> >>    at
> >> de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(
> >> PartnerFactoryCore.java:28)
> >>    at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java
> >> :50)
> >>    at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java
> >> :43)
> >>    at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java
> :29)
> >>
> >>
> >> Do i need any jar of yor "blank" project into my ojb_blank projekt
> (more
> >> then the mandragora jar) ?
> >> Your Project looks good to me, have intresting features, what can help
> >> me to minimize complexity of code.
> >> Hope you can help :-)
> >>
> >> Hans
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >> For additional commands, e-mail: ojb-user-help@db.apache.org
> >>
> >>
> >>
> >
> >
>
> --
>
>
>
> ------------------------------------------------------------------------
>
>
> Repcom Datentechnik GmbH <http://www.repcom.de/>
> Hauptstr. 103 - 63110 Rodgau
> Tel. 06106-638081
> Fax 06106-638083
> Steuernummer 03524225030
> Ust-IdNr.: DE151061445  Bankverbindung:
> Deutsche Bank Dietzenbach,
> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
>
> Internationale  Zahlungen
> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
> de54505700240151030400 BIC deutdedb538
> Öffnungszeiten:
> Mo.-Fr. 14.00-18.30 Uhr
> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
> Sie finden uns hier: Anfahrtsbeschreibung
> <http://www.repcom.de/images/repcom/anfahrt.jpg>
> Messenger
> Yahoo
> ICQ
>        : bforpc
> : 174290900
>        MSN
> Skype
>        : bforpc@hotmail.com
> : bforpc
>
> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
> und   www.dataportal.de <http://www.dataportal.de/>
>
> Unsere AGB's finden Sie hier
> <http://www.repcom.de/index.php?main_page=conditions>.
>
> Vertraulichkeitshinweis
> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so
> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
> in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail
> nebst Anhängen und aller Kopien.
>
>
> ------------------------------------------------------------------------
>
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
Ok, i understand.
But is it possible, that madragora works together with ojb in the same 
project ?
My app is very big and i dont want to change everything now.
The idea was, that new code can use mandragora and the old code will be 
changed step by step later.


however, the code ist now:
        try {
            BD bd = 
ServiceLocator.getInstance().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
            bd.findByPrimaryKey(Partner.class,"Repcom");
            //this class is persistant in db with data
        } catch (ApplicationException e) {
        }


i get now this error (all libs are included, prop file are in the same 
dir as repository.xml, the other files in class dir from blank i have 
already:

[INFO] SimpleThreadPool - Job execution threads will use class loader of 
thread: main
[INFO] RAMJobStore - RAMJobStore initialized.
[INFO] StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' 
initialized from default resource file in Quartz package: 'quartz.pro
perties'
[INFO] StdSchedulerFactory - Quartz scheduler version: 1.4.5
[BOOT] INFO: -- boot log messages -->
[BOOT] INFO: Loading OJB's properties: 
jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/nadragora-lib/mandragora-0.1-20070912.204127-17
.jar!/Mandragora.properties
[BOOT] INFO: Loading OJB's properties: 
jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/nadragora-lib/mandragora-0.1-20070912.204127-17
.jar!/OJB.properties
[BOOT] INFO: Found logging properties file: OJB-logging.properties
[BOOT] INFO: Logging: Found logger class 
'org.apache.ojb.broker.util.logging.PoorMansLoggerImpl

org.apache.ojb.broker.PBFactoryException: There was no 
'default-connection' attribute enabled in the jdbc connection descriptor
    at 
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown 
Source)
    at 
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown 
Source)
    at 
it.aco.mandragora.common.ServiceLocator.findBroker(ServiceLocator.java:451)
    at 
it.aco.mandragora.dao.ojb.pb.OjbPbDAO.findByPrimaryKey(OjbPbDAO.java:453)
    at 
it.aco.mandragora.bd.standard.StandardManagerBD.findByPrimaryKey(StandardManagerBD.java:442)
    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:28)
    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:19)
    at de.repcom.osfaktura.aStartups.Test.main(Test.java:16)
0     ERROR [main] pb.OjbPbDAO - ServiceLocatorException thrown in  
OjbPbDAO.findByPrimaryKey(Class realClass, java.lang.Object pkValue): it
.aco.mandragora.exception.ServiceLocatorException: PBFactoryException 
error occurred while parsing the repository.xml file in ServiceLocator
.findBroker()




Hans

Alessandro Colantoni schrieb:
> Hi Hans.
>
> Yes you have to add lots of jar.
> You can see the dependencies here
>
> http://mandragora.sourceforge.net/dependencies.html
>
>
> Then you have to add the Mandragora.properties file to your classpath.
>
> Anyway you find all jar you need int the mandragora-blank.zip.
>
> 1 open mandrgora-blank.zip;
> 2 in Web-Inf/lib you have all the jar you need.
> 3 in Web-inf/classes you find the Mandragora.properties. Put it in your
> classpath, (in the same directory of your repository.xml). You can see other
> properies files, add the log4.properties if you have not already yours (but
> I think you have). The other file I think you already have in your
> classpath, if so don't add.
>
> Here
> http://mandragora.sourceforge.net/quickstart.html
>
> there is a quick start, but I wrote it thinking at web-app. I will change
> it.
>
> I always work with web-app. So I will appreciate if , when you make it work
> , write a small quickstart for Swing.
>
> I keep here to help.
>
> Regards
>
>
> On 9/13/07, Hans Novak <hn...@repcom.de> wrote:
>   
>> Alessandro Colantoni schrieb:
>>     
>>> HI, I upload a new release and improved a bit documentation.
>>> I solved (I think) the problem noticed by Hans, so it is not need put
>>>       
>> the
>>     
>>> quartz servlet in the web.xml, and it should work in no web application.
>>>       
>> I
>>     
>>> hope this helps you Hans.
>>>
>>>       
>> Hi Alessandro,
>>
>> i have try the new Version, but the same Problem.
>> The Code was only:
>>        try {
>>            BD bd =
>> ServiceLocator.getInstance
>> ().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
>>        } catch (ApplicationException e) {
>>            //manage the exception
>>        }
>>
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/quartz/SchedulerException
>>    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:22)
>>    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:15)
>>    at de.repcom.osfaktura.aStartups.Test.main(Test.java:12)
>>
>> When i start my standard App with the Mandragora jar addedd, then i get
>> this error:
>>
>>
>> osf] INFO : AppStart
>> [BOOT] INFO: -- boot log messages -->
>> [BOOT] INFO: Loading OJB's properties:
>> jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/mandragora-
>> 0.1-20070912.204127-17.jar!/OJB.prop
>> erties
>> [BOOT] INFO: Found logging properties file: OJB-logging.properties
>> [BOOT] INFO: Logging: Found logger class
>> 'org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
>>
>> Exception in thread "main" org.apache.ojb.broker.PBFactoryException:
>> There was no 'default-connection' attribute enabled in the jdbc connect
>> ion descriptor
>>    at
>>
>> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
>> (Unknown
>> Source)
>>    at
>> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
>> (Unknown
>> Source)
>>    at
>> de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(
>> PartnerFactoryCore.java:28)
>>    at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java
>> :50)
>>    at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java
>> :43)
>>    at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java:29)
>>
>>
>> Do i need any jar of yor "blank" project into my ojb_blank projekt (more
>> then the mandragora jar) ?
>> Your Project looks good to me, have intresting features, what can help
>> me to minimize complexity of code.
>> Hope you can help :-)
>>
>> Hans
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>     
>
>   

-- 


	
------------------------------------------------------------------------

	
Repcom Datentechnik GmbH <http://www.repcom.de/>
Hauptstr. 103 - 63110 Rodgau
Tel. 06106-638081
Fax 06106-638083
Steuernummer 03524225030 
Ust-IdNr.: DE151061445 	Bankverbindung:
Deutsche Bank Dietzenbach,
Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik

Internationale  Zahlungen
Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
de54505700240151030400 BIC deutdedb538
Öffnungszeiten: 
Mo.-Fr. 14.00-18.30 Uhr 
Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
Sie finden uns hier: Anfahrtsbeschreibung 
<http://www.repcom.de/images/repcom/anfahrt.jpg> 	
Messenger
Yahoo
ICQ
	: bforpc
: 174290900
	MSN
Skype
	: bforpc@hotmail.com
: bforpc

Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/> 
  und   www.dataportal.de <http://www.dataportal.de/> 	

Unsere AGB's finden Sie hier 
<http://www.repcom.de/index.php?main_page=conditions>. 

Vertraulichkeitshinweis
Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist 
vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn 
Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so 
beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung, 
Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts 
nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie 
in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail 
nebst Anhängen und aller Kopien.

	
------------------------------------------------------------------------



Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi Hans.

Yes you have to add lots of jar.
You can see the dependencies here

http://mandragora.sourceforge.net/dependencies.html


Then you have to add the Mandragora.properties file to your classpath.

Anyway you find all jar you need int the mandragora-blank.zip.

1 open mandrgora-blank.zip;
2 in Web-Inf/lib you have all the jar you need.
3 in Web-inf/classes you find the Mandragora.properties. Put it in your
classpath, (in the same directory of your repository.xml). You can see other
properies files, add the log4.properties if you have not already yours (but
I think you have). The other file I think you already have in your
classpath, if so don't add.

Here
http://mandragora.sourceforge.net/quickstart.html

there is a quick start, but I wrote it thinking at web-app. I will change
it.

I always work with web-app. So I will appreciate if , when you make it work
, write a small quickstart for Swing.

I keep here to help.

Regards


On 9/13/07, Hans Novak <hn...@repcom.de> wrote:
>
> Alessandro Colantoni schrieb:
> > HI, I upload a new release and improved a bit documentation.
> > I solved (I think) the problem noticed by Hans, so it is not need put
> the
> > quartz servlet in the web.xml, and it should work in no web application.
> I
> > hope this helps you Hans.
> >
>
> Hi Alessandro,
>
> i have try the new Version, but the same Problem.
> The Code was only:
>        try {
>            BD bd =
> ServiceLocator.getInstance
> ().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
>        } catch (ApplicationException e) {
>            //manage the exception
>        }
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/quartz/SchedulerException
>    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:22)
>    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:15)
>    at de.repcom.osfaktura.aStartups.Test.main(Test.java:12)
>
> When i start my standard App with the Mandragora jar addedd, then i get
> this error:
>
>
> osf] INFO : AppStart
> [BOOT] INFO: -- boot log messages -->
> [BOOT] INFO: Loading OJB's properties:
> jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/mandragora-
> 0.1-20070912.204127-17.jar!/OJB.prop
> erties
> [BOOT] INFO: Found logging properties file: OJB-logging.properties
> [BOOT] INFO: Logging: Found logger class
> 'org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
>
> Exception in thread "main" org.apache.ojb.broker.PBFactoryException:
> There was no 'default-connection' attribute enabled in the jdbc connect
> ion descriptor
>    at
>
> org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker
> (Unknown
> Source)
>    at
> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker
> (Unknown
> Source)
>    at
> de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(
> PartnerFactoryCore.java:28)
>    at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java
> :50)
>    at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java
> :43)
>    at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java:29)
>
>
> Do i need any jar of yor "blank" project into my ojb_blank projekt (more
> then the mandragora jar) ?
> Your Project looks good to me, have intresting features, what can help
> me to minimize complexity of code.
> Hope you can help :-)
>
> Hans
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
Alessandro Colantoni schrieb:
> HI, I upload a new release and improved a bit documentation.
> I solved (I think) the problem noticed by Hans, so it is not need put the
> quartz servlet in the web.xml, and it should work in no web application. I
> hope this helps you Hans.
>   

Hi Alessandro,

i have try the new Version, but the same Problem.
The Code was only:
        try {
            BD bd = 
ServiceLocator.getInstance().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
        } catch (ApplicationException e) {
            //manage the exception
        }


Exception in thread "main" java.lang.NoClassDefFoundError: 
org/quartz/SchedulerException
    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:22)
    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:15)
    at de.repcom.osfaktura.aStartups.Test.main(Test.java:12)

When i start my standard App with the Mandragora jar addedd, then i get 
this error:


osf] INFO : AppStart
[BOOT] INFO: -- boot log messages -->
[BOOT] INFO: Loading OJB's properties: 
jar:file:/home/hnovak/eclipse-workspace/osfaktura/lib/mandragora-0.1-20070912.204127-17.jar!/OJB.prop
erties
[BOOT] INFO: Found logging properties file: OJB-logging.properties
[BOOT] INFO: Logging: Found logger class 
'org.apache.ojb.broker.util.logging.PoorMansLoggerImpl

Exception in thread "main" org.apache.ojb.broker.PBFactoryException: 
There was no 'default-connection' attribute enabled in the jdbc connect
ion descriptor
    at 
org.apache.ojb.broker.core.PersistenceBrokerFactoryBaseImpl.defaultPersistenceBroker(Unknown 
Source)
    at 
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unknown 
Source)
    at 
de.repcom.osfaktura.core.db.PartnerFactoryCore.<init>(PartnerFactoryCore.java:28)
    at de.repcom.osfaktura.gui.partner.PartnerFrm.<init>(PartnerFrm.java:50)
    at de.repcom.osfaktura.aStartups.PartnerCore.<init>(PartnerCore.java:43)
    at de.repcom.osfaktura.aStartups.PartnerCore.main(PartnerCore.java:29)


Do i need any jar of yor "blank" project into my ojb_blank projekt (more 
then the mandragora jar) ?
Your Project looks good to me, have intresting features, what can help 
me to minimize complexity of code.
Hope you can help :-)

Hans

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


Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
HI, I upload a new release and improved a bit documentation.
I solved (I think) the problem noticed by Hans, so it is not need put the
quartz servlet in the web.xml, and it should work in no web application. I
hope this helps you Hans.

About the post of Sergey, yes at the beginning Mandragora was just a layer
on top of Persistence Broker, then with business delegate I have done a kind
a façade to simplify Ojb Apis.
Now it implements a kind of chain BD ---> DAO ---> Ojb ---> RDBMS where BD
and DAO are interfaces and in a property file called
Mandragora.propertiesyou choose their implementations.
Up now just Ojb persistence broker implementation of DAO exists, because it
is the only I worked with.
Anyway I think could be easily written implementations with ODMG, JDO and
OTM .
I 'd appreciate a lot if some of you look above all at the existing DAO
implementation to suggest how to improve performance of the methods, and
suggest more useful ones to add.

I already used a lot Mandragora, and you can be sure that if you have
already implemented lots of methods you save more than the 50-60% of
development time, above all if you think that having your BD and DAO yet
almost developed and tested you reduce the errors, so testing and and
writing patches time, and making more easy the maintenance. Then if you have
a small team of 4-5 developers, with a low profile, it is much more easy to
control them and teaching them.

I hope some of the Ojb community help

Regards
Alessandro Colantoni



On 9/12/07, Manukyan, Sergey <SM...@lear.com> wrote:
>
>
> Hi,
>
> About mandragora... it looks like it is a layer on top of
> PerstenceBroker... my suggestion would be why not to integrate it into OJB
> and call it something like Simplified API for Persistance Broker (SAP)... ?
>
> It will help improve OJB in the next releases. As frankly speaking I see a
> need in it, as I myself developed some kind of OJB façade class that
> simplifies OJB operations with a simplified API.
>
> Just my 2 cents,
>
> -Sergey
>
>
>
> -----Original Message-----
> From: Alessandro Colantoni [mailto:alessandro.colantoni@gmail.com]
> Sent: Wednesday, September 12, 2007 7:19 AM
> To: OJB Users List
> Subject: Re: storing objects
>
> Hi!
> Mandragora is not part of the ojb project, but up now it is based on it
> and
> use Ojb Persistence broker as persistence engine.
> It is just a small project to provide you lots of the must common business
> and Dao methods.
> Just have a look. I hope improve documentation soon. Anyway it provides
> you
> a very easy mechanism based on Factory pattern to write and use your
> methods.
> If you download it you have these methods available, and can add yours to
> have a library very easy to reuse, and if you want, to share
> The future? I'm the only one in the team up now, and I will give you all
> support i can.
> Anyway don't look at it as a big and complicate project that if a day
> close
> you get in trouble.
> Mandragora want just to be a set of reusable business and Dao methods
> (based
> on ojb).
> For example I had the same problem of you with trees, or collection. You
> solved it writing your own method to delete object in the database not
> present in your reference collection. I solved it with a generic method,
> so
> I will use it again and again.
> You can write other methods and sharing
>
>
> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
> >
> > aha .....!?
> > Hmmmm... is the "mandragora" Project a part of the ojb project ?
> > How looks ist for the future with it ?
> > I ask this, because, i dontwant to use it and sometime it will be
> > cancel'ed.
> >
> >
> > Hans
> >
> >
> >
> > Alessandro Colantoni schrieb:
> > > Hi
> > > Yes it is normal.
> > > When you have a main object that has a collection attribute, Ojb works
> > just
> > > on value objects that are in the collection.
> > >
> > > I developed a framework based on Ojb called mandragora (
> > > http://mandragora.sourceforge.net) that provides lots of method that
> can
> > > help.
> > >
> > > The methods updateCollectionReference, updateCollectionReferences and
> > > updateCreateTrees do just what you need
> > >
> > > http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html
> > >
> > > Have a look. Documentation is very poor but in the following days I
> will
> > > upload something more
> > >
> > > I hope this can help
> > >
> > > Best Regards
> > > Alessandro
> > >
> > >
> > >
> > > On 9/12/07, Alessandro Colantoni <al...@gmail.com>
> wrote:
> > >
> > >>
> > >> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
> > >>
> > >>> Hi,
> > >>>
> > >>> i am not shure, but is ist correct when i have an object, witch is a
> > >>> tree of some other objects (colletions) and i delete a part of the
> > tree
> > >>> and then store the hole object (tree) - in the database the deleted
> > >>> object will also be deleted ?
> > >>>
> > >>> Everything works fine, when i store or update the object, but not
> when
> > i
> > >>> delete.
> > >>> The deleted part of the object will not be deleted in the database.
> I
> > >>> can remove it by hand, when i run a remove.object  (the part of the
> > >>> tree) and then store the (changed) tree.
> > >>>
> > >>> Is this normal ?
> > >>>
> > >>>
> > >>> Hans
> > >>>
> > >>>
> > >>>
> > >>>
> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > >>> For additional commands, e-mail: ojb-user-help@db.apache.org
> > >>>
> > >>>
> > >>>
> > >
> > >
> >
> > --
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > Repcom Datentechnik GmbH <http://www.repcom.de/>
> > Hauptstr. 103 - 63110 Rodgau
> > Tel. 06106-638081
> > Fax 06106-638083
> > Steuernummer 03524225030
> > Ust-IdNr.: DE151061445  Bankverbindung:
> > Deutsche Bank Dietzenbach,
> > Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
> >
> > Internationale  Zahlungen
> > Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
> > de54505700240151030400 BIC deutdedb538
> > Öffnungszeiten:
> > Mo.-Fr. 14.00-18.30 Uhr
> > Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
> > Sie finden uns hier: Anfahrtsbeschreibung
> > <http://www.repcom.de/images/repcom/anfahrt.jpg>
> > Messenger
> > Yahoo
> > ICQ
> >        : bforpc
> > : 174290900
> >        MSN
> > Skype
> >        : bforpc@hotmail.com
> > : bforpc
> >
> > Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
> > und   www.dataportal.de <http://www.dataportal.de/>
> >
> > Unsere AGB's finden Sie hier
> > <http://www.repcom.de/index.php?main_page=conditions>.
> >
> > Vertraulichkeitshinweis
> > Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
> > vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
> > Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so
> > beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
> > Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
> > nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
> > in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail
> > nebst Anhängen und aller Kopien.
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> >
>
> **********************
> ** LEGAL DISCLAIMER **
> **********************
>
> This E-mail message and any attachments may contain
> legally privileged, confidential or proprietary
> information. If you are not the intended recipient(s),
> or the employee or agent responsible for delivery of
> this message to the intended recipient(s), you are
> hereby notified that any dissemination, distribution
> or copying of this E-mail message is strictly
> prohibited. If you have received this message in
> error, please immediately notify the sender and
> delete this E-mail message from your computer.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: storing objects

Posted by Armin Waibel <ar...@apache.org>.
Hi Sergey,

Manukyan, Sergey wrote:
> Hi Armin,
> 
> Can I be included on that list?
>

yep! You only have to subscribe.
http://db.apache.org/ojb/mail-lists.html


> And how to become the developer/contributor of OJB in general?

Everyone can be a developer, all contributors are developer.
http://apache.org/foundation/how-it-works.html#developers

If you have code or documentation to contribute make your suggestion on 
the dev-list. Then we (OJB developer + committer) can discuss whether or 
not to accept the contribution/suggestion.

If a developer constant contributes code/doc, participate in discussions
and help other user on the mail lists a committer can suggest this 
developer to become a committer.

regards,
Armin

> 
> Thanks,
> 
> -Sergey
> 
> 
> 
> -----Original Message-----
> From: Armin Waibel [mailto:arminw@apache.org] 
> Sent: Friday, September 14, 2007 8:00 PM
> To: OJB Users List
> Subject: Re: storing objects
> 
> Hi Sergey,
> 
> Manukyan, Sergey wrote:
>> Hi,
>>
>> About mandragora... it looks like it is a layer on top of
>> PerstenceBroker... my suggestion would be why not to integrate it
>> into OJB and call it something like Simplified API for Persistance
>> Broker (SAP)... ?
>>
> 
> I only checked the methods of the it.aco.mandragora.dao.DAO interface. 
> If OJB user find these methods useful I agree to integrate it (in some 
> way) in OJB. I suggest to discuss the details on the dev-list.
> 
> regards,
> Armin
> 
>> It will help improve OJB in the next releases. As frankly speaking I
>> see a need in it, as I myself developed some kind of OJB façade class
>> that simplifies OJB operations with a simplified API.
>>
>> Just my 2 cents,
>>
>> -Sergey
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> **********************
> ** LEGAL DISCLAIMER **
> **********************
> 
> This E-mail message and any attachments may contain 
> legally privileged, confidential or proprietary 
> information. If you are not the intended recipient(s),
> or the employee or agent responsible for delivery of 
> this message to the intended recipient(s), you are 
> hereby notified that any dissemination, distribution 
> or copying of this E-mail message is strictly 
> prohibited. If you have received this message in 
> error, please immediately notify the sender and 
> delete this E-mail message from your computer.
> 
> ---------------------------------------------------------------------
> 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: storing objects

Posted by "Manukyan, Sergey" <SM...@lear.com>.
Hi Armin,

Can I be included on that list?

And how to become the developer/contributor of OJB in general?

Thanks,

-Sergey



-----Original Message-----
From: Armin Waibel [mailto:arminw@apache.org] 
Sent: Friday, September 14, 2007 8:00 PM
To: OJB Users List
Subject: Re: storing objects

Hi Sergey,

Manukyan, Sergey wrote:
> Hi,
> 
> About mandragora... it looks like it is a layer on top of
> PerstenceBroker... my suggestion would be why not to integrate it
> into OJB and call it something like Simplified API for Persistance
> Broker (SAP)... ?
>

I only checked the methods of the it.aco.mandragora.dao.DAO interface. 
If OJB user find these methods useful I agree to integrate it (in some 
way) in OJB. I suggest to discuss the details on the dev-list.

regards,
Armin

> It will help improve OJB in the next releases. As frankly speaking I
> see a need in it, as I myself developed some kind of OJB façade class
> that simplifies OJB operations with a simplified API.
> 
> Just my 2 cents,
> 
> -Sergey
> 
> 
> 

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


**********************
** LEGAL DISCLAIMER **
**********************

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.

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


RE: getPKEnumerationByQuery()

Posted by Robert Giddings <r....@netcase.co.uk>.
OK, I used getReportQueryIteratorByQuery() and it works.

Thanks,

Rob

-----Original Message-----
From: Armin Waibel [mailto:arminw@apache.org] 
Sent: 18 September 2007 14:07
To: OJB Users List
Subject: Re: getPKEnumerationByQuery()

Hi Robert,

Robert Giddings wrote:
> Hi,
> 
> When using the method getPKEnumerationByQuery() I get the following
> error:
> 
> 
> Caused by: java.util.NoSuchElementException
>         at
> org.apache.ojb.broker.accesslayer.PkEnumeration.nextElement(Unknown S
> ource)
>         at
> com.netcase.database.DAOService.getIdsByPropertyMatch(DAOService.java
> :117)
> 
> Has anyone else had any problems using OJB's Enumeration
implementation?
> As the code that iterates through it is this:
> 
> Enumeration pks = broker.getPKEnumerationByQuery(PrimaryKey.class,
> query);
> 			Collection<Integer> ids = new
> ArrayList<Integer>();
> 			while(pks.hasMoreElements()) {
> 				PrimaryKey pk =
> (PrimaryKey)pks.nextElement();
> 				ids.add(pk.getId());
> 			}
> 
> And I can't see any problem with this code, and so can only conclude
> that the hasMoreElements() or nextElement() method was not implemented
> correctly.

Please check OJB's logging output. Any error log before the 
NoSuchElementException?

By the way, this class is now deprecated because nobody seems to use it.

If you need the PK values to create a user specific PrimaryKey class I 
would recommend (for best performance) a report query to get all PK's.

regards,
Armin

> 
> Thanks,
> 
> Robert Giddings
> 
> 
> ---------------------------------------------------------------------
> 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




-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.487 / Virus Database: 269.13.22/1013 - Release Date:
17/09/2007 13:29



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


Re: getPKEnumerationByQuery()

Posted by Armin Waibel <ar...@apache.org>.
Hi Robert,

Robert Giddings wrote:
> Hi,
> 
> When using the method getPKEnumerationByQuery() I get the following
> error:
> 
> 
> Caused by: java.util.NoSuchElementException
>         at
> org.apache.ojb.broker.accesslayer.PkEnumeration.nextElement(Unknown S
> ource)
>         at
> com.netcase.database.DAOService.getIdsByPropertyMatch(DAOService.java
> :117)
> 
> Has anyone else had any problems using OJB's Enumeration implementation?
> As the code that iterates through it is this:
> 
> Enumeration pks = broker.getPKEnumerationByQuery(PrimaryKey.class,
> query);
> 			Collection<Integer> ids = new
> ArrayList<Integer>();
> 			while(pks.hasMoreElements()) {
> 				PrimaryKey pk =
> (PrimaryKey)pks.nextElement();
> 				ids.add(pk.getId());
> 			}
> 
> And I can't see any problem with this code, and so can only conclude
> that the hasMoreElements() or nextElement() method was not implemented
> correctly.

Please check OJB's logging output. Any error log before the 
NoSuchElementException?

By the way, this class is now deprecated because nobody seems to use it. 
If you need the PK values to create a user specific PrimaryKey class I 
would recommend (for best performance) a report query to get all PK's.

regards,
Armin

> 
> Thanks,
> 
> Robert Giddings
> 
> 
> ---------------------------------------------------------------------
> 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


getPKEnumerationByQuery()

Posted by Robert Giddings <r....@netcase.co.uk>.
Hi,

When using the method getPKEnumerationByQuery() I get the following
error:


Caused by: java.util.NoSuchElementException
        at
org.apache.ojb.broker.accesslayer.PkEnumeration.nextElement(Unknown S
ource)
        at
com.netcase.database.DAOService.getIdsByPropertyMatch(DAOService.java
:117)

Has anyone else had any problems using OJB's Enumeration implementation?
As the code that iterates through it is this:

Enumeration pks = broker.getPKEnumerationByQuery(PrimaryKey.class,
query);
			Collection<Integer> ids = new
ArrayList<Integer>();
			while(pks.hasMoreElements()) {
				PrimaryKey pk =
(PrimaryKey)pks.nextElement();
				ids.add(pk.getId());
			}

And I can't see any problem with this code, and so can only conclude
that the hasMoreElements() or nextElement() method was not implemented
correctly.

Thanks,

Robert Giddings


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


Re: storing objects

Posted by Armin Waibel <ar...@apache.org>.
Hi Sergey,

Manukyan, Sergey wrote:
> Hi,
> 
> About mandragora... it looks like it is a layer on top of
> PerstenceBroker... my suggestion would be why not to integrate it
> into OJB and call it something like Simplified API for Persistance
> Broker (SAP)... ?
>

I only checked the methods of the it.aco.mandragora.dao.DAO interface. 
If OJB user find these methods useful I agree to integrate it (in some 
way) in OJB. I suggest to discuss the details on the dev-list.

regards,
Armin

> It will help improve OJB in the next releases. As frankly speaking I
> see a need in it, as I myself developed some kind of OJB façade class
> that simplifies OJB operations with a simplified API.
> 
> Just my 2 cents,
> 
> -Sergey
> 
> 
> 

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


RE: storing objects

Posted by "Manukyan, Sergey" <SM...@lear.com>.
Hi,

About mandragora... it looks like it is a layer on top of PerstenceBroker... my suggestion would be why not to integrate it into OJB and call it something like Simplified API for Persistance Broker (SAP)... ? 

It will help improve OJB in the next releases. As frankly speaking I see a need in it, as I myself developed some kind of OJB façade class that simplifies OJB operations with a simplified API.

Just my 2 cents,

-Sergey



-----Original Message-----
From: Alessandro Colantoni [mailto:alessandro.colantoni@gmail.com] 
Sent: Wednesday, September 12, 2007 7:19 AM
To: OJB Users List
Subject: Re: storing objects

Hi!
Mandragora is not part of the ojb project, but up now it is based on it and
use Ojb Persistence broker as persistence engine.
It is just a small project to provide you lots of the must common business
and Dao methods.
Just have a look. I hope improve documentation soon. Anyway it provides you
a very easy mechanism based on Factory pattern to write and use your
methods.
If you download it you have these methods available, and can add yours to
have a library very easy to reuse, and if you want, to share
The future? I'm the only one in the team up now, and I will give you all
support i can.
Anyway don't look at it as a big and complicate project that if a day close
you get in trouble.
Mandragora want just to be a set of reusable business and Dao methods (based
on ojb).
For example I had the same problem of you with trees, or collection. You
solved it writing your own method to delete object in the database not
present in your reference collection. I solved it with a generic method, so
I will use it again and again.
You can write other methods and sharing


On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>
> aha .....!?
> Hmmmm... is the "mandragora" Project a part of the ojb project ?
> How looks ist for the future with it ?
> I ask this, because, i dontwant to use it and sometime it will be
> cancel'ed.
>
>
> Hans
>
>
>
> Alessandro Colantoni schrieb:
> > Hi
> > Yes it is normal.
> > When you have a main object that has a collection attribute, Ojb works
> just
> > on value objects that are in the collection.
> >
> > I developed a framework based on Ojb called mandragora (
> > http://mandragora.sourceforge.net) that provides lots of method that can
> > help.
> >
> > The methods updateCollectionReference, updateCollectionReferences and
> > updateCreateTrees do just what you need
> >
> > http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html
> >
> > Have a look. Documentation is very poor but in the following days I will
> > upload something more
> >
> > I hope this can help
> >
> > Best Regards
> > Alessandro
> >
> >
> >
> > On 9/12/07, Alessandro Colantoni <al...@gmail.com> wrote:
> >
> >>
> >> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
> >>
> >>> Hi,
> >>>
> >>> i am not shure, but is ist correct when i have an object, witch is a
> >>> tree of some other objects (colletions) and i delete a part of the
> tree
> >>> and then store the hole object (tree) - in the database the deleted
> >>> object will also be deleted ?
> >>>
> >>> Everything works fine, when i store or update the object, but not when
> i
> >>> delete.
> >>> The deleted part of the object will not be deleted in the database. I
> >>> can remove it by hand, when i run a remove.object  (the part of the
> >>> tree) and then store the (changed) tree.
> >>>
> >>> Is this normal ?
> >>>
> >>>
> >>> Hans
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >>> For additional commands, e-mail: ojb-user-help@db.apache.org
> >>>
> >>>
> >>>
> >
> >
>
> --
>
>
>
> ------------------------------------------------------------------------
>
>
> Repcom Datentechnik GmbH <http://www.repcom.de/>
> Hauptstr. 103 - 63110 Rodgau
> Tel. 06106-638081
> Fax 06106-638083
> Steuernummer 03524225030
> Ust-IdNr.: DE151061445  Bankverbindung:
> Deutsche Bank Dietzenbach,
> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
>
> Internationale  Zahlungen
> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
> de54505700240151030400 BIC deutdedb538
> Öffnungszeiten:
> Mo.-Fr. 14.00-18.30 Uhr
> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
> Sie finden uns hier: Anfahrtsbeschreibung
> <http://www.repcom.de/images/repcom/anfahrt.jpg>
> Messenger
> Yahoo
> ICQ
>        : bforpc
> : 174290900
>        MSN
> Skype
>        : bforpc@hotmail.com
> : bforpc
>
> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
> und   www.dataportal.de <http://www.dataportal.de/>
>
> Unsere AGB's finden Sie hier
> <http://www.repcom.de/index.php?main_page=conditions>.
>
> Vertraulichkeitshinweis
> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so
> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
> in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail
> nebst Anhängen und aller Kopien.
>
>
> ------------------------------------------------------------------------
>
>
>

**********************
** LEGAL DISCLAIMER **
**********************

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.

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


Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
Sorry, i dont have any web app. My programm ist a application - standard 
Java Swing :-)

Hans

Alessandro Colantoni schrieb:
> Hi Hans,
> No Mandragora doesn't need to know the ojb_blank structure.
>
> I think you have to add this to your web.xml
>
> <servlet>
>         <servlet-name>QuartzInitializer</servlet-name>
>         <display-name>Quartz Initializer Servlet</display-name>
>         <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet
> </servlet-class>
>         <load-on-startup>1</load-on-startup>
>
>     <init-param>
>           <param-name>shutdown-on-unload</param-name>
>           <param-value>true</param-value>
>         </init-param>
>
>     <init-param>
>           <param-name>start-scheduler-on-load</param-name>
>           <param-value>true</param-value>
>         </init-param>
>
>     </servlet>
> That's why the ServiceLocator instance always the Quartz Scheduler Service.
> I will modify it to not instance it if not explicitly invoked
>
>
> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>   
>> Hi,
>>
>> i have try your project. I have merged it with the ojb_blank project.
>> (the jar file into the lib dir, the properties file in project root.
>>
>>
>> when i do a
>>
>> BD bd =
>> ServiceLocator.getInstance
>> ().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
>>
>> i get this error:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/quartz/SchedulerException
>>    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:22)
>>    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:15)
>>    at de.repcom.osfaktura.aStartups.Test.main(Test.java:12)
>>
>> Maybe mandragora need some more infos about the ojb_blank structure
>> (like the paths where the reposities are and so on)
>>
>> Hans
>>
>>
>> Alessandro Colantoni schrieb:
>>     
>>> Hi!
>>> Mandragora is not part of the ojb project, but up now it is based on it
>>>       
>> and
>>     
>>> use Ojb Persistence broker as persistence engine.
>>> It is just a small project to provide you lots of the must common
>>>       
>> business
>>     
>>> and Dao methods.
>>> Just have a look. I hope improve documentation soon. Anyway it provides
>>>       
>> you
>>     
>>> a very easy mechanism based on Factory pattern to write and use your
>>> methods.
>>> If you download it you have these methods available, and can add yours
>>>       
>> to
>>     
>>> have a library very easy to reuse, and if you want, to share
>>> The future? I'm the only one in the team up now, and I will give you all
>>> support i can.
>>> Anyway don't look at it as a big and complicate project that if a day
>>>       
>> close
>>     
>>> you get in trouble.
>>> Mandragora want just to be a set of reusable business and Dao methods
>>>       
>> (based
>>     
>>> on ojb).
>>> For example I had the same problem of you with trees, or collection. You
>>> solved it writing your own method to delete object in the database not
>>> present in your reference collection. I solved it with a generic method,
>>>       
>> so
>>     
>>> I will use it again and again.
>>> You can write other methods and sharing
>>>
>>>
>>> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>>>
>>>       
>>>> aha .....!?
>>>> Hmmmm... is the "mandragora" Project a part of the ojb project ?
>>>> How looks ist for the future with it ?
>>>> I ask this, because, i dontwant to use it and sometime it will be
>>>> cancel'ed.
>>>>
>>>>
>>>> Hans
>>>>
>>>>
>>>>
>>>> Alessandro Colantoni schrieb:
>>>>
>>>>         
>>>>> Hi
>>>>> Yes it is normal.
>>>>> When you have a main object that has a collection attribute, Ojb works
>>>>>
>>>>>           
>>>> just
>>>>
>>>>         
>>>>> on value objects that are in the collection.
>>>>>
>>>>> I developed a framework based on Ojb called mandragora (
>>>>> http://mandragora.sourceforge.net) that provides lots of method that
>>>>>           
>> can
>>     
>>>>> help.
>>>>>
>>>>> The methods updateCollectionReference, updateCollectionReferences and
>>>>> updateCreateTrees do just what you need
>>>>>
>>>>> http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html
>>>>>
>>>>> Have a look. Documentation is very poor but in the following days I
>>>>>           
>> will
>>     
>>>>> upload something more
>>>>>
>>>>> I hope this can help
>>>>>
>>>>> Best Regards
>>>>> Alessandro
>>>>>
>>>>>
>>>>>
>>>>> On 9/12/07, Alessandro Colantoni <al...@gmail.com>
>>>>>           
>> wrote:
>>     
>>>>>           
>>>>>> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> Hi,
>>>>>>>
>>>>>>> i am not shure, but is ist correct when i have an object, witch is a
>>>>>>> tree of some other objects (colletions) and i delete a part of the
>>>>>>>
>>>>>>>               
>>>> tree
>>>>
>>>>         
>>>>>>> and then store the hole object (tree) - in the database the deleted
>>>>>>> object will also be deleted ?
>>>>>>>
>>>>>>> Everything works fine, when i store or update the object, but not
>>>>>>>               
>> when
>>     
>>>> i
>>>>
>>>>         
>>>>>>> delete.
>>>>>>> The deleted part of the object will not be deleted in the database.
>>>>>>>               
>> I
>>     
>>>>>>> can remove it by hand, when i run a remove.object  (the part of the
>>>>>>> tree) and then store the (changed) tree.
>>>>>>>
>>>>>>> Is this normal ?
>>>>>>>
>>>>>>>
>>>>>>> Hans
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>> ---------------------------------------------------------------------
>>     
>>>>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>> --
>>>>
>>>>
>>>>
>>>>
>>>>         
>> ------------------------------------------------------------------------
>>     
>>>> Repcom Datentechnik GmbH <http://www.repcom.de/>
>>>> Hauptstr. 103 - 63110 Rodgau
>>>> Tel. 06106-638081
>>>> Fax 06106-638083
>>>> Steuernummer 03524225030
>>>> Ust-IdNr.: DE151061445  Bankverbindung:
>>>> Deutsche Bank Dietzenbach,
>>>> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
>>>>
>>>> Internationale  Zahlungen
>>>> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
>>>> de54505700240151030400 BIC deutdedb538
>>>> Öffnungszeiten:
>>>> Mo.-Fr. 14.00-18.30 Uhr
>>>> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
>>>> Sie finden uns hier: Anfahrtsbeschreibung
>>>> <http://www.repcom.de/images/repcom/anfahrt.jpg>
>>>> Messenger
>>>> Yahoo
>>>> ICQ
>>>>        : bforpc
>>>> : 174290900
>>>>        MSN
>>>> Skype
>>>>        : bforpc@hotmail.com
>>>> : bforpc
>>>>
>>>> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
>>>> und   www.dataportal.de <http://www.dataportal.de/>
>>>>
>>>> Unsere AGB's finden Sie hier
>>>> <http://www.repcom.de/index.php?main_page=conditions>.
>>>>
>>>> Vertraulichkeitshinweis
>>>> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
>>>> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
>>>> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten,
>>>>         
>> so
>>     
>>>> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
>>>> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
>>>> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
>>>> in diesem Fall unverzglich den Absender und vernichten Sie dieses
>>>>         
>> E-Mail
>>     
>>>> nebst Anhängen und aller Kopien.
>>>>
>>>>
>>>>
>>>>         
>> ------------------------------------------------------------------------
>>     
>>>>
>>>>
>>>>         
>>>       
>> --
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> Repcom Datentechnik GmbH <http://www.repcom.de/>
>> Hauptstr. 103 - 63110 Rodgau
>> Tel. 06106-638081
>> Fax 06106-638083
>> Steuernummer 03524225030
>> Ust-IdNr.: DE151061445  Bankverbindung:
>> Deutsche Bank Dietzenbach,
>> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
>>
>> Internationale  Zahlungen
>> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
>> de54505700240151030400 BIC deutdedb538
>> Öffnungszeiten:
>> Mo.-Fr. 14.00-18.30 Uhr
>> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
>> Sie finden uns hier: Anfahrtsbeschreibung
>> <http://www.repcom.de/images/repcom/anfahrt.jpg>
>> Messenger
>> Yahoo
>> ICQ
>>        : bforpc
>> : 174290900
>>        MSN
>> Skype
>>        : bforpc@hotmail.com
>> : bforpc
>>
>> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
>> und   www.dataportal.de <http://www.dataportal.de/>
>>
>> Unsere AGB's finden Sie hier
>> <http://www.repcom.de/index.php?main_page=conditions>.
>>
>> Vertraulichkeitshinweis
>> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
>> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
>> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so
>> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
>> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
>> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
>> in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail
>> nebst Anhängen und aller Kopien.
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>>
>>     
>
>   

-- 


	
------------------------------------------------------------------------

	
Repcom Datentechnik GmbH <http://www.repcom.de/>
Hauptstr. 103 - 63110 Rodgau
Tel. 06106-638081
Fax 06106-638083
Steuernummer 03524225030 
Ust-IdNr.: DE151061445 	Bankverbindung:
Deutsche Bank Dietzenbach,
Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik

Internationale  Zahlungen
Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
de54505700240151030400 BIC deutdedb538
Öffnungszeiten: 
Mo.-Fr. 14.00-18.30 Uhr 
Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
Sie finden uns hier: Anfahrtsbeschreibung 
<http://www.repcom.de/images/repcom/anfahrt.jpg> 	
Messenger
Yahoo
ICQ
	: bforpc
: 174290900
	MSN
Skype
	: bforpc@hotmail.com
: bforpc

Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/> 
  und   www.dataportal.de <http://www.dataportal.de/> 	

Unsere AGB's finden Sie hier 
<http://www.repcom.de/index.php?main_page=conditions>. 

Vertraulichkeitshinweis
Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist 
vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn 
Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so 
beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung, 
Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts 
nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie 
in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail 
nebst Anhängen und aller Kopien.

	
------------------------------------------------------------------------



Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi Hans,
No Mandragora doesn't need to know the ojb_blank structure.

I think you have to add this to your web.xml

<servlet>
        <servlet-name>QuartzInitializer</servlet-name>
        <display-name>Quartz Initializer Servlet</display-name>
        <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet
</servlet-class>
        <load-on-startup>1</load-on-startup>

    <init-param>
          <param-name>shutdown-on-unload</param-name>
          <param-value>true</param-value>
        </init-param>

    <init-param>
          <param-name>start-scheduler-on-load</param-name>
          <param-value>true</param-value>
        </init-param>

    </servlet>
That's why the ServiceLocator instance always the Quartz Scheduler Service.
I will modify it to not instance it if not explicitly invoked


On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>
> Hi,
>
> i have try your project. I have merged it with the ojb_blank project.
> (the jar file into the lib dir, the properties file in project root.
>
>
> when i do a
>
> BD bd =
> ServiceLocator.getInstance
> ().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");
>
> i get this error:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/quartz/SchedulerException
>    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:22)
>    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:15)
>    at de.repcom.osfaktura.aStartups.Test.main(Test.java:12)
>
> Maybe mandragora need some more infos about the ojb_blank structure
> (like the paths where the reposities are and so on)
>
> Hans
>
>
> Alessandro Colantoni schrieb:
> > Hi!
> > Mandragora is not part of the ojb project, but up now it is based on it
> and
> > use Ojb Persistence broker as persistence engine.
> > It is just a small project to provide you lots of the must common
> business
> > and Dao methods.
> > Just have a look. I hope improve documentation soon. Anyway it provides
> you
> > a very easy mechanism based on Factory pattern to write and use your
> > methods.
> > If you download it you have these methods available, and can add yours
> to
> > have a library very easy to reuse, and if you want, to share
> > The future? I'm the only one in the team up now, and I will give you all
> > support i can.
> > Anyway don't look at it as a big and complicate project that if a day
> close
> > you get in trouble.
> > Mandragora want just to be a set of reusable business and Dao methods
> (based
> > on ojb).
> > For example I had the same problem of you with trees, or collection. You
> > solved it writing your own method to delete object in the database not
> > present in your reference collection. I solved it with a generic method,
> so
> > I will use it again and again.
> > You can write other methods and sharing
> >
> >
> > On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
> >
> >> aha .....!?
> >> Hmmmm... is the "mandragora" Project a part of the ojb project ?
> >> How looks ist for the future with it ?
> >> I ask this, because, i dontwant to use it and sometime it will be
> >> cancel'ed.
> >>
> >>
> >> Hans
> >>
> >>
> >>
> >> Alessandro Colantoni schrieb:
> >>
> >>> Hi
> >>> Yes it is normal.
> >>> When you have a main object that has a collection attribute, Ojb works
> >>>
> >> just
> >>
> >>> on value objects that are in the collection.
> >>>
> >>> I developed a framework based on Ojb called mandragora (
> >>> http://mandragora.sourceforge.net) that provides lots of method that
> can
> >>> help.
> >>>
> >>> The methods updateCollectionReference, updateCollectionReferences and
> >>> updateCreateTrees do just what you need
> >>>
> >>> http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html
> >>>
> >>> Have a look. Documentation is very poor but in the following days I
> will
> >>> upload something more
> >>>
> >>> I hope this can help
> >>>
> >>> Best Regards
> >>> Alessandro
> >>>
> >>>
> >>>
> >>> On 9/12/07, Alessandro Colantoni <al...@gmail.com>
> wrote:
> >>>
> >>>
> >>>> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
> >>>>
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> i am not shure, but is ist correct when i have an object, witch is a
> >>>>> tree of some other objects (colletions) and i delete a part of the
> >>>>>
> >> tree
> >>
> >>>>> and then store the hole object (tree) - in the database the deleted
> >>>>> object will also be deleted ?
> >>>>>
> >>>>> Everything works fine, when i store or update the object, but not
> when
> >>>>>
> >> i
> >>
> >>>>> delete.
> >>>>> The deleted part of the object will not be deleted in the database.
> I
> >>>>> can remove it by hand, when i run a remove.object  (the part of the
> >>>>> tree) and then store the (changed) tree.
> >>>>>
> >>>>> Is this normal ?
> >>>>>
> >>>>>
> >>>>> Hans
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >> --
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------
> >>
> >>
> >> Repcom Datentechnik GmbH <http://www.repcom.de/>
> >> Hauptstr. 103 - 63110 Rodgau
> >> Tel. 06106-638081
> >> Fax 06106-638083
> >> Steuernummer 03524225030
> >> Ust-IdNr.: DE151061445  Bankverbindung:
> >> Deutsche Bank Dietzenbach,
> >> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
> >>
> >> Internationale  Zahlungen
> >> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
> >> de54505700240151030400 BIC deutdedb538
> >> Öffnungszeiten:
> >> Mo.-Fr. 14.00-18.30 Uhr
> >> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
> >> Sie finden uns hier: Anfahrtsbeschreibung
> >> <http://www.repcom.de/images/repcom/anfahrt.jpg>
> >> Messenger
> >> Yahoo
> >> ICQ
> >>        : bforpc
> >> : 174290900
> >>        MSN
> >> Skype
> >>        : bforpc@hotmail.com
> >> : bforpc
> >>
> >> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
> >> und   www.dataportal.de <http://www.dataportal.de/>
> >>
> >> Unsere AGB's finden Sie hier
> >> <http://www.repcom.de/index.php?main_page=conditions>.
> >>
> >> Vertraulichkeitshinweis
> >> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
> >> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
> >> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten,
> so
> >> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
> >> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
> >> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
> >> in diesem Fall unverzglich den Absender und vernichten Sie dieses
> E-Mail
> >> nebst Anhängen und aller Kopien.
> >>
> >>
> >>
> ------------------------------------------------------------------------
> >>
> >>
> >>
> >>
> >
> >
>
> --
>
>
>
> ------------------------------------------------------------------------
>
>
> Repcom Datentechnik GmbH <http://www.repcom.de/>
> Hauptstr. 103 - 63110 Rodgau
> Tel. 06106-638081
> Fax 06106-638083
> Steuernummer 03524225030
> Ust-IdNr.: DE151061445  Bankverbindung:
> Deutsche Bank Dietzenbach,
> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
>
> Internationale  Zahlungen
> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
> de54505700240151030400 BIC deutdedb538
> Öffnungszeiten:
> Mo.-Fr. 14.00-18.30 Uhr
> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
> Sie finden uns hier: Anfahrtsbeschreibung
> <http://www.repcom.de/images/repcom/anfahrt.jpg>
> Messenger
> Yahoo
> ICQ
>        : bforpc
> : 174290900
>        MSN
> Skype
>        : bforpc@hotmail.com
> : bforpc
>
> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
> und   www.dataportal.de <http://www.dataportal.de/>
>
> Unsere AGB's finden Sie hier
> <http://www.repcom.de/index.php?main_page=conditions>.
>
> Vertraulichkeitshinweis
> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so
> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
> in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail
> nebst Anhängen und aller Kopien.
>
>
> ------------------------------------------------------------------------
>
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
Hi,

i have try your project. I have merged it with the ojb_blank project.
(the jar file into the lib dir, the properties file in project root.


when i do a

BD bd = 
ServiceLocator.getInstance().getManagerBD("BDFactoryDefaultClass","StandardBDDefaultClass");

i get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/quartz/SchedulerException
    at de.repcom.osfaktura.aStartups.Test.machWas(Test.java:22)
    at de.repcom.osfaktura.aStartups.Test.<init>(Test.java:15)
    at de.repcom.osfaktura.aStartups.Test.main(Test.java:12)

Maybe mandragora need some more infos about the ojb_blank structure 
(like the paths where the reposities are and so on)

Hans


Alessandro Colantoni schrieb:
> Hi!
> Mandragora is not part of the ojb project, but up now it is based on it and
> use Ojb Persistence broker as persistence engine.
> It is just a small project to provide you lots of the must common business
> and Dao methods.
> Just have a look. I hope improve documentation soon. Anyway it provides you
> a very easy mechanism based on Factory pattern to write and use your
> methods.
> If you download it you have these methods available, and can add yours to
> have a library very easy to reuse, and if you want, to share
> The future? I'm the only one in the team up now, and I will give you all
> support i can.
> Anyway don't look at it as a big and complicate project that if a day close
> you get in trouble.
> Mandragora want just to be a set of reusable business and Dao methods (based
> on ojb).
> For example I had the same problem of you with trees, or collection. You
> solved it writing your own method to delete object in the database not
> present in your reference collection. I solved it with a generic method, so
> I will use it again and again.
> You can write other methods and sharing
>
>
> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>   
>> aha .....!?
>> Hmmmm... is the "mandragora" Project a part of the ojb project ?
>> How looks ist for the future with it ?
>> I ask this, because, i dontwant to use it and sometime it will be
>> cancel'ed.
>>
>>
>> Hans
>>
>>
>>
>> Alessandro Colantoni schrieb:
>>     
>>> Hi
>>> Yes it is normal.
>>> When you have a main object that has a collection attribute, Ojb works
>>>       
>> just
>>     
>>> on value objects that are in the collection.
>>>
>>> I developed a framework based on Ojb called mandragora (
>>> http://mandragora.sourceforge.net) that provides lots of method that can
>>> help.
>>>
>>> The methods updateCollectionReference, updateCollectionReferences and
>>> updateCreateTrees do just what you need
>>>
>>> http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html
>>>
>>> Have a look. Documentation is very poor but in the following days I will
>>> upload something more
>>>
>>> I hope this can help
>>>
>>> Best Regards
>>> Alessandro
>>>
>>>
>>>
>>> On 9/12/07, Alessandro Colantoni <al...@gmail.com> wrote:
>>>
>>>       
>>>> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>>>>
>>>>         
>>>>> Hi,
>>>>>
>>>>> i am not shure, but is ist correct when i have an object, witch is a
>>>>> tree of some other objects (colletions) and i delete a part of the
>>>>>           
>> tree
>>     
>>>>> and then store the hole object (tree) - in the database the deleted
>>>>> object will also be deleted ?
>>>>>
>>>>> Everything works fine, when i store or update the object, but not when
>>>>>           
>> i
>>     
>>>>> delete.
>>>>> The deleted part of the object will not be deleted in the database. I
>>>>> can remove it by hand, when i run a remove.object  (the part of the
>>>>> tree) and then store the (changed) tree.
>>>>>
>>>>> Is this normal ?
>>>>>
>>>>>
>>>>> Hans
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>>
>>>>>
>>>>>
>>>>>           
>>>       
>> --
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> Repcom Datentechnik GmbH <http://www.repcom.de/>
>> Hauptstr. 103 - 63110 Rodgau
>> Tel. 06106-638081
>> Fax 06106-638083
>> Steuernummer 03524225030
>> Ust-IdNr.: DE151061445  Bankverbindung:
>> Deutsche Bank Dietzenbach,
>> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
>>
>> Internationale  Zahlungen
>> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
>> de54505700240151030400 BIC deutdedb538
>> Öffnungszeiten:
>> Mo.-Fr. 14.00-18.30 Uhr
>> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
>> Sie finden uns hier: Anfahrtsbeschreibung
>> <http://www.repcom.de/images/repcom/anfahrt.jpg>
>> Messenger
>> Yahoo
>> ICQ
>>        : bforpc
>> : 174290900
>>        MSN
>> Skype
>>        : bforpc@hotmail.com
>> : bforpc
>>
>> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
>> und   www.dataportal.de <http://www.dataportal.de/>
>>
>> Unsere AGB's finden Sie hier
>> <http://www.repcom.de/index.php?main_page=conditions>.
>>
>> Vertraulichkeitshinweis
>> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
>> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
>> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so
>> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
>> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
>> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
>> in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail
>> nebst Anhängen und aller Kopien.
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>>
>>     
>
>   

-- 


	
------------------------------------------------------------------------

	
Repcom Datentechnik GmbH <http://www.repcom.de/>
Hauptstr. 103 - 63110 Rodgau
Tel. 06106-638081
Fax 06106-638083
Steuernummer 03524225030 
Ust-IdNr.: DE151061445 	Bankverbindung:
Deutsche Bank Dietzenbach,
Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik

Internationale  Zahlungen
Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
de54505700240151030400 BIC deutdedb538
Öffnungszeiten: 
Mo.-Fr. 14.00-18.30 Uhr 
Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
Sie finden uns hier: Anfahrtsbeschreibung 
<http://www.repcom.de/images/repcom/anfahrt.jpg> 	
Messenger
Yahoo
ICQ
	: bforpc
: 174290900
	MSN
Skype
	: bforpc@hotmail.com
: bforpc

Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/> 
  und   www.dataportal.de <http://www.dataportal.de/> 	

Unsere AGB's finden Sie hier 
<http://www.repcom.de/index.php?main_page=conditions>. 

Vertraulichkeitshinweis
Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist 
vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn 
Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so 
beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung, 
Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts 
nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie 
in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail 
nebst Anhängen und aller Kopien.

	
------------------------------------------------------------------------



Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi!
Mandragora is not part of the ojb project, but up now it is based on it and
use Ojb Persistence broker as persistence engine.
It is just a small project to provide you lots of the must common business
and Dao methods.
Just have a look. I hope improve documentation soon. Anyway it provides you
a very easy mechanism based on Factory pattern to write and use your
methods.
If you download it you have these methods available, and can add yours to
have a library very easy to reuse, and if you want, to share
The future? I'm the only one in the team up now, and I will give you all
support i can.
Anyway don't look at it as a big and complicate project that if a day close
you get in trouble.
Mandragora want just to be a set of reusable business and Dao methods (based
on ojb).
For example I had the same problem of you with trees, or collection. You
solved it writing your own method to delete object in the database not
present in your reference collection. I solved it with a generic method, so
I will use it again and again.
You can write other methods and sharing


On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>
> aha .....!?
> Hmmmm... is the "mandragora" Project a part of the ojb project ?
> How looks ist for the future with it ?
> I ask this, because, i dontwant to use it and sometime it will be
> cancel'ed.
>
>
> Hans
>
>
>
> Alessandro Colantoni schrieb:
> > Hi
> > Yes it is normal.
> > When you have a main object that has a collection attribute, Ojb works
> just
> > on value objects that are in the collection.
> >
> > I developed a framework based on Ojb called mandragora (
> > http://mandragora.sourceforge.net) that provides lots of method that can
> > help.
> >
> > The methods updateCollectionReference, updateCollectionReferences and
> > updateCreateTrees do just what you need
> >
> > http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html
> >
> > Have a look. Documentation is very poor but in the following days I will
> > upload something more
> >
> > I hope this can help
> >
> > Best Regards
> > Alessandro
> >
> >
> >
> > On 9/12/07, Alessandro Colantoni <al...@gmail.com> wrote:
> >
> >>
> >> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
> >>
> >>> Hi,
> >>>
> >>> i am not shure, but is ist correct when i have an object, witch is a
> >>> tree of some other objects (colletions) and i delete a part of the
> tree
> >>> and then store the hole object (tree) - in the database the deleted
> >>> object will also be deleted ?
> >>>
> >>> Everything works fine, when i store or update the object, but not when
> i
> >>> delete.
> >>> The deleted part of the object will not be deleted in the database. I
> >>> can remove it by hand, when i run a remove.object  (the part of the
> >>> tree) and then store the (changed) tree.
> >>>
> >>> Is this normal ?
> >>>
> >>>
> >>> Hans
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >>> For additional commands, e-mail: ojb-user-help@db.apache.org
> >>>
> >>>
> >>>
> >
> >
>
> --
>
>
>
> ------------------------------------------------------------------------
>
>
> Repcom Datentechnik GmbH <http://www.repcom.de/>
> Hauptstr. 103 - 63110 Rodgau
> Tel. 06106-638081
> Fax 06106-638083
> Steuernummer 03524225030
> Ust-IdNr.: DE151061445  Bankverbindung:
> Deutsche Bank Dietzenbach,
> Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik
>
> Internationale  Zahlungen
> Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
> de54505700240151030400 BIC deutdedb538
> Öffnungszeiten:
> Mo.-Fr. 14.00-18.30 Uhr
> Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
> Sie finden uns hier: Anfahrtsbeschreibung
> <http://www.repcom.de/images/repcom/anfahrt.jpg>
> Messenger
> Yahoo
> ICQ
>        : bforpc
> : 174290900
>        MSN
> Skype
>        : bforpc@hotmail.com
> : bforpc
>
> Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/>
> und   www.dataportal.de <http://www.dataportal.de/>
>
> Unsere AGB's finden Sie hier
> <http://www.repcom.de/index.php?main_page=conditions>.
>
> Vertraulichkeitshinweis
> Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist
> vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn
> Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so
> beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung,
> Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts
> nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie
> in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail
> nebst Anhängen und aller Kopien.
>
>
> ------------------------------------------------------------------------
>
>
>

Re: storing objects

Posted by Hans Novak <hn...@repcom.de>.
aha .....!?
Hmmmm... is the "mandragora" Project a part of the ojb project ?
How looks ist for the future with it ?
I ask this, because, i dontwant to use it and sometime it will be cancel'ed.


Hans



Alessandro Colantoni schrieb:
> Hi
> Yes it is normal.
> When you have a main object that has a collection attribute, Ojb works just
> on value objects that are in the collection.
>
> I developed a framework based on Ojb called mandragora (
> http://mandragora.sourceforge.net) that provides lots of method that can
> help.
>
> The methods updateCollectionReference, updateCollectionReferences and
> updateCreateTrees do just what you need
>
> http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html
>
> Have a look. Documentation is very poor but in the following days I will
> upload something more
>
> I hope this can help
>
> Best Regards
> Alessandro
>
>
>
> On 9/12/07, Alessandro Colantoni <al...@gmail.com> wrote:
>   
>>
>> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>>     
>>> Hi,
>>>
>>> i am not shure, but is ist correct when i have an object, witch is a
>>> tree of some other objects (colletions) and i delete a part of the tree
>>> and then store the hole object (tree) - in the database the deleted
>>> object will also be deleted ?
>>>
>>> Everything works fine, when i store or update the object, but not when i
>>> delete.
>>> The deleted part of the object will not be deleted in the database. I
>>> can remove it by hand, when i run a remove.object  (the part of the
>>> tree) and then store the (changed) tree.
>>>
>>> Is this normal ?
>>>
>>>
>>> Hans
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>>       
>
>   

-- 


	
------------------------------------------------------------------------

	
Repcom Datentechnik GmbH <http://www.repcom.de/>
Hauptstr. 103 - 63110 Rodgau
Tel. 06106-638081
Fax 06106-638083
Steuernummer 03524225030 
Ust-IdNr.: DE151061445 	Bankverbindung:
Deutsche Bank Dietzenbach,
Kto. 1516400 BLZ 50570024 , Inhaber  Repcom Datentechnik

Internationale  Zahlungen
Kto. 1510304 BLZ 50570024, Inhaber  J. Novak
de54505700240151030400 BIC deutdedb538
Öffnungszeiten: 
Mo.-Fr. 14.00-18.30 Uhr 
Tel. Hotline Mo.-Fr. 10.00-18.30 Uhr
Sie finden uns hier: Anfahrtsbeschreibung 
<http://www.repcom.de/images/repcom/anfahrt.jpg> 	
Messenger
Yahoo
ICQ
	: bforpc
: 174290900
	MSN
Skype
	: bforpc@hotmail.com
: bforpc

Unsere primären Web Adressen  www.repcom.de <http://www.repcom.de/> 
  und   www.dataportal.de <http://www.dataportal.de/> 	

Unsere AGB's finden Sie hier 
<http://www.repcom.de/index.php?main_page=conditions>. 

Vertraulichkeitshinweis
Der Inhalt dieser E-Mail, einschliesslich etwaiger Anhäge, ist 
vertraulich und nur für den oben bezeichneten Adressaten bestimmt. Wenn 
Sie nicht dieser Adressat oder dessen Empfangsvertreter sein sollten, so 
beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung, 
Vervielfältigung, Weitergabe oder eines anderen Gebrauchs des Inhalts 
nicht gestattet ist und gesetzeswidrig sein kann. Bitte informieren Sie 
in diesem Fall unverzglich den Absender und vernichten Sie dieses E-Mail 
nebst Anhängen und aller Kopien.

	
------------------------------------------------------------------------



Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
Hi
Yes it is normal.
When you have a main object that has a collection attribute, Ojb works just
on value objects that are in the collection.

I developed a framework based on Ojb called mandragora (
http://mandragora.sourceforge.net) that provides lots of method that can
help.

The methods updateCollectionReference, updateCollectionReferences and
updateCreateTrees do just what you need

http://mandragora.sourceforge.net/referenceguide/bd-api-guide.html

Have a look. Documentation is very poor but in the following days I will
upload something more

I hope this can help

Best Regards
Alessandro



On 9/12/07, Alessandro Colantoni <al...@gmail.com> wrote:
>
>
>
> On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
> >
> > Hi,
> >
> > i am not shure, but is ist correct when i have an object, witch is a
> > tree of some other objects (colletions) and i delete a part of the tree
> > and then store the hole object (tree) - in the database the deleted
> > object will also be deleted ?
> >
> > Everything works fine, when i store or update the object, but not when i
> > delete.
> > The deleted part of the object will not be deleted in the database. I
> > can remove it by hand, when i run a remove.object  (the part of the
> > tree) and then store the (changed) tree.
> >
> > Is this normal ?
> >
> >
> > Hans
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
>

Re: storing objects

Posted by Alessandro Colantoni <al...@gmail.com>.
On 9/12/07, Hans Novak <hn...@repcom.de> wrote:
>
> Hi,
>
> i am not shure, but is ist correct when i have an object, witch is a
> tree of some other objects (colletions) and i delete a part of the tree
> and then store the hole object (tree) - in the database the deleted
> object will also be deleted ?
>
> Everything works fine, when i store or update the object, but not when i
> delete.
> The deleted part of the object will not be deleted in the database. I
> can remove it by hand, when i run a remove.object  (the part of the
> tree) and then store the (changed) tree.
>
> Is this normal ?
>
>
> Hans
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>