[JBoss Seam] - Re: seam, spring activemq
by henderson_mk
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
19Â years, 1Â month
[Persistence, JBoss/CMP, Hibernate, Database] - Inserting Oracle optimizer hints into queries
by warmachine
I have two JBossQL queries, one dynamic, that searches a huge Oracle table. Obviously, I use indices but the Oracle SQL optimizer thinks it's better to do a full table scan than use these indices. I kid you not. Tests demonstrate it's the worst plan.
Rather than messing around the optimizer, which will degrade other queries, it'll be better to insert an optimizer hint, such as /*+ RULES */ into the generated SQL and override the brain damage. However, I can't generate SQL, JBoss is doing that for me from the JBossQL. Is there anyway I can get something inserted into generated SQL queries?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027994#4027994
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027994
19Â years, 1Â month
[JBoss Seam] - Re: since today (JBSEAM-954?) I get NPE in setEntityManagerF
by codelion
JBSEAM-1009 is about (if switched on) explicitly setting login-required (and restrict) per page or per wildcard in a way that allows a specific page to be less restricted than a * site wide wildcard. For each (login-required and restrict) it picks the most specific page where it is defined and only evaluates that one, ignores less specific wildcards. Why needed, I'll explain if asked.
In that context it is unsecure if a missing login-required is interpreted as login-required="false".
By conicidence, that's what caused the interaction with 954, the mysterious afterRender beforeRender. The problem with afterRender beforeRender could occur any time there is no login-required but a restrict, but my work on 1009 made it happen sooner on my system.
The reasonable workaround I've code today in the mornig and will submit as patch for 1009 hopefully later today is that I now force all DTD public IDs for pages.xml and all whatever.page.xml to be the same, so if someone consciously switches to the new DTD in pages.xml with #IMPLIED then he won't be able to "forget" an old DTD in any whatever.page.xml. Because that old DTD would cause an undesired login-required="false".
I'll be happy to explain it again, but maybe we should have that conversation after I've submitted that 3rd version patch to 1009. I assume you want me to run it for some time here before submitting it :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027993#4027993
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027993
19Â years, 1Â month