james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Antypas" <jo...@telamon.com>
Subject Problem with mailets calling a class outside of JAMES
Date Fri, 01 Jun 2001 22:35:38 GMT
OK, I give....

I retrieved the latest JAMES, set it up, and started it up with default
mailers.  So far so good.  I then wanted to write a mailet that would allow
ALL pieces of mail sent through JAMES to go to a custom backend.  In effect,
JAMES parses the e-mail and carries out specialized API commands (in JAVA)
to do the actual work, later sending back an e-mail message telling the
sender what was actually done.

Almost so far so good....

I wrote a mailet similar to NotifySender and installed it.  Everything works
until I actually go to instantiate my API class.  At the point, all logging
stops.  To be more specific, assume I have a class with the following

public class FOO extends GenericMailet implements FOOListener {
	public FOO() {|
		log ("Foo initialized");
	public Foo.myMethod(String s1, String s2) {
		log("Foo myMethod called ("+s1+","+s2+")");
		... do magic ...

In my mailet service routine, I have code such the following

	.... use Mail api to get recipient etc....  all works...
	log("About to call FOO");	// This shows up in log
	FOO f = new FOO();		// No logging from FOO
	log("FOO called");		// No logging from here on

What am I missing?  It appears that calling the new() of this call causes
trouble.  I can't believe JAMES can't handle external calls, so I must be
missing something.  What's the right way to do this?

Many thanks....

John Antypas

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

View raw message