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
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
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
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
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
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
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
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
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
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
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
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
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
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
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;
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:
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
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
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
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
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
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
>
> 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
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
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
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
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
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.
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
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
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
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
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
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
&
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
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
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.
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
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
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
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
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
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-
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
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
, 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
46 matches
Mail list logo