I started writing a new JBoss service designed to use some existing seam components. But it seems that I cannot access these components due to non-existent contexts. Is it possible to use them differently than in a typical situation with JSF?
A small snippet to demonstrate what I want to do ...
@Service
public class MyService extends DefaultTimedService implements TimedObject, DefaultServiceInterface {
@Timeout
public void ejbTimeout(Timer timer) {
MyInterface loader = (MyInterface) Component.getInstance(MyInterface.SEAM_NAME, true);
}
}
This raises the following exception, for example:
java.lang.IllegalStateException: No application context active
at org.jboss.seam.Component.forName(Component.java:1945)
at org.jboss.seam.Component.getInstance(Component.java:2005)
source
share