[JBoss AOP] - Interceptors not fired on methods called from within bean?
by jnorris10
I am using JBoss 4.0.4.GA (w/ JBoss AOP 1.5.0.GA and EJB RC7).
Here is my jboss-aop.xml:
| <aop>
| <interceptor class="org.jnorris10.TestInterceptor" scope="PER_VM"/>
|
| <domain name="Test Domain" extends="Stateless Bean" inheritBindings="true">
| <bind pointcut="execution(public * *->*(..))">
| <interceptor-ref name="org.jnorris10.TestInterceptor"/>
| </bind>
| <precedence>
| <interceptor-ref name="org.jnorris10.TestInterceptor"/>
| <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
| </precedence>
| </domain>
| </aop>
|
Here is my interceptor:
| package org.jnorris10
|
| import ... etc.
|
| public class TestInterceptor implements Interceptor, Serializable
| {
| private static final long serialVersionUID = 1L;
|
| public TestInterceptor()
| {
| }
|
| public String getName()
| {
| return "TestInterceptor";
| }
|
| public Object invoke(Invocation invocation) throws Throwable
| {
| try
| {
| System.out.println(">>>>>>>>>>TestInterceptor begin: >>>>>>>>>>");
| System.out.println("\t" + invocation);
| return invocation.invokeNext();
| }
| finally
| {
| System.out.println(">>>>>>>>>>TestInterceptor end: >>>>>>>>>>");
| }
| }
| }
|
Then here is my stateless session bean:
| @Stateless
| @AspectDomain("Test Domain")
| public class A
| {
| A()
| {
| }
|
| public void x()
| {
| y();
| }
|
| public void y()
| {
| }
| }
|
The problem is that if I invoke x() on a bean reference to A, the interceptor is invoked. However, the interceptor is *not* invoked on the call to y() from x(). It seems that the interceptor is only called when the method is invoked across class boundaries and not when it's called internally. What am I missing?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957532#3957532
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957532
19 years, 9 months
[JBoss jBPM] - How to Handle Process Execution History
by brado
I am using jBPM 3.1.1. The user guide states regarding persistence of process instances:
"The main purpose of persistence is to store process executions during wait states."
This suggests pretty strongly that the purpose of persistence in jBPM is supporting the runtime execution of processes. However, I also want a history of all processes executed. Looking at the jBPM datbase schema, it appears that the JBPM_PROCESSINSTANCE table is probably the only candidate for this, and I'm guessing that's the same table regular persistence mentioned in the user guide writes to.
Perhaps I'm just overlooking it, but is there a generally accepted means of retrieving a history of all processes executed? If not, how is everyone else handling this...writing to your own history table I presume?
Thanks for your help.
Brad
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957530#3957530
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957530
19 years, 9 months
[JBoss Seam] - Re: JBoss Seam is just a toy in front of the user using Spri
by chenrici
"norman.richards(a)jboss.com" wrote : After several years of Spring development, do you see any of the code Spring guys trying to bring their ideas back into Java EE? I saw lots of crying about J2EE, but did they contribute back to the Java community for the benefit of everyone?
How stupid! And this by a JBoss "Offical". I am a End-User and currently evaluating different technology options in a hopefully objective and unemotional way. And then i read this discussion in a Support Forum of Jboss.org, looking for help on a Tomcat Server Exception on a Seam Example Project.
I am not a Spring Fan: This isn't a football game, so i don't take sides. We evaluate technology to satisfy a complex set of requirements, which are mostly unique in the combination for a company and may even contradict. So there's never, again: never a black and white, a clear cut option. And still you decide and are successful, if you decide right.
And another thing, i think i learned over the years: in every science field i know about, creativity and innovation thrives on respect for the contributions for the others.
Also
"christian.bauer(a)jboss.com" wrote :
| - easy things are easy to do
| - difficult things are still easy to do
| - the 90% common case can be implemented without effort
| - the 10% more difficult problems can be solved in an elegant fashion
are so terribly misused marketing buzzwords. I heard this so many times in my professional life and have learnt not to believe them: examples from way back: when SQL was made commerially available and MFS was introduced my IBM. Now Relational Databases and SQL are now the legacy (Problem) and MFS is probably not in use much anymore.
I am looking into Seam among many other options. And will continue to see how Seam may be adequat for our requirements.
But reading this posts and epecially Normans, as a JBoss Official, certainly don't invoke the impression of enterprise trustworthiness. It's the first time i saw, this kind of immature and irrelevant blabling in official support forum. Please be aware of the existents of "soft" requirements: social and cultural factors, which are tremdously underestimated, see also James O. Coplien. (Who's that? you will probably ask...) .
Now to my initial intention to visit this forum. I admit i should have posted this in a seperate Thread. But i can't resist.
So maybe Norman or Christian can answer me this one:
The Seam Example application Issues gives me a Tomcat Exception:
INFO 12-07 21:23:30,786 (Log4JLogger.java:info:94) -reading pages.xml
ERROR 12-07 21:23:31,705 (Log4JLogger.java:error:119) -Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/apache/myfaces/config/MyfacesConfig
at org.apache.myfaces.renderkit.html.HtmlRendererUtils.writePrettyLineSeparator(HtmlRendererUtils.java:466)
at org.apache.myfaces.custom.datalist.HtmlListRenderer.encodeBegin(HtmlListRenderer.java:53)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512)
at javax.faces.component.UIData.encodeBegin(UIData.java:547)
at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:464)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:360)
at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
I am running with Tomcat: apache-tomcat-5.5.17, which i downloaded from the official apache site. And with: jboss-seam-1.0.1.GA.
Both out of the box in a "clean" installation.
Has somebody experienced simliar problems or can explain me the problem?
Thanx
Christoph Henrici
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957526#3957526
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957526
19 years, 9 months
[JBoss jBPM] - Re: Timers Documentation and Eclipse incorrect.
by falazar
Here ya go:
[?xml version="1.0" encoding="UTF-8"?]
[process-definition
xmlns="urn:jbpm.org:jpdl-3.1" name="Timers"]
[swimlane name="initiator"][/swimlane]
[start-state name="start"]
[task name="CSD Admin Approval" swimlane="initiator"][/task]
[transition name="" to="Pending CSD Admin Approval"][/transition]
[/start-state]
[end-state name="end1"][/end-state]
[task-node name="Pending CSD Admin Approval"]
[task name="Pending CSD Admin Approval"]
[assignment expression="user(dan)"][/assignment]
[/task]
[transition name="Timeoutpath" to="Alternate CSD Admin Approval"][/transition]
[timer name='alternate'
duedate='2 minutes'
transition='Timeoutpath']
[script]
[expression]
[![CDATA[
System.out.println("*** TIMER FIRED !!!");
]]]
[/expression]
[/script]
[/timer]
[transition name="Approve" to="Notify User"][/transition]
[/task-node]
[task-node name="Alternate CSD Admin Approval"]
[task name="Alternate CSD Admin Approval"]
[assignment expression="user(broccol)"][/assignment]
[/task]
[transition name="Approve" to="Notify User"][/transition]
[/task-node]
[task-node name="Notify User"]
[task name="Accept" swimlane="initiator"][/task]
[transition name="Accept" to="end1"][/transition]
[/task-node]
[/process-definition]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957523#3957523
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957523
19 years, 9 months