Hi,
I am new to Castor and am just feeling my way around. I am trying to
marshall/unmarshall java to xml and am stuck with an example. Would
appreciate any help on this.
I have two class :
Parent -> one to many Child
-----------------------
Parent: returns Set getChild();
Parent: void addChild(Child c);
........
Child:
--------------------
Child: returns parent getParent;
Child: setParent(Parent p);
........
So you see, they have cyclic reference. I am trying my mapping file as
(I am not sure if it's
correct at all)
------------------------------------------------------------------------
----------
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
"http://castor.exolab.org/mapping.dtd">
<mapping>
<class name="Parent" identity="id">
<field name="child" collection="set" type="Child" >
<bind-xml location="child" name="child" node="element"/>
</field>
</class>
</mapping>
------------------------------------------------------------------------
-------------
Can any one pls show me any examples?
Thanks
Shishir
-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 5:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] database connections
Fredy,
especially when working in a multi-threaded environment such as web
containers, please make sure that each module obtains its own Database
instance.
The penalty associate with this operation can be minimized through the
use of e.g. connection pools.
Regards
Werner
On Tue, 2 Mar 2004 21:31:27 +0100, [EMAIL PROTECTED]
wrote:
>
>Hey all,
>where should i open a database connection ?
>
>db = jdo.getDatabase();
>
>I've some classes in a webcontainer working with jdo and jdo
>transations.
>
>- userManagerJDO
>- adressManagerJDO
>- ...
>
>All these classes are in several modules (usermanager, adessmanager,
>...) and should be used irrespective of each other. Is there a problem
>if each module have a own database connection ? I'm using mysql. Or
>should the database connection be handled from a part of a library wich
>all modules can access ?
>
>Thanks
> Fredy
>
>
>
>
>
>--
>This message has been scanned for viruses and dangerous content by
>MailScanner, and is believed to be clean.
>MailScanner thanks transtec Computers for their support.
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.
MailScanner thanks transtec Computers for their support.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev