Re: What broker gets used by proxies?

2003-05-29 Thread David Warnock
Can anyone help answer this question:

What broker is used to fill proxied collections when the original broker 
has been returned to the pool?

Thanks

David

If I do the following pseudo code what broker is used to fill the proxies?

  get a broker
  execute a query and get back some contact objects.
  close the broker
  access the proxied list of emailaddresses for a contact
Does the contact remember which broker was used to fill itself and use 
that again to get the proxied objects?

OR

Does the contact get a new broker, use it and close it?

If it is the first of these then I guess I am going to get potential 
multi-user issues as someone else may have started to use that broker by 
the time contact needs to load it's proxied objects.

So do I need to keep hold of a broker until I have finished all the 
operations on all the objects I get from that broker?
--
David Warnock, Sundayta Ltd. http://www.sundayta.com
iDocSys for Document Management. VisibleResults for Fundraising.
Development and Hosting of Web Applications and Sites.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: What broker gets used by proxies?

2003-05-29 Thread Armin Waibel
Hi David,

- Original Message -
From: David Warnock [EMAIL PROTECTED]
To: OJB Users List [EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 7:59 PM
Subject: Re: What broker gets used by proxies?


 Can anyone help answer this question:

 What broker is used to fill proxied collections when the original
broker
 has been returned to the pool?

Proxy was associated with PBKey of the 'original' broker and try find
an open PB instance with the same PBKey for the current thread, else
PB-pool was ask for a new PB instance.

see
CollectionProxy#getBroker()

regards,
Armin


 Thanks

 David

  If I do the following pseudo code what broker is used to fill the
proxies?
 
get a broker
execute a query and get back some contact objects.
close the broker
access the proxied list of emailaddresses for a contact
 
  Does the contact remember which broker was used to fill itself and
use
  that again to get the proxied objects?
 
  OR
 
  Does the contact get a new broker, use it and close it?
 
 
  If it is the first of these then I guess I am going to get potential
  multi-user issues as someone else may have started to use that
broker by
  the time contact needs to load it's proxied objects.
 
  So do I need to keep hold of a broker until I have finished all the
  operations on all the objects I get from that broker?

 --
 David Warnock, Sundayta Ltd. http://www.sundayta.com
 iDocSys for Document Management. VisibleResults for Fundraising.
 Development and Hosting of Web Applications and Sites.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What broker gets used by proxies?

2003-05-29 Thread David Warnock
Armin,

Whew, thanks. Panic over. Still I am re-architecuring a bit for 
performance so the original broker will be around long enough with it's 
cache.

Proxy was associated with PBKey of the 'original' broker and try find
an open PB instance with the same PBKey for the current thread, else
PB-pool was ask for a new PB instance.
see
CollectionProxy#getBroker()
--
David Warnock, Sundayta Ltd. http://www.sundayta.com
iDocSys for Document Management. VisibleResults for Fundraising.
Development and Hosting of Web Applications and Sites.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


What broker gets used by proxies?

2003-05-27 Thread David Warnock
Hi,

If I do the following pseudo code what broker is used to fill the proxies?

  get a broker
  execute a query and get back some contact objects.
  close the broker
  access the proxied list of emailaddresses for a contact
Does the contact remember which broker was used to fill itself and use 
that again to get the proxied objects?

OR

Does the contact get a new broker, use it and close it?

If it is the first of these then I guess I am going to get potential 
multi-user issues as someone else may have started to use that broker by 
the time contact needs to load it's proxied objects.

So do I need to keep hold of a broker until I have finished all the 
operations on all the objects I get from that broker?

Thanks

David
--
David Warnock, Sundayta Ltd. http://www.sundayta.com
iDocSys for Document Management. VisibleResults for Fundraising.
Development and Hosting of Web Applications and Sites.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]