You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Norman Maurer <nm...@spam-box.de> on 2006/03/01 13:54:07 UTC

Use own classes

Hi,

is there a other way to use a modified james.class the do it dircetly in
the james source tree and build it ?

I was thining about but my modified classes in a jar and load them ..
with mailets and matchers its no problem but james core seems to be. Or
is there a configfile where i can setup in which package it is located ?

bye


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


Re: Use own classes

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Hi,
> 
> is there a other way to use a modified james.class the do it dircetly in
> the james source tree and build it ?
> 
> I was thining about but my modified classes in a jar and load them ..
> with mailets and matchers its no problem but james core seems to be. Or
> is there a configfile where i can setup in which package it is located ?


The only way is to change your assembly.xml and declare a different 
class for the "James" block.
You should use a different name so your class is not hidden by the 
default James class.

If you create a new block you have to create an xinfo file for that 
block too.

In 2.3.0a1 this should work also when your block is declared in a jar 
inside the SAR-INF/lib or a class in SAR-INF/classes but I never tried this.

Let us know if it works,
Stefano


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


Re: Use own classes

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Can you explain what you mean with create xinfo ? nad can provide an
> example ?

Look at the James.xinfo located in the same package as James.java 
(James.class). You will need to create a similar xinfo file for your own 
"James" component.

Every avalon component has an xinfo file that define its depedencies.
The assembly.xml define how to wire the components and what component 
supply each dependency.

Stefano


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


Re: Use own classes

Posted by Norman Maurer <nm...@spam-box.de>.
Thx for all your support. :-)


Am Mittwoch, den 01.03.2006, 14:57 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Can you explain what you mean with create xinfo ? nad can provide an
> > example ?
> 
> Look at the James.xinfo located in the same package as James.java 
> (James.class). You will need to create a similar xinfo file for your own 
> "James" component.
> 
> Every avalon component has an xinfo file that define its depedencies.
> The assembly.xml define how to wire the components and what component 
> supply each dependency.
> 
> Stefano
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> !EXCUBATOR:2,4405a8a0180749477313420!


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


Re: Use own classes

Posted by Norman Maurer <nm...@spam-box.de>.
By the way with xinfo and jar in SARV-INF/lib it works :-)

bye

Am Mittwoch, den 01.03.2006, 15:06 +0100 schrieb Norman Maurer:
> Thx for all your support. :-)
> 
> 
> Am Mittwoch, den 01.03.2006, 14:57 +0100 schrieb Stefano Bagnara:
> > Norman Maurer wrote:
> > > Can you explain what you mean with create xinfo ? nad can provide an
> > > example ?
> > 
> > Look at the James.xinfo located in the same package as James.java 
> > (James.class). You will need to create a similar xinfo file for your own 
> > "James" component.
> > 
> > Every avalon component has an xinfo file that define its depedencies.
> > The assembly.xml define how to wire the components and what component 
> > supply each dependency.
> > 
> > Stefano
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-dev-help@james.apache.org
> > !EXCUBATOR:2,4405a8a0180749477313420!
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> !EXCUBATOR:2,4405aab2197431868420657!


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


Re: Use own classes

Posted by Norman Maurer <nm...@spam-box.de>.
Can you explain what you mean with create xinfo ? nad can provide an
example ?

bye

Am Mittwoch, den 01.03.2006, 14:33 +0100 schrieb Stefano Bagnara:


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