Re: [castor-dev] [jdo] Reading, in the same transaction, a data just created (reading via oql query)

2004-11-11 Thread Patrick van Kann
This is certainly an interesting thread. Can we just clarify what we think the correct behaviour should be from Castor? In my opinion, Castor should not return created objects via OQL or any other means until they are committed. That's because in Castor's world, objects do not exist until they are

Re: [castor-dev] [jdo] Reading, in the same transaction, a data just created (reading via oql query)

2004-11-09 Thread Patrick van Kann
Sylvie, Your object won't be in the database until you call commit. Because OQL doesn't go through the cache, it won't find anything unless it is in the database. Why do you no longer have the ID? Surely you can get this from the object after create()? Cheers, Patrick -Original Messag

Re: [castor-dev] [JDO] lazy loaded collections

2004-05-06 Thread Patrick van Kann
Hello Jon, Unfortunately, lazy loading can only be used in short transactions. The underlying RelationCollection holds a relationship to the transaction context in which the parent object is loaded, which it calls upon to load objects when iterator.next is called. If you have closed the transac

Re: [castor-dev] Castor and DBCP question ...

2004-01-23 Thread Patrick van Kann
Hi Michel, I assume you are using this within a web application on an application server like JBoss or Tomcat - is this correct? Without knowing your configuration it is difficult to be sure what could be causing the problem. One thing that occurs to me is that it is also good practice to clos

Re: [castor-dev] WebSphere and User Transactions

2003-10-30 Thread Patrick van Kann
One other slight tip when using UserTransactions - call ut.begin() BEFORE calling jdo.getDatabase(); Hope it helps. Patrick Werner Guttmann wrote: Yes, David. There's plenty of people on this user group that use Websphere and Castor JDO together in an J2EE environment with transaction demarc

Re: [castor-dev] using TransactionManager & XA Resource Pool

2003-08-14 Thread Patrick van Kann
You can call setTransactionManager(String jndiNameOfTransactionManagerInYourJ2EEServer) on the JDO object. Typically you would do this on a JDO instance that itself would then be registered in JNDI for use by your app. You would then manage the transactions in castor using a UserTransaction ob

Re: [castor-dev] Error during loading servlet in Tomcat

2003-08-14 Thread Patrick van Kann
You are probably using lazy loading in a data object that is being stored in a session variable that is being persisted by serialisation. The underlying Collection type (RelationCollection) used by Castor in lazy loading is not serializable because it holds open a database connection that allow

Re: [castor-dev] Bug with complex ORDER BY queries (in Oracle?)

2003-07-01 Thread Patrick van Kann
I have also seen this behaviour before (with MS SQL Server 2000 and Postgres). I think it is related to bug 986. http://bugzilla.exolab.org/show_bug.cgi?id=986 Hope this helps, Patrick Bruce Snyder wrote: This one time, at band camp, Alexey A. Efimov said: AAE>I think you must swap ORDER BY

Re: [castor-dev] Multiple JDO objects with different mapping files

2003-03-18 Thread Patrick van Kann
Castor uses a caching mechanism that would probably account for the behaviour you are experiencing. The cache of the first JDO is invisible to the second, and vice-verse. When you use the db.load() method, the object will be loaded from the cache if it has been previous loaded. If you use an OQ

Re: [castor-dev] castor - validation problems :((

2003-03-06 Thread Patrick van Kann
I'm no Castor XML expert but it looks like your culprit is this # Uncomment the following to basically supress evaluation of Regular expressions org.exolab.castor.regexp=org.exolab.castor.xml.util.AlwaysTrueRegExpEvaluato r By uncommenting that, it seems like you are instructing Castor to use a Re

Re: [castor-dev] Can't create JDO instance using Tomcat & JNDI

2003-02-25 Thread Patrick van Kann
This might also help. I created an ObjectFactory that puts a JDO DataObject in JNDI at startup as part of a Castor taglib project I have just completed. As part of it I also configured the DataObject to use a Tyrex TransactionManager - this replicates a lot of the functions you would get in a f

Re: [castor-dev] UPDATE: ArrayIndexOutOfBoundsException after applicationis idle for hours

2003-02-12 Thread Patrick van Kann
Does this happen with other cache-types? I see you have selected count-limited in your mapping. Just a suggestion for tracking down the bug. Patrick Neil Aggarwal wrote: Hello again: I download the sources for Castor 0.9.4.2 and built a jar file with debugging symbols turned on. I then let

Re: [castor-dev] Using Castor -Tyrex - Tomcat 4.1.x(18)

2003-01-23 Thread Patrick van Kann
ger Sogor Aron wrote: Patrick, Great! However TyrexTransactionFactory is not in the server.xml, and still automagicly created? Have you seen anything to make TyrexTransactionManagerFactory automagic(no server.xml)? After posting the message I started to read th

Re: [castor-dev] Using Castor -Tyrex - Tomcat 4.1.x(18)

2003-01-23 Thread Patrick van Kann
Hello, See below. Class B.dosomething: I use the JDO. I get an error in ClassB because there is no runing Transaction. I think reading the documentation I have to tell Castor the JNDI name of the TransactionManager. Right? Is Tyrex TransactionManager in JNDI? Not in Tomcat. You need to crea

Re: [castor-dev] Persisting a tree structure ( recursive objects)

2002-11-11 Thread Patrick van Kann
Hello, You can achieve the functionality you need by using a kind of association class to hold the relationship between Folders. You would create a class like public class FolderRelation implements Serializable { private int id; private Folder parentFolder; private Folder childFolder;

Re: [castor-dev] question of beginner,where the error lie in??

2002-10-25 Thread Patrick van Kann
Hi Peter, There is at least one problem with your mapping, but to solve the problem we need to see the class JdoTest. The first problem is that you have specified an id field in this line of the mapping but you do not include id as a field. To clarify, I would expect to see something like:

Re: [castor-dev] one to one relationships

2002-10-22 Thread Patrick van Kann
at piece of software. -a -Original Message- From: Patrick van Kann [mailto:patrick.vankann@;fortune-cookie.com] Sent: Tuesday, October 22, 2002 4:14 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] one to one relationships Hello, Just a quick note -- There are two ways of achieving

Re: [castor-dev] Database connection to sql server 2000?

2002-10-14 Thread Patrick van Kann
Hello Phil, You need to use the DataSource class. However, my tests with the MS JDBC driver revealed that it was not compatible with many JDO features. The only JDBC driver I have successfully used in the Castor Testing Framework for JDO is the Opta 2000 driver by http://ww

Re: [castor-dev] Oracle error in result with Big Jdo File! Is LazyLoading a solution?

2002-09-25 Thread Patrick van Kann
You need to use the RelationCollection type for your related objects when using lazy loading. That at least explains the error you are receiving. Patrick patrick roekaerts wrote: >I have a problem with mapping when my Jdo File is too big. In fact when I >use a JdoMapping file which describe ju

Re: [castor-dev] SQL Server Driver

2002-09-20 Thread Patrick van Kann
I use the Inet Opta 2000 driver with success. I tried all of the drivers you mentioned below with the Castor Testing Framework and none of them passed all of the tests. However, the Opta driver passes them all fine. Unfortunately, they are not free... or even cheap. http://www.inetsoftware.de

Re: [castor-dev] enclosing quotes in SQL statement not being added

2002-07-16 Thread Patrick van Kann
t;> <> <> >>Thanks a ton for your assistance on this! >> >>-md >> >> >>-Original Message- >>From: Patrick van Kann [mailto:[EMAIL PROTECTED]] >>Sent: Monday, July 15, 2002 11:45 AM >>To: [EMAIL PROTECTED] >>Subject: Mo

Re: [castor-dev] REPOST - Multiple db setup , Key-Gen bug or mis-configuration?

2002-07-15 Thread Patrick van Kann
Hello Stephane, I think in general it is necessary to supply a test case when submitting a bug or a fix. It sounds like you possibly have a found a bug since I believe that Castor wasn't really designed for use with multiple DBs. If you have the time, it would be great if you could create a te

Re: [castor-dev] auto increment, object lifetime, one-to-many, jdbcquestions

2002-07-15 Thread Patrick van Kann
> > We don't have access to auto-increment features in our DB environment, > so we've been doing things with select max to mimic auto increment in > a safe guaranteed way. Is there any way to do this in Castor? > Try using the MAX key generator This uses the same algorithm. More information

Re: [castor-dev] enclosing quotes in SQL statement not being added

2002-07-15 Thread Patrick van Kann
What database are you using? I have seen similar behaviour before in either DB2 or MS SQL Server, but I resolved it. If you could post the full mapping and your database vendor I will see if I can find what caused it (and what the resolution was) Patrick Marc Dugger wrote: >The mapping I'm h

Re: [castor-dev] Many-to-many relationship not persisting

2002-07-12 Thread Patrick van Kann
Hello Mark, >Are you saying that by making the relationship bi-directional Castor >will then accept that the B objects are within the current transaction >context? > > No, I was merely observing that in order for Castor to work it is required that relationships are bi-directional, and in the c

Re: [castor-dev] help performing a like query

2002-07-11 Thread Patrick van Kann
Hello, I used like by adding the wildcards to the string I was searching for i.e. searchString = "%" + searchString + "%"; and then bound that to the OQL. I'm not sure if it's "best practice", but it worked on SQL Server at least. Patrick Gray Jones wrote: > Does anybody know what the synta

Re: [castor-dev] Many-to-many relationship not persisting

2002-07-11 Thread Patrick van Kann
Hello Mark, I have also noticed that you don't map the relationship bi-directionally. Castor requires your A class to have a collection of Bs and your B class to have a collection of As. You must explicitly add the As to the Bs and vice-verse (this can be done in the addX() method within

Re: [castor-dev] Connection Pooling without JNDI

2002-07-10 Thread Patrick van Kann
Yes, using the configuration below. The DataSource class needs to support the pooling bits of the API. Hope this helps, Patrick Arun Sudhakaran wrote: > HI, > > > I would like to if there is any way of using connection > pooling in Castor JDO without using JNDI.

Re: [castor-dev] IDENTITY problem on sqlserver

2002-07-05 Thread Patrick van Kann
Hello, Could you post the stack trace of the error please? Patrick BOUEY Stéphane wrote: > Hello, > > I have an error when i try to create an object with : > > JdoTest jdotest = new JdoTest(); > >db.begin(); > jdotest.setName("test"); > db.create(jdotest); > db.commit

Re: [castor-dev] Driver issue - help

2002-06-25 Thread Patrick van Kann
Hello, Just a quick addendum... the freetds jdbc driver is a JDBC 1.0 driver by default, you have to make the project from scratch to get partial JDBC 2.0. There is a JDBC2.0 branch of the freetds software called JTDS at http://sourceforge.net/project/showfiles.php?group_id=33291 However, I te

[castor-dev] [JDO] Castor limitation with complex object model

2002-05-31 Thread Patrick van Kann
Hello, I have found a situation where Castor can't handle updates on a reasonably complex object model. I have 3 classes Projects, Employees and Roles and 2 association classes that exist in relationships with each other of varying cardinalities (see comedy ASCII UML below). The real world prob

Re: [castor-dev] Castor JDO Status

2002-04-24 Thread Patrick van Kann
It seems to me that the following administrative changes would simplify things considerably 1) Split the JDO list from the XML list. 2) Split the JDO list into a "dev" list and a "user" list Talented, experienced programmers like Bruce, Thomas, the Kevins etc (apologies to anyone I missed by n

Re: [castor-dev] Using multiple mapping files

2002-04-19 Thread Patrick van Kann
Does being able to include one mapping file from another address this? I have done the following. http://castor.exolab.org/mapping.dtd";> Patrick Gray Jones wrote: > I'm wondering if castor can use multiple mapping files and if so if > anybody has done so. > > > > Ou

Re: [castor-dev] Date: Fri, 1 Mar 2002 18:54:41 -0600

2002-03-05 Thread Patrick van Kann
rsole >IT Integration Engineer >Vignette Corporation >512.741.4195 > >Visit http://www.vignette.com > >************ > > >-Original Message- >From: Patrick van Kann [mailto:[EMAIL PROTECTED]] >Sent: Monday, March 04, 2002 12:08 PM &

Re: [castor-dev] weblogic integration / JNDI

2002-03-01 Thread Patrick van Kann
I have not tried this myself but I understand that Weblogic 6.x has a JMX MBean server. The Castor-JBoss integration module is an MBean, it might be possible to combine them in this way. You can get it from Jboss.org. If I was compelled to use Weblogic I would definitely spend some time at lea

Re: [castor-dev] JDO and datasources

2002-02-01 Thread Patrick van Kann
Why not use the JNDI name of the datasource in your app server? For example, in JBoss I have defined a datasource called SQLServerPool as below. http://castor.exolab.org/jdo-conf.dtd";> Hope this helps, Patrick Sylvie RAMON wrote: >Hi, > >I want to use datasource, i think the jdo

Re: [castor-dev] Example for Tomcat????

2001-11-27 Thread Patrick van Kann
It's a classloader problem with Tomcat 3.2.x Patrick Markus Garscha wrote: >oh, > >when i put postgres.jar in the CLASSPATH of tomcat then tomcat fails >with: > >org.exolab.castor.mapping.MappingException: Could not find the class >de.gama.kadr.data.Person > >which is in the same jar as Agent.

[castor-dev] Case studies wanted: Production environments running Castor

2001-11-09 Thread Patrick van Kann
I was talking to a sales guy from Cocobase who (when I asked him why I should use Cocobase instead of Castor) claimed that there were no live, production sites using Castor JDO. Can anyone gainsay this? Any URLs for live sites of a reasonable scale/traffic level? I find the Cocobase claim hard

Re: [castor-dev] Castor with Sybase

2001-10-24 Thread Patrick van Kann
Check this page http://www.castor.org/database-conf.html I think the engine is case-sensitive. i.e. try engine="sybase" Patrick Duss Jean wrote: >Hi all, > >Someone knows how to configure the xml file in order >to declare a sybase database??? > >I have write a xml config file like this, but i

[castor-dev] jdo-conf.xsd and mapping.xsd - addendum

2001-09-12 Thread Patrick van Kann
If it would help, I could try and fix the problems with the above schema and submit it back for approval... would this be of any use? Thanks all, Patrick --- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] wi

[castor-dev] jdo-conf.xsd and mapping.xsd SourceGenerator support?

2001-09-12 Thread Patrick van Kann
I wish to generate classes for jdo-configurations and mappings in order to un/marshall the database.xml and mapping.xml in a servlet app, and hence edit them using JSPs for convenience. However, the source generator cannot generate classes for either schema. Has anyone tried this before? Is it

Re: [castor-dev] Possible JDO bug ("ObjectModifiedException")

2001-09-04 Thread Patrick van Kann
y.bind( new Integer( 50 ) ); > > I don't know if this will help, but just wondering if there is a > difference > between db.load and using the query. > > Give this a try and let us know. > > Adam > > -Original Message- > From: Patrick van Kann [mailt

Re: [castor-dev] Possible JDO bug ("ObjectModifiedException")

2001-09-04 Thread Patrick van Kann
ERE id = $1" ); > > query.bind( new Integer( 50 ) ); > > I don't know if this will help, but just wondering if there is a difference > between db.load and using the query. > > Give this a try and let us know. > > Adam > > -Original Message-

Re: [castor-dev] Possible JDO bug ("ObjectModifiedException")

2001-09-04 Thread Patrick van Kann
Adam Esterline wrote: > Have you tried the lazy load feature on the relationship fields? Thanks for the suggestion Adam, I have tried this, as well as different transaction levels (db.lock() as well as in the mapping). I still get the error, and in addition to this I have discovered it is ONLY

Re: [castor-dev] Bug in Castor JDO 0.9.3

2001-08-23 Thread Patrick van Kann
My apologies for posting this bug a second time however, I would point out that in the 2 weeks I have been a member of this list I have never successfully accessed the archive or been able to search it because it seems to be down all the time. Patrick florian ramillien wrote: > Patrick

Re: [castor-dev] Possible bug in Castor 0.93 classloader (when used in Tomcat 3.2.1 app)

2001-08-17 Thread Patrick van Kann
, Tomcat will ignore the (system) CLASSPATH completely, but will offer a more >sophisticated > classloader mechanism. > > Hope this helps > Werner > > Patrick van Kann wrote: > > > First, thanks for Castor. Aside from the problem below, I would have no > > hesitati