[jBPM] - Failover best practice (persistence process and session)
by lstrzelecki
lstrzelecki [http://community.jboss.org/people/lstrzelecki] created the discussion
"Failover best practice (persistence process and session)"
To view the discussion, visit: http://community.jboss.org/message/592488#592488
--------------------------------------------------------------
Hi.
I'm trying to achieve process which will start on restart server.
For testing purpouses I've created process which logs counter in infinity loop.
Q1: When I should invoke .dispose()? When process goes into loop
StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, null, environment);
session.startProcess(processName,params);
// getting processInstanceId and sessionId - pestist with JPA
and when i'm *not* invoking .dispose()
Output:
counter: 1
counter: 2
counter: 3
counter: 4
counter: 5
counter: 6
.....
but when i invoke .dispose in finally block it ends on first print.
Q2: I created one session for one process. So I allways create new session when starting new process. Is that good solution?
Q3: I've created entity which holds information about session and processInstance (ids both of then). When Spring context starts i read all active processes and rerunes all session by invoking for every session:
JPAKnowledgeService.loadStatefulKnowledgeSession( http://community.jboss.org/message/592488#592488 Failover best practice (persistence process and session), knowledgeBase, null, environment);
After that while starting server every processes(infinity loops) continue printing counter but until I don't invoke .dispose().
So I doubt that I need have open all sessions while server is running.
I'm suppose that engine should care about monitoring process, but nothing like this happens after calling .dispose()
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/592488#592488]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 1 month
[JBoss Messaging] - dataScroller javascript events
by James G
James G [http://community.jboss.org/people/jgoodfellow] created the discussion
"dataScroller javascript events"
To view the discussion, visit: http://community.jboss.org/message/592460#592460
--------------------------------------------------------------
I'm upgrading an application from 3.3.3 to 4.0.0 and I've noticed the callbacks that we use in the client for the dataScroller to show an animation during an ajax event don't seem to be called anymore. Is there another way to accomplish this in 4.0.0? The parameters are onpagechange and oncomplete.
<rich:dataScroller id="thePagerControl"
align="center"
for="theGrid"
page="#{entity['currentPage']}"
maxPages="#{entity['maxPages']}"
boundaryControls="show"
fastControls="show"
fastStep="1"
stepControls="hide"
onpagechange="showLoading( true );"
oncomplete="showLoading( false );"
render="thePagerDescription buttonsHeader thePagerLinks"
tableStyleClass="sortPanelHeader"
inactiveStyleClass="pagerInactive"
selectedStyleClass="pagerActive">
<f:facet name="first">««</f:facet>
<f:facet name="fastRewind">«</f:facet>
<f:facet name="fastForward">»</f:facet>
<f:facet name="last">»»</f:facet>
</rich:dataScroller>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/592460#592460]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 1 month
[Datasource Configuration] - CAN'T CHANGE DB PASS WHILE JBOSS RUNNING ????? HELP ????
by marcin van dei
marcin van dei [http://community.jboss.org/people/dryna] created the discussion
"CAN'T CHANGE DB PASS WHILE JBOSS RUNNING ????? HELP ????"
To view the discussion, visit: http://community.jboss.org/message/592412#592412
--------------------------------------------------------------
we have a situation in which we must allow database password change (ORACLE DB) while Jboss server is running.
I'm trying to do it by using JAAS login modules:
- I've created a module which loges me in (works)
- I've created an password vault which changes password in DB and gives me the new password (works in background)
So far so good - everything works fine. I can change password and work on the server - no problem.
The problem starts when jboss looses the connection (session) to DB (for example iddle time reason) - it then (I'm guessing) tries to connect again using old credentials and thus locks my account.
Is there any way to get this working ?
I have few ideas which could help me out, but I'm not that good with Jboss. Can anybody help please ?
- if Jboss did not use (cached?) credentials to create new connections in case they are snipped
(setting parameter DefaultCacheTimeout to 0 does not help, still get the:
2011-03-10 12:33:09,889 INFO [STDOUT:156] [Thread-18] ---------- sqlQuery: ALTER USER user IDENTIFIED BY counter3
2011-03-10 12:33:13,857 INFO [STDOUT:156] [EJB-Timer-1299756281646[target=jboss.j2ee:ear=auc-server.ear,jar=gastro_keymanagement.jar,name=StatusRepositoryService,service=EJB3]] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PASSWORD USED: counter3
2011-03-10 12:33:13,888 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool:363] [EJB-Timer-1299756281646[target=jboss.j2ee:ear=auc-server.ear,jar=gastro_keymanagement.jar,name=StatusRepositoryService,service=EJB3]] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: ORA-01017: invalid username/password; logon denied
)
here STDOUT prints what's done on DB (alter user) and password used by login modules to log in.
- if jboss did not lost the DB connections at all this would help too, i guess (setting DB parameter IDLE_TIME to huge number of minutes did not help neither - got the same login error.
It looks to me as Jboss uses some old password (cached?) when trying to reconnect lost sessions (new sessions seem to be getting correct password and they connect to DB ok). How does this work ?
Is there a solution to my problem ? can DB pass be changed safely without the risk of locking the account ?
PLEASE HLEP!!!
thank you
martin
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/592412#592412]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 1 month
ClassLoading order
by Neha Khaitan
Hi,
I am using a particular implementation of apache-poi for my web app. The jar
is there in web-inf lib of my war deployment folder
(server/<node-name>/deploy/<mywar>/WEB-INF/lib), I want to patch in my own
classes (created in the same package structure as the poi class I want to
patch). I have created a patch poi-patch.jar out of these new class files.
Where do I place this jar/how do I ensure my classes are loaded in
preference to apache-poi classes.
Thanks.
Warm Regards,
Neha
15 years, 1 month