Sorry, the mail had the same subject but is not referred to the previous
thread.
I took the example from the example-page "server-event" as folllows:
package org.superbiz.event;
import org.apache.openejb.observer.Observes;
import java.util.logging.Logger;
/**
* registered as service in openejb.xml, tomee.xml, resources.xml or openejb
system properties:
*
* listener = new://Service?class-name=org.superbiz.event.MyListener
* listener.logAllEvent = true
*/
public class MyListener {
private static final Logger LOGGER =
Logger.getLogger(MyListener.class.getName());
private static boolean logAllEvent = false; // static for testing
public void global(@Observes final Object event) {
LOGGER.info(">>> an event occured -> " + event.toString());
}
// configurable
public void setLogAllEvent(boolean logAllEvent) {
this.logAllEvent = logAllEvent;
}
public static boolean isLogAllEvent() {
return logAllEvent;
}
}
Configuration is done by a line in resources.xml:
<Service id"myapplistener" class-name="org.superbiz.event.MyListener" />
but it is not recognized.
--
View this message in context:
http://openejb.979440.n4.nabble.com/Unknown-error-in-Assembler-AppListener-could-not-be-found-tp4660431p4660437.html
Sent from the OpenEJB User mailing list archive at Nabble.com.