db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OJB-20) Allow the use of collection-factory
Date Mon, 25 Apr 2005 11:16:23 GMT
     [ http://issues.apache.org/jira/browse/OJB-20?page=comments#action_63646 ]
Thomas Dudziak commented on OJB-20:

If you want to configure it, then OJB.properties is fine. If you however have an existing
instance that you'd like OJB to use, then you should use the container that you can access
at the OJB instance (global) or the PersistenceConfiguration instance, both via the getComponentContainer
method. There you register your instance with the CollectionFactory interface type via the
setSingletonInstance method.
Note that you have to do that before using any OJB runtime functionality (e.g. PersistenceBroker


> Allow the use of collection-factory
> -----------------------------------
>          Key: OJB-20
>          URL: http://issues.apache.org/jira/browse/OJB-20
>      Project: OJB
>         Type: New Feature
>   Components: PB-API
>     Versions: 1.1 CVS
>     Reporter: Martin Taal
>     Assignee: Thomas Dudziak
>  Attachments: patch_coll_factory.txt
> Hi,
> This is a request for allowing a user to specify a collection-factory for a collection-descriptor.
The collection factory is used to create collection instances when the owner of the collection
is read from the database. 
> In my usecase I need to pass runtime information to the constructor of the collection
(i.e. the collection needs its owning object). This is for example for handling a notification
infrastructure in which changes to the collection are broadcasted to listeners who need to
know from which object the notification comes. The current collection-class implementation
in ojb 'only' supports zero-argument constructors which do not handle my usecase.
> I have made an implementation of the collection-factory in ojb which I will try to attach
(as a patch) to this request or otherwise send to the ojb-dev mailing list. If I can be of
help to get this implemented then please let me know. 
> gr. Martin Taal

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message