[JBoss Messaging] - Connecting to two JBoss messaging servers causes interferenc
by davidrh
We are having problems getting JBoss to work when we have a connection from the one client to two JBoss messaging servers simultaneously. Everything works fine initially, but if one server goes down the client connections to the good server are also disconnected. This situation (i.e. one server going down) is the reason why we have multiple connections.
Some background: In our application, we have implemented high availability in our messaging client by maintaining a connection to two (or more) JMS servers simultaneously. For dispatching of messages, we try the first JMS server and if that doesn't work, we try the second and so on. For receiving messages, we set up a message listener for each queue on all of the JMS servers. For receiving and sending, we always use the session that received the message to dispatch any subsequent messages. In this way, we always should have somewhere to send messages and each JMS server will always have listeners to receive messages. Any messages sent as part of receiving a message will occur in the same JMS transaction and therefore be committed or rolled back as one.
We have ExceptionListeners registered on the connections to handle periodically attempting to reconnect to the JMS server that has failed. For sending messages we use Spring's JmsTemplate backed by a pool of sessions using Apache commons pooling. For receiving messages, we use message listeners.
The problem that we are seeing is reproduced in this post http://www.jboss.org/index.html?module=bb&op=viewtopic&t=93258 which unfortunately has a bit of a vague subject and hasn't attracted any response. My apologies for reposting if this lack of response is not caused by the subject.
We successfully employ this strategy with Active MQ and Oracle AQ so we think that our code is workable. Is there any inherent reason why you can't have one client connecting to two JBoss messaging servers at the same time, without the failure of one connection interfering with the other? Is there anything in the above approach to availability that would be inherently unsound with JBoss Messaging?
Any guidance appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984008#3984008
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984008
19Â years, 6Â months
[JBoss jBPM] - Problems with deleting a process instance of a complex proce
by jits_1998
Hi,
We have a complex process with multiple sub-processes, tasks and multiple child tokens in the subprocesses.
We found that GraphSession.deleteProcessInstance() method is unable to delete the process instance.
It falls short on following points:
1) It is not deleting the taskinstances, though it creates the query but it is never executed.
2) It is not deleting the sub-process and their child tokens, which are not refered by "token.getSubProcessInstance".
Here is an updated version of deleteProcessInstance() that works for us:
| public void deleteProcessInstance(ProcessInstance processInstance, boolean includeTasks, boolean includeJobs) {
| if (processInstance==null) throw new JbpmException("processInstance is null in JbpmSession.deleteProcessInstance()");
| try {
| // find the tokens
| Query query = session.getNamedQuery("GraphSession.findTokensForProcessInstance");
| query.setEntity("processInstance", processInstance);
| List tokens = query.list();
|
| // deleteSubProcesses
| Iterator iter = tokens.iterator();
| while (iter.hasNext()) {
| Token token = (Token) iter.next();
| deleteSubProcesses(token);
|
| }
|
| // jobs
| if (includeJobs) {
| query = session.getNamedQuery("GraphSession.deleteJobsForProcessInstance");
| query.setEntity("processInstance", processInstance);
| query.executeUpdate();
| }
|
| // tasks
| if (includeTasks) {
| query = session.getNamedQuery("GraphSession.findTaskInstanceIdsForProcessInstance");
| query.setEntity("processInstance", processInstance);
| List taskInstances = query.list();
| if(taskInstances.size()>0){
| List<Long> taskInstancesId = new ArrayList<Long>();
| for(Object ti: taskInstances)
| {
| taskInstancesId.add(((TaskInstance)ti).getId());
| }
| query = session.getNamedQuery("GraphSession.deleteTaskInstancesById");
| query.setParameterList("taskInstanceIds",taskInstancesId);
| query.executeUpdate();
| }
|
|
| }
|
| // delete the logs for all the process instance's tokens
| query = session.getNamedQuery("GraphSession.selectLogsForTokens");
| query.setParameterList("tokens", tokens);
| List logs = query.list();
| iter = logs.iterator();
| while (iter.hasNext()) {
| session.delete(iter.next());
| }
|
| iter = tokens.iterator();
| while(iter.hasNext()){
| Token token = (Token)iter.next();
| if(processInstance.getRootToken().getId()!= token.getId())
| session.delete(token);
| }
|
|
|
| // then delete the process instance
| session.delete(processInstance);
|
| } catch (Exception e) {
| e.printStackTrace();
| log.error(e);
| throw new JbpmException("couldn't delete process instance '" + processInstance.getId() + "'", e);
| }
| }
|
The "ProcessSession.findSubprocessByToken" query is as follows:
| select pi
| from org.jbpm.graph.exe.ProcessInstance as pi
| where pi.superProcessToken = :token
|
Hope it helps... I have not checked Jira for any such known issues, please let me know if I need to raise this ticket.
Regards,
Jitendra
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984006#3984006
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984006
19Â years, 6Â months
[Security & JAAS/JBoss] - Re: Why JAAS authenticate() fails?
by jaikiran
anonymous wrote : However the status was 200
Which means the request has succeeded.
anonymous wrote : Are the values for module-option usersProperties and rolesProperties correct?
Looks correct.
anonymous wrote :
| I am assuming the root "/" starts at server/default. Is my assumption correct?
The "/" indicates the root of your application. Assuming, your application is named myApp.ear then "/authentik/transportation-security-roles.properties" will translate into myApp.ear/authentik/transportation-security-roles.properties.
anonymous wrote : Do you know why the authentication fail?
Please post the contents of your web.xml, jboss-web.xml, the url that you are using to try out your usecase and also the TRACE level logs of jboss security package.(Please remember to use the "Code" to wrap the contents in a code block, while posting these details).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984004#3984004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984004
19Â years, 6Â months