[JBoss Seam] - Problem with exceptions.xml
by sjmenden
I am having problems getting exceptions.xml working. I want to get a simple scenario working of redirecting all exceptions to /error.xhtml.
exceptions.xml
| <exceptions>
| <exception>
| <redirect view-id="/error.xhtml">Unexpected failure</redirect>
| <end-conversation/>
| </exception>
| </exceptions>
|
And I am testing this by throwing a NPE in one of my EJBs(extends EntityHome). I am not getting the error page, and I am getting the debug.seam output embeded in my template.xhtml with the url of the page I was calling, in this case ticket.seam. The output is all crammed on the left hand side of the page in the navigation.
Any ideas how I can fix this. I even removed the debug jar and I still got that debug output (not the full debug.seam page though). I even tried:
| <component name="org.jboss.seam.core.init">
| <property name="debug">false</property>
| <property name="jndiPattern">@jndiPattern@</property>
| </component>
|
| and
|
| <context-param>
| <param-name>org.jboss.seam.core.init.debug</param-name>
| <param-value>false</param-value>
| </context-param>
|
but it changed nothing.
Optimally, I would like to keep the debug.seam page so I can reference it, but I would in general like to forward all exceptions to /error.xhtml. What am I doing wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997020#3997020
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997020
18 years
[EJB 3.0] - JTA EntityManager cannot access a transactions
by daleth
Let me preface this with I'm not sure if I should post this here or in in the Seam forums.
I have a Seam application that uses an embedded EJB3 container as it is meant to be deployed outside of JBoss AS (on Tomcat, specifically). However, there are also some background tasks that are meant to run via Quartz schedule jobs and update the database through the entity beans. Because these tasks are completely outside of Seam I'm getting the EntityManagerFactory through a JNDI lookup, however I get the following exception when I try to commit the entity beans
java.lang.IllegalStateException: JTA EntityManager cannot access a transactions
I've tried starting, and joining the entity manager to, through by using the begin() method on the following transactions and then doing an EntityManager.joinTransaction(). I tried looking up the TransactionManager and then I tried looking up the UserTransaction and using it. In both cases I was able to retrieve the object from the JNDI tree, but got the above error. As a last resort I also tried using EntityManager.getTransaction() which of course returned nothing because the manager was not currently joined to a transaction.
I'm sure I'm just missing something simple here but so far I haven't been able to figure it out. Any help would be really appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997011#3997011
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997011
18 years
[JBoss AOP] - Re: How to access intercepted methods in JSF?
by kabir.khan@jboss.com
"ykrishnaprasad" wrote : 1) If there is a return in the intercepted method(call or execution), the interceptor doesn't work.
| Is there anything i am missing?
|
Please define "doesn't work"
"ykrishnaprasad" wrote :
|
"ykrishnaprasad" wrote :
| 2) I have an AOP "Project1" with interceptor on a method in a class.
| I do not have a problem running the Project1 by itself(unless i use a return in my intercepted method).
| But if a take the Project1 jar(without jboss-aop.xml in the jar) file for
| this project along with its jboss-aop.xml(2 files in total)
| and drop it in JBoss deploy directory, and try to use the intercepted method of Project1 class
| in JSF of "Project2", it doesn't intercept.
| Am i deploying correctly?
|
| Project1:
| Calltest.java
| HelloAOPInterceptor.java
| jboss-aop.xml
|
The jboss-aop.xml file must be deployed before the jar (assuming you are using loadtime weaving) - See the "injboss" example that comes with the dist for info about packaging
"ykrishnaprasad" wrote :
|
| Project2:
| JSF, faces-config.xml and web.xml
|
| (The reason for seperating the jar and jboss-aop.xml(of Project1)
| is that i can reference the deploy directory project1.jar in my Project2 library
| list to use its classes.If i include the jboss-aop.xml
| in the jar itself, then it has to be named as project1.jar.aop(according to JBoss AOP framework doc chapter 10)
| which i cannot add to my library list in Project 2.)
|
I don't understand what you are asking?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996998#3996998
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996998
18 years