PDA

View Full Version : @Startup accidentally not work


ur6lad
03-23-2010, 04:17 PM
I make small demo with @Startup:
META-INF/beans.xml (without any beans)
WEB-INF/web.xml
WEB-INF/classes/... (my classes)
index.html

my @startup class package some.package;

import javax.annotation.PostConstruct;
import javax.ejb.Startup;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Startup
public class DemoClass {

static {
System.out.println("DemoClass static block");
}

@PostConstruct
public void init() {
LOGGER.info("init runs");
}

protected final static Logger LOGGER = LoggerFactory.getLogger(SNMPGate.class);

}
But it doesn't write anything.

When I run the example from resin-doc/examples/ioc-binging it works.

emil
03-24-2010, 07:42 PM
What version of Resin is this with?

Thanks,
Emil

ur6lad
03-24-2010, 08:57 PM
4.0.4

Yesterday evening I upgrade to 4.0.5 and now it works.

emil
03-25-2010, 05:05 PM
Cool, thanks for the update.

Emil