You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by abo <ab...@online.de> on 2003/05/05 18:16:30 UTC

how to use getAttribute?

Hi,

i would like to read during runtime, if useAutoCommit is set or not:

i tried:
	DescriptorRepository dr =
MetadataManager.getInstance().getRepository();
	String test =  dr.getAttribute("useAutoCommit");

but i always get null.

than i tried it with:

	DescriptorRepository dr =
MetadataManager.getInstance().readDescriptorRepository("repository_datab
ase.xml");

but than i get i fatal error.


i think i didn't get the whole thing...

thanks 
andreas



Re: how to use getAttribute?

Posted by Armin Waibel <ar...@code-au-lait.de>.
Try

broker.serviceConnectionManager().getConnectionDescriptor().getUseAutoCo
mmit()
for current used PB instance.

Or do

MetadataManager.getInstance().connectionRepository().getDescriptor(myPBK
ey).getUseAutoCommit()

or check directly used connection

broker.serviceConnectionManager().getConnection..getAutoCommit()
(but this call currently associate a connection with the used PB
instance)

regards,
Armin

----- Original Message -----
From: "abo" <ab...@online.de>
To: "'OJB Users List'" <oj...@db.apache.org>
Sent: Monday, May 05, 2003 6:16 PM
Subject: how to use getAttribute?


> Hi,
>
> i would like to read during runtime, if useAutoCommit is set or not:
>
> i tried:
> DescriptorRepository dr =
> MetadataManager.getInstance().getRepository();
> String test =  dr.getAttribute("useAutoCommit");
>
> but i always get null.
>
> than i tried it with:
>
> DescriptorRepository dr =
>
MetadataManager.getInstance().readDescriptorRepository("repository_datab
> ase.xml");
>
> but than i get i fatal error.
>
>
> i think i didn't get the whole thing...
>
> thanks
> andreas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>