[JBoss Portal] - PageRenderEvent and getNode for top level pages
by shipmaster
Hi,
I have the following structure of pages:
default -> Page1 -> Page2
I am trying to create an event listener that reads some property off the currently rendering page and sets it as a value in user session, I did the following:
| public PortalNodeEvent onEvent(PortalNodeEventContext ctx,
| PortalNodeEvent event) {
| if(event instanceof PageRenderEvent)
| {
| PageRenderEvent renderEvent=(PageRenderEvent) event;
| String category=(String)renderEvent.getNode().getProperties().get("category");
| ctx.getPortalRuntimeContext().getSession().setAttribute("currentCategory",category );
|
| }
| return ctx.dispatch();
| }
|
Which seems to work fine for Page2 but not for default or Page1, the event fires ok on each render but getNode has an empty category property, and sometimes, when i go to Page2 then back to Page1, category is still the one for Page2. I also tried getEvent.getPageName and it behaves in the same way, so it is not a property problem. Any idea what I am doing wrong?
I am on Jboss Portal 2.6.4
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148201#4148201
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148201
17 years, 11 months
[Messaging, JMS & JBossMQ] - Queue listeners stop working
by mman
Hi guys,
I have inherited an application from a team that doesn't exist anymore. The system is in production with HSQLDB (argh!) as the persistence engine of 2 queues, one for incoming messages, the other for outgoing messages. From time to time the application get "stuck": messages are accumulating into the queues and dequeuers are not waken up until we restart the app server entirely.
Can this be related to HSQLDB? Would it help to migrate to MySQL (which we intend to do anyway)?
A thread dump when the problem occurs shows the listeners waiting on the queues, so it's not clear to me if this can be related to the underlying persistence engine.
In order to try to mitigate the problem, we have increased the amount of concurrent listeners on every queue from 3 to 10: I wonder whether this can really make things better or worse. It's also worth noting that if I check the receivers when the problem happens, though, I see that the total number is 0 (while normally it is 10, after last change).
We are currently using JBoss 4.0.5.GA in a non clustered environment.
Any hint would be extremely appreciated.
TIA
MM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148199#4148199
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148199
17 years, 11 months
[JBoss jBPM] - integration with JBoss Rules engine?
by mpopova
Hello,
I could not find a good answer to this question: is JBPM integrated with JBoss Rules engine?
Different people give different meaning to the word 'integration', so I will explain what kind of functionality I am looking for:
I would like to be able to define a set of rules (in Excel, since JBoss Rules can work with it well). The result of a rule (an action) is an approval chain - which is a list of approvers an object has to go through.
My application will fire off the rules engine to evaluate the rules at run time and give me the resulting approval chain. Users may modify this approval chain , adding/deleting approvers, and eventually my application will pass the final approval chain into the workflow engine as the basis for the process definition. Then, jBPM (or other wf engine) will be responsible for execution of the approval (workflow) process.
Is something like this possible to implement using the JBoss Rules engine + jBPM?
Thanks,
Marina
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148195#4148195
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148195
17 years, 11 months
[Clustering/JBoss] - Re: Large CPU Increase Using Buddy Session Replication
by dmurphy
Sorry - re-posting with code tags..
PROBLEM
We are trying to use session replication with ASS 4.0.5 but running into significant performance problems.
Specifically, under load We are seeing a 3-4x cpu increase in cpu on the app servers as a result of them
trying to do session replication.
Unfortunately the application is pretty old and somewhat badly written. As a result there
are some pretty large oject graphs in the user's session. We are trying to remove those in order to be
as session replication friendly as possible. In addition the app repeatedly stores the same
attribute value back into the session rather than checking if the value already exists there (and avoiding
an unnecessaryt session.set). We could possibly refactor this but its going to be a lot of work..
There is a possibility of upgrading to a later version of the AS, but not in the short term and so we would really
like to get this working with our current verson - AS 4.0.5.
BASIC SESSION REPLICATION UNDERSTANDING
Can I get some info on the basic operation of the session cache replication?
(Please note we are using AS 4.0.5 so the info I require must be specific to that version, since I imagine many improvements have been done since that version)
For example, (for the moment without a UseReplQueue queue setup) does replication occur every time the app sets a session attribute? And when it replicates does it then replicate just the value of the attribute that was just set
or does it replicate the entire user's session at that point.
OPTIMAL CONFIGURATION
here is the best guess settings we have for the session replication cache (org.jboss.cache.aop.TreeCacheAop)
We use buddy replication with 1 backup node for each node.Here is our settings-
<attribute name="IsolationLevel">REPEATABLE_READ</attribute>
| can we use 'NONE'. Will this help performance? What are the semantics of NONE for a session repl cache?
|
| <attribute name="CacheMode">REPL_ASYNC</attribute>
| This should be the best choice - right?
|
| <attribute name="UseRegionBasedMarshalling">false</attribute>
| This should be the best choice - right?
|
| Things we might try ..
| <attribute name="UseReplQueue">true</attribute>
| <attribute name="ReplQueueInterval ">10000</attribute>
| <attribute name="ReplQueueMaxElements">2000</attribute>
| We are considering to ty this since our app updates the same value into the session repeatedly and often.
| Short of refactoring the app I am hoping maybe the queue mechanism may help?
|
| <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
| Will this help our cpu load?
|
|
OTHER SUGGESTIONS
Are there any other suggestions that might help us reduce this very significant overheard of using session replication
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148189#4148189
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148189
17 years, 11 months
[Clustering/JBoss] - Large CPU Increase Using Buddy Session Replication
by dmurphy
PROBLEM
We are trying to use session replication with ASS 4.0.5 but running into significant performance problems. Specifically, under load we are seeing a 3-4x cpu increase in cpu on the app servers as a result of them trying to do session replication.
Unfortunately the application is pretty old and somewhat badly written. As a result there are some pretty large object graphs in the user's session. We are trying to remove those in order to be as session replication friendly as possible. In addition the app repeatedly stores the same attribute value back into the session rather than checking if the value already exists there (and avoiding an unnecessary session.set). We could possibly re-factor this but its going to be a lot of work..
There is a possibility of upgrading to a later version of the AS, but not in the short term and so we would really like to get this working with our current version - AS 4.0.5.
BASIC SESSION REPLICATION UNDERSTANDING
Can I get some info on the basic operation of the session cache replication?
(Please note we are using AS 4.0.5 so the info I require must be specific to that version, since I imagine many improvements have been done since that version)
For example, (for the moment without a UseReplQueue queue setup) does replication occur every time the app sets a session attribute? And when it replicates does it then replicate just the value of the attribute that was just set or does it replicate the entire user's session at that point.
OPTIMAL CONFIGURATION
here is the best guess settings we have for the session replication cache (org.jboss.cache.aop.TreeCacheAop)
We use buddy replication with 1 backup node for each node.
REPEATABLE_READ
can we use 'NONE'. Will this help performance? What are the semantics of NONE for a session repl cache?
REPL_ASYNC
This should be the best choice - right?
false
This should be the best choice - right?
Changes we are considering -
OPTIMISTIC
Will this help the cpu overhead?
true
10000
2000
We are considering to try this since our app updates the same value into the session repeatedly and often. Short of refactoring the app I am hoping maybe the queue mechanism may help?
OTHER SUGGESTIONS
Are there any other suggestions that might help us reduce this very significant overheard of using session replication
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148188#4148188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148188
17 years, 11 months