objectbridge-developers Mailing List for ObJectRelationalBridge (Page 49)
Brought to you by:
thma
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(14) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(33) |
Feb
(8) |
Mar
(3) |
Apr
(1) |
May
(18) |
Jun
(6) |
Jul
(15) |
Aug
(71) |
Sep
(29) |
Oct
(43) |
Nov
(77) |
Dec
(54) |
2002 |
Jan
(54) |
Feb
(147) |
Mar
(144) |
Apr
(163) |
May
(307) |
Jun
(240) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Bischof, R. <rai...@ed...> - 2001-10-08 14:40:55
|
Hi, I am currently trying to get one of the many new features working: The autoincrement field The docs mention that it only works for the SQL types INTEGER, CHAR and VARCHAR. But it also only works for the Java types Integer, int and String. I have mapped my primary key to the primitive type long. Since the SequenceManager is only able to return unique Strings or unique integers it can't be easily changed without interface modifications. Making a special solution for longs does not really make sense since we are out of luck with floats, MyIdClass, etc ... What about making the SequenceMgr responsible for deciding what it can handle? If the SeqMgr interface is extended with a method that can return any object we can handle all kinds of ID types. Thanks Rainer |
From: Dirk O. <di...@xa...> - 2001-10-08 04:41:01
|
> There is only one problem: this feature requires JDK 1.3 or later. > > I see 2 option to deal with this situation: > 1. just say OJB needs JDK 1.3 or later. Period. > 2. try to support a JDK 1.2 compliant version without this feature. > > Of course 1.) will save me a lot of work. But maybe some of you still > rely on JDK 1.2 in certain production environments ? Please tell me if > you need OJB running under JDK 1.2. From my experience, I would say don't bother with the 1.2 backward compatability. If a package has to be *really* backwards compatible, you would have to support JDK 1.1.x! So I guess the common case is that one is either limited to a 1.1 VM or free to use the latest 1.3 one. Just my 0.01 EUR, -dirk |
From: David F. <dw...@la...> - 2001-10-08 03:02:59
|
At 12:20 AM 1/1/1997 +0100, Thomas Mahler wrote: >Hi all, > >here is the second edition of the weekly OJB status update. >See the attached html file to see the status of your bug and feature >requests. > >In the last week I used the JDK 1.3 dynamic Proxy concept to build an >improvement of the OJB virtual proxy concept. Now you don't have to >implement the proxy classes yourself, but can declare the usage of >dynamic proxies in the the XML repository. > >This works great and avoids a lot of non-productive work from for >app-developers using OJB. > >There is only one problem: this feature requires JDK 1.3 or later. > >I see 2 option to deal with this situation: >1. just say OJB needs JDK 1.3 or later. Period. >2. try to support a JDK 1.2 compliant version without this feature. > >Of course 1.) will save me a lot of work. But maybe some of you still >rely on JDK 1.2 in certain production environments ? Please tell me if >you need OJB running under JDK 1.2. > >The easiest way to provide a JDK 1.2 compliant version would be to use >compiler switches in the code. Unfortunately Java does not have a >preprocessor. >What is the best solution in Java to provide this kind of preprocessing? >Can we use ANT for this work? Any hints are most welcome. We could live with the JDK1.3 requirement, since we have other reasons to require this already. However, I think you can do conditional compiles on classes with Ant by checking to see if certain classes exist. That is how we handle optional module support in OpenEMed now. For example, if the right POET classes don't exist, we don't compile POET support. This is totally transparent. You need to be careful how you handle constructors in in this approach, but it is quite workable. Dave >regards, > >--Thomas |
From: Thomas M. <tho...@ho...> - 2001-10-07 15:36:01
|
Hi all, here is the second edition of the weekly OJB status update. See the attached html file to see the status of your bug and feature requests. In the last week I used the JDK 1.3 dynamic Proxy concept to build an improvement of the OJB virtual proxy concept. Now you don't have to implement the proxy classes yourself, but can declare the usage of dynamic proxies in the the XML repository. This works great and avoids a lot of non-productive work from for app-developers using OJB. There is only one problem: this feature requires JDK 1.3 or later. I see 2 option to deal with this situation: 1. just say OJB needs JDK 1.3 or later. Period. 2. try to support a JDK 1.2 compliant version without this feature. Of course 1.) will save me a lot of work. But maybe some of you still rely on JDK 1.2 in certain production environments ? Please tell me if you need OJB running under JDK 1.2. The easiest way to provide a JDK 1.2 compliant version would be to use compiler switches in the code. Unfortunately Java does not have a preprocessor. What is the best solution in Java to provide this kind of preprocessing? Can we use ANT for this work? Any hints are most welcome. regards, --Thomas |
From: Hans V. W. <ha...@ix...> - 2001-10-04 21:30:13
|
With the 0.5.155 release of OJB I was able to get the tutorial examples to run after modifying the size of OID related fields in the sql1.txt script from 1024 to 255 (did not look at any code to find out what the consequences might be). The same does not seem to work for the 0.5.180 release: I made the same modifications to sql1.txt and adjusted the settings in repository.xml to work with MySQL. Running "build tests" seems to generate all the necessary tables and gives me the message: [java] [java] Connected to jdbc:mysql://localhost:3306/test [java] Driver Mark Matthews' MySQL Driver [java] Version 2.0.4 [java] I therefore assume my jdbc specification in sql1.txt must be correct. However, running tutorial1 or 2 gives me the following error: java.sql.SQLException: OJB Error: could not obtain a Connection at ojb.broker.accesslayer.StatementsForClass.getConnection(StatementsForCla ss.java:119) I toyed around with the url.ddbalias setting, the user.name and user.password settings, but other than making things worse (connection refused), I cannot get it to work. Any ideas? Am I posting this to the right mailing list? |
From: David W F. <dw...@la...> - 2001-10-04 13:48:16
|
Mahler Thomas writes: > Hi David, >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: David Forslund [mailto:dw...@la...] > > Gesendet: Mittwoch, 3. Oktober 2001 21:11 > > An: obj...@li... > > Betreff: [Objectbridge-developers] Re: questions > >=20 > >=20 > > I notice that in the ObjectCacheDefaultImpl class which is an=20 > > implementation of ObjectCache, that it extends > > the implementation by adding methods not defined in the ObjectCach= e=20 > > interface. =20 >=20 > I don't see any public member functions in ObjectCacheDefaultImpl th= at are > not specified in the interface. > There are also no direct references to ObjectCacheDefaultImpl method= s from > other part of OJB. >=20 > The only thing I saw is a static method setDebug(boolean) which migh= t only > be useful for internal development. >=20 We were using the setDebug method in the earlier version. That static method isn't very accessible anymore because of the Factory class. We obviously can work around this, and it isn't a big deal. Thanks, Dave > I can't see any harm here ? >=20 > > This is true in some other classes, too, such > > as SequenceManagerDefaultImpl. =20 >=20 > I did not find anything of the kind in SequenceManagerDefaultImpl ! You are right. I think this was true in the last version, but not this= one. Thanks, Dave >=20 > Thus one cannot pass an=20 > > instance of the=20 > > ObjectCache around because some > > methods aren't defined there. Is this intentional? This=20 > > seems to me to=20 > > be a slightly strange design pattern. Usually > > I would have a class that implements the interface and then=20 > > extend that. >=20 > I tried to apply the "Abstract Factory" pattern for all pluggable OJ= B > components.=20 > If there are any references to methods that are not declared in the > respective interface it is clearly an error. > If you find any, please tell me. I will also have another code walkt= hrough > to be sure...=20 >=20 > Thanks, >=20 > Thomas >=20 > >=20 > > Thanks, > >=20 > > Dave > >=20 > >=20 > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > https://lists.sourceforge.net/lists/listinfo/objectbridge-develope= rs > >=20 |
From: Mahler T. <tho...@it...> - 2001-10-04 09:01:37
|
Hi David, > -----Urspr=FCngliche Nachricht----- > Von: David Forslund [mailto:dw...@la...] > Gesendet: Mittwoch, 3. Oktober 2001 21:11 > An: obj...@li... > Betreff: [Objectbridge-developers] Re: questions >=20 >=20 > I notice that in the ObjectCacheDefaultImpl class which is an=20 > implementation of ObjectCache, that it extends > the implementation by adding methods not defined in the ObjectCache=20 > interface. =20 I don't see any public member functions in ObjectCacheDefaultImpl that = are not specified in the interface. There are also no direct references to ObjectCacheDefaultImpl methods = from other part of OJB. The only thing I saw is a static method setDebug(boolean) which might = only be useful for internal development. I can't see any harm here ? > This is true in some other classes, too, such > as SequenceManagerDefaultImpl. =20 I did not find anything of the kind in SequenceManagerDefaultImpl ! Thus one cannot pass an=20 > instance of the=20 > ObjectCache around because some > methods aren't defined there. Is this intentional? This=20 > seems to me to=20 > be a slightly strange design pattern. Usually > I would have a class that implements the interface and then=20 > extend that. I tried to apply the "Abstract Factory" pattern for all pluggable OJB components.=20 If there are any references to methods that are not declared in the respective interface it is clearly an error. If you find any, please tell me. I will also have another code = walkthrough to be sure...=20 Thanks, Thomas >=20 > Thanks, >=20 > Dave >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |
From: Mahler T. <tho...@it...> - 2001-10-04 07:16:59
|
Hi Jerome, You must uncomment the JDBC-ConnectionDescriptor in the xml Repository = !!! It should look like: <JdbcConnectionDescriptor id=3D"default"> <dbms.name>oracle</dbms.name> <driver.name>oracle.jdbc.driver.OracleDriver</driver.name> <url.protocol>jdbc</url.protocol> <url.subprotocol>oracle:thin</url.subprotocol> <url.dbalias>@192.168.x.x:1521:sid</url.dbalias> <user.name>scott</user.name> <user.passwd>tiger</user.passwd> </JdbcConnectionDescriptor> HTH Thomas > -----Urspr=FCngliche Nachricht----- > Von: Jerome Boulon [mailto:jb...@vi...] > Gesendet: Mittwoch, 3. Oktober 2001 23:20 > An: OJB > Betreff: [Objectbridge-developers] OJB - Oracle > java.lang.NullPointerException >=20 >=20 > Hi, >=20 > I've setup OJB to run with Oracle like this : >=20 > in src/test/setup/sql1.txt : > ;for Oracle > d oracle.jdbc.driver.OracleDriver; > o dbc:oracle:thin:@192.168.x.x:1521:sid scott tiger; >=20 > in src/test/ojb/repository.xml : > <!--JdbcConnectionDescriptor id=3D"default"> > <dbms.name>oracle</dbms.name> > <driver.name>oracle.jdbc.driver.OracleDriver</driver.name> > <url.protocol>jdbc</url.protocol> > <url.subprotocol>oracle:thin</url.subprotocol> > <url.dbalias>@192.168.x.x:1521:sid</url.dbalias> > <user.name>scott</user.name> > <user.passwd>tiger</user.passwd> > </JdbcConnectionDescriptor--> >=20 > I've deleted entries for others database > and run build.sh all. Everything build well; >=20 > but when I run tutorial2.sh , I've got this : >=20 > +++++++++++++++++++++++++++++++++ >=20 > Welcome to the OJB ODMG tutorial application >=20 >=20 > [0] List all product entries > [1] Enter a new product > [2] Delete a product entry > [3] Quit Application > type in number to select a use case > 1 > please enter a new product > enter name: 1 > enter price: 1 > enter available stock: 1 > new product has no valid _id yet: 0 > null > java.lang.NullPointerException > at > ojb.broker.metadata.ClassDescriptor.getScheme(ClassDescriptor. > java:160) > at > ojb.broker.accesslayer.SqlGenerator.getPreparedSelectByPkState > ment(SqlGenerator.java:357) >=20 > at > ojb.broker.accesslayer.StatementsForClass.getSelectByPKkStmt(S > tatementsForClass.java:266) >=20 > at > ojb.broker.accesslayer.StatementManager.getSelectByPKStatement > (StatementManager.java:213) >=20 > at > ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAccess > .java:241) > at > ojb.broker.PersistenceBrokerImpl.getDBObject(PersistenceBroker > Impl.java:798) > at > ojb.broker.PersistenceBrokerImpl.getObjectByIdentity(Persisten > ceBrokerImpl.java:927) >=20 > at > ojb.broker.PersistenceBrokerImpl.getObjectByExample(Persistenc > eBrokerImpl.java:901) >=20 > at > ojb.broker.PersistenceBrokerImpl.getObjectByQuery(PersistenceB > rokerImpl.java:947) >=20 > at > ojb.broker.util.SequenceManagerDefaultImpl.getNextId(SequenceM > anagerDefaultImpl.java:112) >=20 > at > ojb.broker.util.SequenceManagerDefaultImpl.getUniqueId(Sequenc > eManagerDefaultImpl.java:140) >=20 > at > ojb.broker.metadata.ClassDescriptor.getAutoIncrementValue(Clas > sDescriptor.java:736) >=20 > at > ojb.broker.metadata.ClassDescriptor.getKeyValues(ClassDescript > or.java:712) > at ojb.broker.Identity.<init>(Identity.java:75) > at > test.ojb.tutorial2.UCEnterNewProduct.apply(UCEnterNewProduct.java:52) > at test.ojb.tutorial2.Application.run(Application.java:99) > at test.ojb.tutorial2.Application.main(Application.java:66) > null > java.lang.NullPointerException > at > ojb.broker.metadata.ClassDescriptor.getScheme(ClassDescriptor. > java:160) > at > ojb.broker.accesslayer.SqlGenerator.getPreparedSelectByPkState > ment(SqlGenerator.java:357) >=20 > at > ojb.broker.accesslayer.StatementsForClass.getSelectByPKkStmt(S > tatementsForClass.java:266) >=20 > at > ojb.broker.accesslayer.StatementManager.getSelectByPKStatement > (StatementManager.java:213) >=20 > at > ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAccess > .java:241) > at > = ojb.broker.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:271) > at > ojb.broker.util.SequenceManagerDefaultImpl.getNextId(SequenceM > anagerDefaultImpl.java:122) >=20 > at > ojb.broker.util.SequenceManagerDefaultImpl.getUniqueId(Sequenc > eManagerDefaultImpl.java:140) >=20 > at > ojb.broker.metadata.ClassDescriptor.getAutoIncrementValue(Clas > sDescriptor.java:736) >=20 > at > ojb.broker.metadata.ClassDescriptor.getKeyValues(ClassDescript > or.java:712) > at ojb.broker.Identity.<init>(Identity.java:75) > at > test.ojb.tutorial2.UCEnterNewProduct.apply(UCEnterNewProduct.java:52) > at test.ojb.tutorial2.Application.run(Application.java:99) > at test.ojb.tutorial2.Application.main(Application.java:66) > ....... > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >=20 >=20 > I'm using classes12.zip from Oracle with Oracle 8.1.6 and not=20 > the OCI driver, >=20 > All tables were created in the database and select give me=20 > the right result. >=20 > What's wrong with this setup ? >=20 > Thanks. >=20 >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |
From: Mahler T. <tho...@it...> - 2001-10-04 06:37:45
|
Hi David, You are right. According to the JDBC spec it should use getBytes().=20 I will fix it. Thanks, Thomas > -----Urspr=FCngliche Nachricht----- > Von: David Forslund [mailto:dw...@la...] > Gesendet: Mittwoch, 3. Oktober 2001 22:03 > An: obj...@li... > Betreff: [Objectbridge-developers] Re: JDBCAccess >=20 >=20 > In the JDBCAccess layer, you use the getArray() call for=20 > access the column=20 > in the result set for VARBINARY. I find > that this needs to be getBytes() instead. First, InstantDB doesn't=20 > implement getArray() so any test with it fails immediately. > Second, getBytes() also works for Oracle 8.1.7 and not=20 > getArray(). I=20 > don't see any test for the VARBINARY type in your > JUNIT test, so there is not systematic testing of this option in the=20 > software. >=20 > Am I doing something wrong? >=20 > Dave >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |
From: Jerome B. <jb...@vi...> - 2001-10-03 21:20:38
|
Hi, I've setup OJB to run with Oracle like this : in src/test/setup/sql1.txt : ;for Oracle d oracle.jdbc.driver.OracleDriver; o dbc:oracle:thin:@192.168.x.x:1521:sid scott tiger; in src/test/ojb/repository.xml : <!--JdbcConnectionDescriptor id="default"> <dbms.name>oracle</dbms.name> <driver.name>oracle.jdbc.driver.OracleDriver</driver.name> <url.protocol>jdbc</url.protocol> <url.subprotocol>oracle:thin</url.subprotocol> <url.dbalias>@192.168.x.x:1521:sid</url.dbalias> <user.name>scott</user.name> <user.passwd>tiger</user.passwd> </JdbcConnectionDescriptor--> I've deleted entries for others database and run build.sh all. Everything build well; but when I run tutorial2.sh , I've got this : +++++++++++++++++++++++++++++++++ Welcome to the OJB ODMG tutorial application [0] List all product entries [1] Enter a new product [2] Delete a product entry [3] Quit Application type in number to select a use case 1 please enter a new product enter name: 1 enter price: 1 enter available stock: 1 new product has no valid _id yet: 0 null java.lang.NullPointerException at ojb.broker.metadata.ClassDescriptor.getScheme(ClassDescriptor.java:160) at ojb.broker.accesslayer.SqlGenerator.getPreparedSelectByPkStatement(SqlGenerator.java:357) at ojb.broker.accesslayer.StatementsForClass.getSelectByPKkStmt(StatementsForClass.java:266) at ojb.broker.accesslayer.StatementManager.getSelectByPKStatement(StatementManager.java:213) at ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAccess.java:241) at ojb.broker.PersistenceBrokerImpl.getDBObject(PersistenceBrokerImpl.java:798) at ojb.broker.PersistenceBrokerImpl.getObjectByIdentity(PersistenceBrokerImpl.java:927) at ojb.broker.PersistenceBrokerImpl.getObjectByExample(PersistenceBrokerImpl.java:901) at ojb.broker.PersistenceBrokerImpl.getObjectByQuery(PersistenceBrokerImpl.java:947) at ojb.broker.util.SequenceManagerDefaultImpl.getNextId(SequenceManagerDefaultImpl.java:112) at ojb.broker.util.SequenceManagerDefaultImpl.getUniqueId(SequenceManagerDefaultImpl.java:140) at ojb.broker.metadata.ClassDescriptor.getAutoIncrementValue(ClassDescriptor.java:736) at ojb.broker.metadata.ClassDescriptor.getKeyValues(ClassDescriptor.java:712) at ojb.broker.Identity.<init>(Identity.java:75) at test.ojb.tutorial2.UCEnterNewProduct.apply(UCEnterNewProduct.java:52) at test.ojb.tutorial2.Application.run(Application.java:99) at test.ojb.tutorial2.Application.main(Application.java:66) null java.lang.NullPointerException at ojb.broker.metadata.ClassDescriptor.getScheme(ClassDescriptor.java:160) at ojb.broker.accesslayer.SqlGenerator.getPreparedSelectByPkStatement(SqlGenerator.java:357) at ojb.broker.accesslayer.StatementsForClass.getSelectByPKkStmt(StatementsForClass.java:266) at ojb.broker.accesslayer.StatementManager.getSelectByPKStatement(StatementManager.java:213) at ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAccess.java:241) at ojb.broker.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:271) at ojb.broker.util.SequenceManagerDefaultImpl.getNextId(SequenceManagerDefaultImpl.java:122) at ojb.broker.util.SequenceManagerDefaultImpl.getUniqueId(SequenceManagerDefaultImpl.java:140) at ojb.broker.metadata.ClassDescriptor.getAutoIncrementValue(ClassDescriptor.java:736) at ojb.broker.metadata.ClassDescriptor.getKeyValues(ClassDescriptor.java:712) at ojb.broker.Identity.<init>(Identity.java:75) at test.ojb.tutorial2.UCEnterNewProduct.apply(UCEnterNewProduct.java:52) at test.ojb.tutorial2.Application.run(Application.java:99) at test.ojb.tutorial2.Application.main(Application.java:66) ....... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I'm using classes12.zip from Oracle with Oracle 8.1.6 and not the OCI driver, All tables were created in the database and select give me the right result. What's wrong with this setup ? Thanks. |
From: David F. <dw...@la...> - 2001-10-03 20:02:55
|
In the JDBCAccess layer, you use the getArray() call for access the column in the result set for VARBINARY. I find that this needs to be getBytes() instead. First, InstantDB doesn't implement getArray() so any test with it fails immediately. Second, getBytes() also works for Oracle 8.1.7 and not getArray(). I don't see any test for the VARBINARY type in your JUNIT test, so there is not systematic testing of this option in the software. Am I doing something wrong? Dave |
From: David F. <dw...@la...> - 2001-10-03 19:11:05
|
I notice that in the ObjectCacheDefaultImpl class which is an implementation of ObjectCache, that it extends the implementation by adding methods not defined in the ObjectCache interface. This is true in some other classes, too, such as SequenceManagerDefaultImpl. Thus one cannot pass an instance of the ObjectCache around because some methods aren't defined there. Is this intentional? This seems to me to be a slightly strange design pattern. Usually I would have a class that implements the interface and then extend that. Thanks, Dave |
From: Thomas M. <tho...@ho...> - 2001-10-03 18:43:58
|
Hi Michal, Thanks for your detailed bug report. Michal Kleczek wrote: > > Hi, > I found a couple of bugs in ODMG implementation: > > 1. calling Database.lookup after Database.bind in the same transaction > throws ObjectNameNotFoundException > That's because ObjectStateTable.put only registers NamedRootsEntry in the > curren transaction and > ObjectStateTable.get tries to read it from the PersistenceBroker. You are right. According to the ODMG spec. a bind, lookup sequence within one transaction should find the bound item and not throw an exception. My current design just can't do this as it relies on the persistent map which is only written to on transaction commit. I'll think about a solution. As a workaround you cansplit your code in two transactions: in the first one perform the bind, in the second the lookup. (that's what I#ve been doing in the bind/lookup examples. > 2. ObjectStateTable.commit: > Before throwing TransactionAbortedException it should call > PersistenceBroker.abortTransaction(). > Otherwise the database can be left in inconsistent state (some of the > objects may be already persistent while others not). > Oooh, this is a really ugly priority 1 bug! I'll fix it immediately. Thanks again, Thomas > Regards, > Michal Kleczek > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Thomas M. <tho...@ho...> - 2001-10-03 18:06:22
|
Hi David, Thanks for your careful observance. This is quite a strange bug: I can't reproduce it under WinNT but only sporadically under Linux. I tried to debug into this error, but during debugging it never happened. I decided to ignore it until I have a clearer understanding of what's going wrong... Thanks, Thomas David Forslund wrote: > > With the build.xml file (now on sourceforge) and using version 5.180, I get > the following: > .... > [junit] sequence of items in list: > [junit] 88889, 88890, 88891, 88892, 88893, > [junit] java.lang.IllegalArgumentException: argument type mismatch > [junit] [junit] class: ojb.odmg.NamedRootsEntry > [junit] args: > at java.lang.reflect.Constructor.newInstance(Native Method) > junit] the_dlist_3, > [junit] at > ojb.broker.accesslayer.JdbcAccess.readObjectFromResultSet(Jdb > Access.java:305) > [junit] at > ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAcces > .java:249) > [junit] [B@4ec44, > [junit] argument type mismatch > [junit] at > ojb.broker.PersistenceBrokerImpl.getDBObject(PersistenceBroke > Impl.java:798) > [junit] at > ojb.broker.PersistenceBrokerImpl.getObjectByIdentity(Persiste > ceBrokerImpl.java:927) > [junit] at > ojb.broker.PersistenceBrokerImpl.getObjectByExample(Persisten > eBrokerImpl.java:901) > [junit] at > ojb.broker.PersistenceBrokerImpl.getObjectByQuery(Persistence > rokerImpl.java:947) > [junit] at ojb.odmg.NamedRootsMap.get(NamedRootsMap.java:72) > [junit] at ojb.odmg.DatabaseImpl.lookup(DatabaseImpl.java:122) > [junit] at test.ojb.odmg.DListTest.testAdding(DListTest.java:166) > [junit] at java.lang.reflect.Method.invoke(Native Method) > [junit] at junit.framework.TestCase.runTest(TestCase.java:155) > [junit] at junit.framework.TestCase.runBare(TestCase.java:129) > [junit] at junit.framework.TestResult$1.protect(TestResult.java:100) > [junit] at junit.framework.TestResult.runProtected(TestResult.java:117) > [junit] at junit.framework.TestResult.run(TestResult.java:103) > [junit] at junit.framework.TestCase.run(TestCase.java:120) > [junit] Name not found: the_dlist_3 > [junit] at junit.framework.TestSuite.run(TestSuite.java:144) > [junit] at junit.framework.TestSuite.run(TestSuite.java:144) > [junit] at junit.textui.TestRunner.doRun(TestRunner.java:61) > [junit] at junit.textui.TestRunner.start(TestRunner.java:242) > [junit] at junit.textui.TestRunner.main(TestRunner.java:94) > [junit] org.odmg.ObjectNameNotFoundException: Name not found: the_dlist_3 > [junit] at ojb.odmg.DatabaseImpl.lookup(DatabaseImpl.java:136) > [junit] at test.ojb.odmg.DListTest.testAdding(DListTest.java:166) > [junit] at java.lang.reflect.Method.invoke(Native Method) > [junit] at junit.framework.TestCase.runTest(TestCase.java:155) > [junit] at junit.framework.TestCase.runBare(TestCase.java:129) > [junit] at junit.framework.TestResult$1.protect(TestResult.java:100) > [junit] at junit.framework.TestResult.runProtected(TestResult.java:117) > [junit] at junit.framework.TestResult.run(TestResult.java:103) > [junit] at junit.framework.TestCase.run(TestCase.java:120) > [junit] at junit.framework.TestSuite.run(TestSuite.java:144) > [junit] at junit.framework.TestSuite.run(TestSuite.java:144) > [junit] at junit.textui.TestRunner.doRun(TestRunner.java:61) > [junit] at junit.textui.TestRunner.start(TestRunner.java:242) > [junit] at junit.textui.TestRunner.main(TestRunner.java:94) > [junit] F.88894, 88895, 88896, 88897, 88898, > [junit] 88894, 88895, 88899, 88896, 88897, 88898, > [junit] 88900, 88894, 88895, 88899, 88896, 88897, 88898, > [junit] 88900, 88894, 88895, 88899, 88896, 88897, 88898, 88901, > [junit] beforeCommit: test.ojb.odmg.Article{88896} > [junit] beforeCommit: test.ojb.odmg.Article{88900} > [junit] beforeCommit: test.ojb.odmg.Article{88898} > [junit] beforeCommit: test.ojb.odmg.Article{88901} > [junit] beforeCommit: test.ojb.odmg.Article{88894} > [junit] beforeCommit: test.ojb.odmg.Article{88897} > [junit] beforeCommit: test.ojb.odmg.Article{88895} > [junit] beforeCommit: test.ojb.odmg.Article{88899} > [junit] afterCommit: test.ojb.odmg.Article{88896} > [junit] afterCommit: test.ojb.odmg.Article{88900} > [junit] afterCommit: test.ojb.odmg.Article{88898} > [junit] afterCommit: test.ojb.odmg.Article{88901} > [junit] afterCommit: test.ojb.odmg.Article{88894} > [junit] afterCommit: test.ojb.odmg.Article{88897} > [junit] afterCommit: test.ojb.odmg.Article{88895} > [junit] afterCommit: test.ojb.odmg.Article{88899} > [junit] sequence of items in list: > [junit] 88900, 88894, 88895, 88899, 88896, 88897, 88898, 88901, > [junit] sequence of items in lookedup list: > [junit] 88900, 88894, 88895, 88899, 88896, 88897, 88898, 88901, > [junit] .beforeCommit: test.ojb.odmg.Article{88902} > [junit] beforeCommit: test.ojb.odmg.Article{88903} > [junit] beforeCommit: test.ojb.odmg.Article{88904} > [junit] beforeCommit: test.ojb.odmg.Article{88905} > [junit] beforeCommit: test.ojb.odmg.Article{88906} > [junit] afterCommit: test.ojb.odmg.Article{88902} > [junit] afterCommit: test.ojb.odmg.Article{88903} > [junit] afterCommit: test.ojb.odmg.Article{88904} > [junit] afterCommit: test.ojb.odmg.Article{88905} > [junit] afterCommit: test.ojb.odmg.Article{88906} > [junit] .. > [junit] Time: 11.937 > [junit] > [junit] junit.framework.AssertionFailedError > [junit] at junit.framework.Assert.fail(Assert.java:143) > [junit] FAILURES!!! > [junit] Test Results: > [junit] at junit.framework.Assert.fail(Assert.java:137) > [junit] Run: 12 Failures: 1 Errors: 0 > [junit] There was 1 failure: > [junit] 1) testAdding(test.ojb.odmg.DListTest) > [junit] at test.ojb.odmg.DListTest.testAdding(DListTest.java:180) > [junit] at java.lang.reflect.Method.invoke(Native Method) > [junit] at junit.framework.TestCase.runTest(TestCase.java:155) > [junit] at junit.framework.TestCase.runBare(TestCase.java:129) > [junit] at junit.framework.TestResult$1.protect(TestResult.java:100) > [junit] at junit.framework.TestResult.runProtected(TestResult.java:117) > [junit] at junit.framework.TestResult.run(TestResult.java:103) > [junit] at junit.framework.TestCase.run(TestCase.java:120) > [junit] at junit.framework.TestSuite.run(TestSuite.java:144) > [junit] at junit.framework.TestSuite.run(TestSuite.java:144) > [junit] at junit.textui.TestRunner.doRun(TestRunner.java:61) > [junit] at junit.textui.TestRunner.start(TestRunner.java:242) > [junit] > [junit] at junit.textui.TestRunner.main(TestRunner.java:94) > > BUILD FAILED > >:\Java\ojb-0.5.180\build.xml:205: Java returned: -1 > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: David F. <dw...@la...> - 2001-10-03 16:48:24
|
With the build.xml file (now on sourceforge) and using version 5.180, I get the following: .... [junit] sequence of items in list: [junit] 88889, 88890, 88891, 88892, 88893, [junit] java.lang.IllegalArgumentException: argument type mismatch [junit] [junit] class: ojb.odmg.NamedRootsEntry [junit] args: at java.lang.reflect.Constructor.newInstance(Native Method) junit] the_dlist_3, [junit] at ojb.broker.accesslayer.JdbcAccess.readObjectFromResultSet(Jdb Access.java:305) [junit] at ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAcces .java:249) [junit] [B@4ec44, [junit] argument type mismatch [junit] at ojb.broker.PersistenceBrokerImpl.getDBObject(PersistenceBroke Impl.java:798) [junit] at ojb.broker.PersistenceBrokerImpl.getObjectByIdentity(Persiste ceBrokerImpl.java:927) [junit] at ojb.broker.PersistenceBrokerImpl.getObjectByExample(Persisten eBrokerImpl.java:901) [junit] at ojb.broker.PersistenceBrokerImpl.getObjectByQuery(Persistence rokerImpl.java:947) [junit] at ojb.odmg.NamedRootsMap.get(NamedRootsMap.java:72) [junit] at ojb.odmg.DatabaseImpl.lookup(DatabaseImpl.java:122) [junit] at test.ojb.odmg.DListTest.testAdding(DListTest.java:166) [junit] at java.lang.reflect.Method.invoke(Native Method) [junit] at junit.framework.TestCase.runTest(TestCase.java:155) [junit] at junit.framework.TestCase.runBare(TestCase.java:129) [junit] at junit.framework.TestResult$1.protect(TestResult.java:100) [junit] at junit.framework.TestResult.runProtected(TestResult.java:117) [junit] at junit.framework.TestResult.run(TestResult.java:103) [junit] at junit.framework.TestCase.run(TestCase.java:120) [junit] Name not found: the_dlist_3 [junit] at junit.framework.TestSuite.run(TestSuite.java:144) [junit] at junit.framework.TestSuite.run(TestSuite.java:144) [junit] at junit.textui.TestRunner.doRun(TestRunner.java:61) [junit] at junit.textui.TestRunner.start(TestRunner.java:242) [junit] at junit.textui.TestRunner.main(TestRunner.java:94) [junit] org.odmg.ObjectNameNotFoundException: Name not found: the_dlist_3 [junit] at ojb.odmg.DatabaseImpl.lookup(DatabaseImpl.java:136) [junit] at test.ojb.odmg.DListTest.testAdding(DListTest.java:166) [junit] at java.lang.reflect.Method.invoke(Native Method) [junit] at junit.framework.TestCase.runTest(TestCase.java:155) [junit] at junit.framework.TestCase.runBare(TestCase.java:129) [junit] at junit.framework.TestResult$1.protect(TestResult.java:100) [junit] at junit.framework.TestResult.runProtected(TestResult.java:117) [junit] at junit.framework.TestResult.run(TestResult.java:103) [junit] at junit.framework.TestCase.run(TestCase.java:120) [junit] at junit.framework.TestSuite.run(TestSuite.java:144) [junit] at junit.framework.TestSuite.run(TestSuite.java:144) [junit] at junit.textui.TestRunner.doRun(TestRunner.java:61) [junit] at junit.textui.TestRunner.start(TestRunner.java:242) [junit] at junit.textui.TestRunner.main(TestRunner.java:94) [junit] F.88894, 88895, 88896, 88897, 88898, [junit] 88894, 88895, 88899, 88896, 88897, 88898, [junit] 88900, 88894, 88895, 88899, 88896, 88897, 88898, [junit] 88900, 88894, 88895, 88899, 88896, 88897, 88898, 88901, [junit] beforeCommit: test.ojb.odmg.Article{88896} [junit] beforeCommit: test.ojb.odmg.Article{88900} [junit] beforeCommit: test.ojb.odmg.Article{88898} [junit] beforeCommit: test.ojb.odmg.Article{88901} [junit] beforeCommit: test.ojb.odmg.Article{88894} [junit] beforeCommit: test.ojb.odmg.Article{88897} [junit] beforeCommit: test.ojb.odmg.Article{88895} [junit] beforeCommit: test.ojb.odmg.Article{88899} [junit] afterCommit: test.ojb.odmg.Article{88896} [junit] afterCommit: test.ojb.odmg.Article{88900} [junit] afterCommit: test.ojb.odmg.Article{88898} [junit] afterCommit: test.ojb.odmg.Article{88901} [junit] afterCommit: test.ojb.odmg.Article{88894} [junit] afterCommit: test.ojb.odmg.Article{88897} [junit] afterCommit: test.ojb.odmg.Article{88895} [junit] afterCommit: test.ojb.odmg.Article{88899} [junit] sequence of items in list: [junit] 88900, 88894, 88895, 88899, 88896, 88897, 88898, 88901, [junit] sequence of items in lookedup list: [junit] 88900, 88894, 88895, 88899, 88896, 88897, 88898, 88901, [junit] .beforeCommit: test.ojb.odmg.Article{88902} [junit] beforeCommit: test.ojb.odmg.Article{88903} [junit] beforeCommit: test.ojb.odmg.Article{88904} [junit] beforeCommit: test.ojb.odmg.Article{88905} [junit] beforeCommit: test.ojb.odmg.Article{88906} [junit] afterCommit: test.ojb.odmg.Article{88902} [junit] afterCommit: test.ojb.odmg.Article{88903} [junit] afterCommit: test.ojb.odmg.Article{88904} [junit] afterCommit: test.ojb.odmg.Article{88905} [junit] afterCommit: test.ojb.odmg.Article{88906} [junit] .. [junit] Time: 11.937 [junit] [junit] junit.framework.AssertionFailedError [junit] at junit.framework.Assert.fail(Assert.java:143) [junit] FAILURES!!! [junit] Test Results: [junit] at junit.framework.Assert.fail(Assert.java:137) [junit] Run: 12 Failures: 1 Errors: 0 [junit] There was 1 failure: [junit] 1) testAdding(test.ojb.odmg.DListTest) [junit] at test.ojb.odmg.DListTest.testAdding(DListTest.java:180) [junit] at java.lang.reflect.Method.invoke(Native Method) [junit] at junit.framework.TestCase.runTest(TestCase.java:155) [junit] at junit.framework.TestCase.runBare(TestCase.java:129) [junit] at junit.framework.TestResult$1.protect(TestResult.java:100) [junit] at junit.framework.TestResult.runProtected(TestResult.java:117) [junit] at junit.framework.TestResult.run(TestResult.java:103) [junit] at junit.framework.TestCase.run(TestCase.java:120) [junit] at junit.framework.TestSuite.run(TestSuite.java:144) [junit] at junit.framework.TestSuite.run(TestSuite.java:144) [junit] at junit.textui.TestRunner.doRun(TestRunner.java:61) [junit] at junit.textui.TestRunner.start(TestRunner.java:242) [junit] [junit] at junit.textui.TestRunner.main(TestRunner.java:94) BUILD FAILED :\Java\ojb-0.5.180\build.xml:205: Java returned: -1 |
From: Michal K. <mkl...@ya...> - 2001-10-03 14:39:21
|
Hi, I found a couple of bugs in ODMG implementation: 1. calling Database.lookup after Database.bind in the same transaction throws ObjectNameNotFoundException That's because ObjectStateTable.put only registers NamedRootsEntry in the curren transaction and ObjectStateTable.get tries to read it from the PersistenceBroker. 2. ObjectStateTable.commit: Before throwing TransactionAbortedException it should call PersistenceBroker.abortTransaction(). Otherwise the database can be left in inconsistent state (some of the objects may be already persistent while others not). Regards, Michal Kleczek _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Jerome B. <jb...@vi...> - 2001-10-02 19:08:41
|
Hi all, Could someone send me the new build.xml file or update cvs. Thanks, Jerome B. |
From: Mahler T. <tho...@it...> - 2001-10-02 07:54:15
|
Hi again Charles, > -----Urspr=FCngliche Nachricht----- > Von: Charles Anthony [mailto:cha...@hp...] > Gesendet: Montag, 1. Oktober 2001 17:43 > An: 'obj...@li...' > Betreff: [Objectbridge-developers] NamedRoots on MS Sql >=20 >=20 > Hi all, I haven't managed to get NamedRoots on SQL Server=20 > working yet... has > anyone else ? >=20 > I've tried with two different JDBC drivers (Atinav and iNet=20 > Opta 2000), and > both throw the following exception when I attempt to bind an=20 > object to a > name.... >=20 > [Atinav][JDBC SQL Server Driver] Object type not supported > java.sql.SQLException: [Atinav][JDBC SQL Server Driver] =20 > Object type not > supported > at net.avenir.jdbc2.l.setObject(Unknown Source) > at > ojb.broker.accesslayer.StatementManager.bindInsert(StatementMa > nager.java:120 > ) > at > ojb.broker.accesslayer.JdbcAccess.executeInsert(JdbcAccess.java:129) > at > ojb.broker.PersistenceBrokerImpl.store(PersistenceBrokerImpl.j > ava:1069) > at > = ojb.broker.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:276) > at > ojb.broker.PersistenceBrokerImpl.store(PersistenceBrokerImpl.j > ava:1025) > at ojb.odmg.states.StateNewDirty.commit(StateNewDirty.java:110) > at ojb.odmg.ObjectStateTable.commit(ObjectStateTable.java:105) > at ojb.odmg.TransactionImpl.doCommit(TransactionImpl.java:250) > at ojb.odmg.TransactionImpl.commit(TransactionImpl.java:399) > at > = accountingprototype.test.CreateAgreement.main(CreateAgreement.java:47) >=20 > I've tried changing the OJB_NRM table to be VARBINARY (and=20 > modified the > appropriate mapping in the repository.xml file), but to no avail. >=20 > Neither of the drivers supports setArray/getArray, it=20 > transpires - does > anyone have an MSSQL jdbc driver that does ? >=20 I have been working with MS SQL Server some time ago. It has support = for VARBINARY & co. Thus I suspect this is really a bug in the JDBC = drivers. If you don't find any better driver you migth try to use a ConversionSTrategy to translate the byte arrays containing the = serialized OIDs from/to Strings. See the howto: http://objectbridge.sourceforge.net/conversions.html HTH, Thomas=20 > With thanks, >=20 > Charles. >=20 >=20 > This email and any attachments are strictly confidential and=20 > are intended > solely for the addressee. If you are not the intended=20 > recipient you must > not disclose, forward, copy or take any action in reliance on=20 > this message > or its attachments. If you have received this email in error=20 > please notify > the sender as soon as possible and delete it from your=20 > computer systems. > Any views or opinions presented are solely those of the=20 > author and do not > necessarily reflect those of HPD Software Limited or its affiliates. >=20 > At present the integrity of email across the internet cannot=20 > be guaranteed > and messages sent via this medium are potentially at risk. =20 > All liability > is excluded to the extent permitted by law for any claims=20 > arising as a re- > sult of the use of this medium to transmit information by or to=20 > HPD Software Limited or its affiliates. >=20 >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |
From: Mahler T. <tho...@it...> - 2001-10-02 07:49:08
|
Hi Ilia > -----Urspr=FCngliche Nachricht----- > Von: Ilia Iourovitski [mailto:iio...@yd...] > Gesendet: Montag, 1. Oktober 2001 22:32 > An: obj...@li... > Betreff: [Objectbridge-developers] RE: New release 0.5.180 (Thomas > Mahler) >=20 >=20 > What's happened with src / test / ojb / server files? The=20 > build.xml has > targets for them. >=20 I have eliminated those files. There will be a new Locking TestSuite in = the next release as a replacement for them. The ANT targets adressing this directory are buggy.=20 Attached you'll find a patched build.xml. Just replace your version = with this one and everything should work fine! Sorry for this bug! -- Thomas > Thanks, >=20 > Ilia >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |
From: Ilia I. <iio...@yd...> - 2001-10-01 20:35:46
|
What's happened with src / test / ojb / server files? The build.xml has targets for them. Thanks, Ilia |
From: Charles A. <cha...@hp...> - 2001-10-01 15:46:35
|
Hi all, I haven't managed to get NamedRoots on SQL Server working yet... has anyone else ? I've tried with two different JDBC drivers (Atinav and iNet Opta 2000), and both throw the following exception when I attempt to bind an object to a name.... [Atinav][JDBC SQL Server Driver] Object type not supported java.sql.SQLException: [Atinav][JDBC SQL Server Driver] Object type not supported at net.avenir.jdbc2.l.setObject(Unknown Source) at ojb.broker.accesslayer.StatementManager.bindInsert(StatementManager.java:120 ) at ojb.broker.accesslayer.JdbcAccess.executeInsert(JdbcAccess.java:129) at ojb.broker.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1069) at ojb.broker.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:276) at ojb.broker.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1025) at ojb.odmg.states.StateNewDirty.commit(StateNewDirty.java:110) at ojb.odmg.ObjectStateTable.commit(ObjectStateTable.java:105) at ojb.odmg.TransactionImpl.doCommit(TransactionImpl.java:250) at ojb.odmg.TransactionImpl.commit(TransactionImpl.java:399) at accountingprototype.test.CreateAgreement.main(CreateAgreement.java:47) I've tried changing the OJB_NRM table to be VARBINARY (and modified the appropriate mapping in the repository.xml file), but to no avail. Neither of the drivers supports setArray/getArray, it transpires - does anyone have an MSSQL jdbc driver that does ? With thanks, Charles. This email and any attachments are strictly confidential and are intended solely for the addressee. If you are not the intended recipient you must not disclose, forward, copy or take any action in reliance on this message or its attachments. If you have received this email in error please notify the sender as soon as possible and delete it from your computer systems. Any views or opinions presented are solely those of the author and do not necessarily reflect those of HPD Software Limited or its affiliates. At present the integrity of email across the internet cannot be guaranteed and messages sent via this medium are potentially at risk. All liability is excluded to the extent permitted by law for any claims arising as a re- sult of the use of this medium to transmit information by or to HPD Software Limited or its affiliates. |
From: Thomas M. <tho...@ho...> - 2001-09-29 10:55:38
|
Hi all, just assembled a new release and made it available on sourceforge. It has some major new features and I have worked a bit to improve the documentation. I hope you don't have any problems with release! >From the release notes: Release 0.5.180 changes in this release: New features - new Concept of RowReaders to let user interact with object matreialization from ResultSet Rows - Mapping inheritance on one table support - Make LockManager pluggable - Sample JDBCDescriptor for mySQL - Distributed Locking - Integrate DDL-Generator - PostgresSql support - MySQL supprt - Make Cache pluggable - Make SequenceManager pluggable - Make ConnectionFactory pluggable - Write FAQ - Order by ASC or DESC - Provide a JDNI based ConnectionFactory - Allow sequence numbering via declaration in xml file - started Size- and Timelimited cache implementations - Docs for OJB.properties - Docs for RowReader - Docs on cache an Sequence Manager - Started Tutorial 3 refactorings - Move all startup config to OJB.properties bug fixes - Proper implementation of AccessControl for Reflective access to private attributes - Bug in PBImpl: enumeration of Connections is always empty - Inconsistency of FieldDescriptor ids between INSERT and UPDATE statements - Bug: same Statement is used across several brokers ! - Implement Java / SQL mapping according to JDBC spec. - Bug in ServerPool.roundrobin() - Connection timeouts make connections invalid: bug More information is available at http://objectbridge.sourceforge.net best regards, -- Thomas |
From: Thomas M. <tho...@ho...> - 2001-09-29 08:57:17
|
Hi Sreedhar, Thanks for your interest! > sre...@ps... wrote: > > Hi: > > I have couple of quick questions on objectbridge. > 1. Can I use javax.transacation.UserTransaction to mark my > transaction boundaries. > 2. Can I use JDBC datasource in the mapping file to get database > connections (like Castor) > ad 1.: Not yet. ad 2.: Yes, with new release 0.5.180 (will be released today) you can use Datasources and JNDI lookup to obtain JDBC Connections! HTH, -- Thomas > Thanks -- Sree |
From: Mahler T. <tho...@it...> - 2001-09-26 09:02:59
|
Hi Rainer, You have to use ODMG Collections to have proper registration of your = objects to transaction. in DListImpl the removing of elemnts is implemented as follows: public Object remove(int index) { DListEntry entry =3D (DListEntry) elements.get(index); TransactionImpl tx =3D getCurrentTransaction(); tx.markDelete(entry); return entry.getRealSubject(); } HTH, -- Thomas > -----Urspr=FCngliche Nachricht----- > Von: Bischof, Rainer [mailto:rai...@ed...] > Gesendet: Mittwoch, 26. September 2001 09:21 > An: obj...@li... > Betreff: RE: [Objectbridge-developers] Automated deletion of = depending > obj ects > Wichtigkeit: Hoch >=20 >=20 > Thanks for your answer Thomas!=20 > I had already seen this in the FAQ and I am using the ODMG=20 > interface. But it > is not clear to me whether I have to use ODMG collections=20 > (DList, etc) or a > normal Vector. > That's all. >=20 > Thanks >=20 >=20 >=20 > Rainer Bischof >=20 >=20 > > -----Original Message----- > > From: Mahler Thomas [mailto:tho...@it...] > > Sent: Dienstag, 25. September 2001 17:04 > > To: Bischof, Rainer; = 'obj...@li...' > > Subject: AW: [Objectbridge-developers] Automated deletion=20 > of depending > > obj ects > >=20 > >=20 > > Hi Rainer, > >=20 > > > -----Urspr=FCngliche Nachricht----- > > > Von: Bischof, Rainer [mailto:rai...@ed...] > > > Gesendet: Dienstag, 25. September 2001 16:53 > > > An: 'obj...@li...' > > > Betreff: [Objectbridge-developers] Automated deletion of = depending > > > objects > > > Wichtigkeit: Hoch > > >=20 > > >=20 > > > Hi Thomas, > > >=20 > > > somewhere I have read that OJB supports automated deletion of=20 > > > depending > > > objects in a 1-m relationship. The question is: how do I do that? > > >=20 > > > I have an object which contains a Vector of depending=20 > > > objects. I want to > > > delete one of these. So I just open a transaction, get a=20 > > > handle to the main > > > object and remove one of the depending objects from the Vector. = On > > > transaction submit I would expect that OJB removes the=20 > > > corresponding row in > > > the table. > > >=20 > > > This does not happen for me ;-( > > > Mapping has "true" entries for automated retrieval, update=20 > > > and delete. Do I > > > need to use an ODMG collection instead of the Vector? > > >=20 > >=20 > > Yes, you need object level transactions that come only with ODMG ! > >=20 > > See excerpt from the FAQ: > >=20 > > Say you use the PB to query an object O that has a collection=20 > > attribute col > > with five elements a,b,c,d,e. Next you delete Objects d and e=20 > > from col and > > store O again with PersistenceBroker.store(O); > > PB will store the remaining objects a,b,c. But it will NOT=20 > > delete d and e ! > > If you then requery object O it will again contain a,b,c,d,e !!!=20 > > The PB keeps no transactional state of the persistent=20 > > Objects, thus it does > > not know that d and e have to be deleted. (as a side note:=20 > > deletion of d and > > e could also be an error, as there might be references to=20 > > them from other > > objects !!!) > > Using ODMG for the above scenario will eliminate all trouble:=20 > > Objects are > > registered to a transaction so that on commit of the=20 > > transaction it knows > > that d and e do not longer belong to the collection. the ODMG=20 > > collection > > will not delete the objects d and e but only the REFERENCES from = the > > collection to those objects! > >=20 > >=20 > > > Thanks > > > Rainer > > >=20 > > >=20 > > > _______________________________________________ > > > Objectbridge-developers mailing list > > > Obj...@li... > > >=20 https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > >=20 >=20 >=20 _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: Bischof, R. <rai...@ed...> - 2001-09-26 07:21:08
|
Thanks for your answer Thomas!=20 I had already seen this in the FAQ and I am using the ODMG interface. = But it is not clear to me whether I have to use ODMG collections (DList, etc) = or a normal Vector. That's all. Thanks Rainer Bischof > -----Original Message----- > From: Mahler Thomas [mailto:tho...@it...] > Sent: Dienstag, 25. September 2001 17:04 > To: Bischof, Rainer; 'obj...@li...' > Subject: AW: [Objectbridge-developers] Automated deletion of = depending > obj ects >=20 >=20 > Hi Rainer, >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: Bischof, Rainer [mailto:rai...@ed...] > > Gesendet: Dienstag, 25. September 2001 16:53 > > An: 'obj...@li...' > > Betreff: [Objectbridge-developers] Automated deletion of depending > > objects > > Wichtigkeit: Hoch > >=20 > >=20 > > Hi Thomas, > >=20 > > somewhere I have read that OJB supports automated deletion of=20 > > depending > > objects in a 1-m relationship. The question is: how do I do that? > >=20 > > I have an object which contains a Vector of depending=20 > > objects. I want to > > delete one of these. So I just open a transaction, get a=20 > > handle to the main > > object and remove one of the depending objects from the Vector. On > > transaction submit I would expect that OJB removes the=20 > > corresponding row in > > the table. > >=20 > > This does not happen for me ;-( > > Mapping has "true" entries for automated retrieval, update=20 > > and delete. Do I > > need to use an ODMG collection instead of the Vector? > >=20 >=20 > Yes, you need object level transactions that come only with ODMG ! >=20 > See excerpt from the FAQ: >=20 > Say you use the PB to query an object O that has a collection=20 > attribute col > with five elements a,b,c,d,e. Next you delete Objects d and e=20 > from col and > store O again with PersistenceBroker.store(O); > PB will store the remaining objects a,b,c. But it will NOT=20 > delete d and e ! > If you then requery object O it will again contain a,b,c,d,e !!!=20 > The PB keeps no transactional state of the persistent=20 > Objects, thus it does > not know that d and e have to be deleted. (as a side note:=20 > deletion of d and > e could also be an error, as there might be references to=20 > them from other > objects !!!) > Using ODMG for the above scenario will eliminate all trouble:=20 > Objects are > registered to a transaction so that on commit of the=20 > transaction it knows > that d and e do not longer belong to the collection. the ODMG=20 > collection > will not delete the objects d and e but only the REFERENCES from the > collection to those objects! >=20 >=20 > > Thanks > > Rainer > >=20 > >=20 > > _______________________________________________ > > Objectbridge-developers mailing list > > Obj...@li... > > = https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > >=20 >=20 >=20 |