I have done it for the database.xml file by using
ClassLoader.getSystemResource( "..." ).toString(). However, I think that
access to this may be limited by the policy files defined by the particular
J2EE server you may be using...
I have not tried it specifically with the mapping files.
Basica
Message-
From: Ebersole, Steven
Sent: Wednesday, April 24, 2002 3:26 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [castor-dev] DataSource through JNDI?
What is "java:/MSSQLPool"? It seems like you have, in your database.xml
file, something like the following:
Generally
From: Tse, Leo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 12:58 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] DataSource through JNDI?
O sorry for not being more clear on this.. but I'm running the app server on
the same machine
-Original Message-
From: Ebersole,
abaseRegistry.
java:308) [test]at
org.exolab.castor.jdo.JDO.getDatabase(JDO.java:559) [test] at
jdo.Test.run(Test.java:172) [test] at jdo.Test.main(Test.java:58)
-----Original Message-
From: Ebersole, Steven [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 12:00 PM
To: [
Anyone?
Steve Ebersole
IT Integration Engineer
Vignette Corporation
512.741.4195
Visit http://www.vignette.com
-Original Message-
From: Ebersole, Steven [mailto:[EMAIL PROTECTED]]
Sent: Monday
I use a JNDI DataSource in my database.xml and then bind the resulting JDO
object into JNDI. Works fine for me. What is the problem you are having?
Steve Ebersole
IT Integration Engineer
Vignette Corporation
512.741.4195
Visit http://www.vignette.
I have
been using Castor for a while now. Initially I choose Castor over OJB
simply because of its XML support. However, I am again evaluating OJB as a
replacement for Castor because we have done nothing with Castor-XML to
date.
In
terms of RDBMS persistence capibilities, in my opinio
Title: object being incorrectly read from cache
The
purpose of a cache is exactly what you describe: avoid having to hit the
database every time. If you absolutely need the latest data from the DB
(and there is a possiblity users will be directly updating the DB) then
turn caching off.
I do store it into JNDI. The JDO object is thread safe. It is the Database
object that each thread then uses.
That has been a pretty good approach.
And as for the path to the database.xml file, use a URL...
Steve Ebersole
IT Integration Engineer
Others may have a different take on this, but in my experience you are best
served not using Castor's concept of long transactions.
Thats just an opinion.
However, as for your issue:
I am guessing you are trying to persist AccountK, which has a reference to
AccountA. In a long transaction, w
Are you refering to defining a JNDI DataSource in the database.xml file? Or
storing the Castor JDO object into JNDI?
Steve Ebersole
IT Integration Engineer
Vignette Corporation
512.741.4195
Visit http://www.vignette.com
**
Does the query actually have a FROM clause (i.e., SELECT a FROM Asset a
WHERE ...)?
Is Asset.getSiteId().getId() really a valid sequence of calls on your
objects?
Steve Ebersole
IT Integration Engineer
Vignette Corporation
512.741.4195
Visit http:/
r methods causes
the exception.
Can someone give me a clue if this is possible, other than changing my
classes.
Theo
-----Original Message-
From: Ebersole, Steven [mailto:[EMAIL PROTECTED]]
Sent: 10 April 2002 17:49
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] collection="collecti
That is actually the correct way. In the mapping you define a type
java.util.Collection. The the actual object looks to accept a type of
java.util.List. This will not work.
Look at it this way. Try the following code (which is basically what you
are asking Castor to do):
public static vo
It looks like the problem may have to do with the way you try to set the
bi-directional relationship:
In your test code, you call addItem on the Channel instance. Then in that
method, you call setChannel on the incoming Item instance. The setChannel
method, however, referes to an instance varia
still need to call begin() and commit()? Or would that be handled
by the jta transaction manager?
Thanks!
-Original Message-
From: Ebersole, Steven [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 2:51 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Using Castor in a BMP entity
I use
Oracle and have successfully mapped NUMBER columns. Currently I am not
specifying constraints in the scale/precision of the number columns, though, so
I am not sure if that would cause a problem. I then simply map
java.lang.Integer and java.lang.Double values into the appropriate
co
Two ways to correct:
1) Define b as "dependent" on a; this is done in the mapping file and is
pretty well documeneted (see FAQs);
2) Change the client code to the following:
b = new B();
b.setTitle("some title");
db.create(b); // <- Add this line.
us testing.
Steve Ebersole
IT Integration Engineer
Vignette Corporation
512.741.4195
Visit http://www.vignette.com
-Original Message-----
From: Ebersole, Steven [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002
at checks for duplicates before adding to the List
}
public void removeProject(ProjectData removeMe) {
//some code, etc.
}
Ebersole, Steven wrote:
>You mentioned the correction for the 0.9.3.9 issue. Do you no which tag I
>need to checkout of CVS to get that correction?
>
>It seem
I am trying to check versions newer than 0.9.3.9 out of CVS by tag (using
anoncvs), but keep getting an error cannot write val-tag file.
Are anon users just not supposed to have access to newer revisions?
I am running into the problem with many sided collections where Castor will
not recognize
ignette Corporation
512.741.4195
Visit http://www.vignette.com
-Original Message-
From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 02, 2002 11:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Date: Fri, 1 Mar 2002 18:54:41
ilto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 10:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Date: Fri, 1 Mar 2002 18:54:41 -0600
This one time, at band camp, Ebersole, Steven said:
ES>The counts for company id=1 is correct (it really does have 1289
employees
ES>and 0 locati
neer
Vignette Corporation
512.741.4195
Visit http://www.vignette.com
-Original Message-
From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 10:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Date: Fri, 1 Mar 2002 18:54:41 -0600
This one time, at band camp, Eberso
IT Integration Engineer
Vignette Corporation
512.741.4195
Visit http://www.vignette.com
-Original Message-
From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 10:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Date:
We have run into a really interesting issue with our use of Castor. It
shows up when querying objects. We have a mapping (in part) as follows:
Company has a 0-to-many rel with a location
Company has a 0-to-many rel with employees
Both employee and location have a reference to their "owning" co
I actually do the following (which works):
JDO _jdo = new JDO();
... set up _jdo
_jdo.setTransactionManager("weblogic.transaction.TransactionManager" );
new javax.naming.InitialContext().rebind( JDO_BIND_NAME, _jdo ); // No
reference.
Then access as:
Object ref = new InitialContext().loo
Was there a reason you did not want to simply load the column value into the
object and then simply perform the bitwise manipulations there?
Steve Ebersole
IT Integration Engineer
Vignette Corporation
512.741.4195
Visit http://www.vignette.com
***
In the context of a long transaction, what is the correct way to persist an
object with a collection of children obtained from a join table?
Say, for example, I have these three tables:
STUDENT
---
STUDENT_ID INTEGER PK
COURSE
--
COURSE_ID INTEGER PK
STUDENT_COURSE
--
29 matches
Mail list logo