[jboss-user] [JBoss Seam] - Re: seam, spring activemq
henderson_mk
do-not-reply at jboss.com
Wed Mar 14 11:55:00 EDT 2007
hiya,
I previously had the SpringHook class setup like this:
| @Name("springHook")
| @Scope(APPLICATION)
| @Intercept(ALWAYS)
| @Startup
| public class SpringHook {
| private static Log log = LogFactory.getLog(SpringHook.class);
|
| @In(create=true)
| private Session svDatabase;
|
| public Session getSession(){return this.svDatabase;}
| public void setSession(Session s){this.svDatabase = s;}
| }
|
|
but that didn't work.
tried like so:
| <bean id="springHook" class="org.banana.utils.SpringHook" lazy-init="true">
| <property name="session"><ref local="hibernateSession"/></property>
| <seam:component intercept="ALWAYS" />
| </bean>
|
| <seam:instance name="svDatabase" id="hibernateSession" proxy="true"/>
|
but same error.
| exception is java.lang.IllegalStateException: No application context active
| caused by: java.lang.IllegalStateException: No application context active
| at org.jboss.seam.Component.forName(Component.java:1545)
| at org.jboss.seam.Component.getInstance(Component.java:1595)
| at org.jboss.seam.Component.getInstance(Component.java:1590)
| at org.jboss.seam.Component.getInstance(Component.java:1584)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027998#4027998
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027998
More information about the jboss-user
mailing list