You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Dr. Michael N. Lipp" <Mi...@Danet.de> on 2005/05/30 15:48:57 UTC

Digester: ObjectCreateRule

[I hope I haven't missed something but I could neither find a mailing
list dedicated to commons-digester nor an issue tracking system for
digester (tried bugzilla, scrab and jira).]

ObjectCreateRule uses the Digester's classloader for loading the class
of the object to be created. This may cause quite some problems in the
J2EE context where Thread.currentThread().contextClassLoader() should be
used for this.

Of course it is easy to derive a Rule that circumvents this.
Nevertheless, I'd consider it nice if Digester had such a rule out of
the box. I'd propose to add new constructors to ObjectCreateRule that
allow to pass a class loader to be used for object creation.

Regards,

    Michael

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


Re: Digester: ObjectCreateRule

Posted by Simon Kitching <sk...@apache.org>.
Hi Michael,

On Mon, 2005-05-30 at 15:48 +0200, Dr. Michael N. Lipp wrote:
> [I hope I haven't missed something but I could neither find a mailing
> list dedicated to commons-digester nor an issue tracking system for
> digester (tried bugzilla, scrab and jira).]

Mailing list commons-user@jakarta.apache.org is the correct list to use;
all commons projects deliberately use a single dev and user list.

Emails to that list (and this one) should contain [digester] at the
start of the subject line.

Issues are in bugzilla, under product=commons, component=digester.

See the "mailing lists" link in the left navbar of the commons or
commons-digester web pages.

> 
> ObjectCreateRule uses the Digester's classloader for loading the class
> of the object to be created. This may cause quite some problems in the
> J2EE context where Thread.currentThread().contextClassLoader() should be
> used for this.
> 
> Of course it is easy to derive a Rule that circumvents this.
> Nevertheless, I'd consider it nice if Digester had such a rule out of
> the box. I'd propose to add new constructors to ObjectCreateRule that
> allow to pass a class loader to be used for object creation.

See method Digester.setClassLoader. I think this will solve your issue.

Regards,

Simon



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