Jboss 6.0 + PostgreSQL Datasource + security-domain + CallerIdentityLoginModule : Can i set max number of pools?
by Achilleas Mantzios
Hello and merry Xmas to all.
Being a jboss user (starting from 3.0.3, still deployed in some remote locations) for the the last 10 years
I have succesfully set up a new test system Jboss 6.0, postgresql 9.0.2, openjdk 1.6, in a porcess to completely
upgrade all of our application engine software.
I had an idea, instead of going the old way of creating the postgresql pool with one user (typically : postgres),
to try having personalized connections, which makes debugging, diagnosing a very very easy task.
So i set up <security-domain>postgresqluser</security-domain>, then in login-config.xml i defined
<application-policy name="postgresqluser">
<authentication>
<login-module code="org.jboss.resource.security.CallerIdentityLoginModule" flag="required">
<module-option name = "managedConnectionFactoryName">jboss.jca:service=XATxCM,name=pgsql</module-option>
</login-module>
</authentication>
</application-policy>
I set up both jboss and postgresql authenticate against the same LDAP server, and all the magic seemed to work!!
As i understand it, one separate pool will be created for each user.
However this is the only unpleasant thing in the whole story.
I'd like to have a way to restrict the max total pools created, in order to pose a limit in the max total connections to the db.
In other words emulate <max-pool-size> as if we were talking about the normal "OnePool" case.
Is there anything to pose a limit to the number of actual pools created?
This is not for use in high traffic web situation (where usually the apps are simple and the number of users large).
This is for a business, with 200 total users, but a big complexity of apps, queries, etc...
I am planning to set up min-pool-size=0, max-pool-size=4 and idle-timeout-minutes=5 minutes.
(maybe more fine tuning on this last one)
During the last 10 months, we had on average 100 distinct logged in users par day, and 130 max.
Haven't done yet any research on the definition/estimation of "cuncurrent" users in the system.
(in order to assess the max number of "simultaneous" connections).
Anyway, i'd like to ask :
a) if you see any potential risks with this
b) if there is a way to limit the max numbers of pools (as a means to limit the max total potential number of connections to the db)
c) My eye fell on http://docs.jboss.org/jbossas/6/JCA_Guide/en-US/html_single/#An_Overview_...
where it suggest that by specifying Criteria=ByNothing means
"all connections are equivalent, usually if adapter supports reauthentication "
Ideally what would be great is if we could have a total max number of connections, across all users,
and reauthenticating in the already existing connections.
I dont know whether postgresql supports this but it would be cool in general to have.
Thank you for any help!
--
Achilleas Mantzios
13 years, 5 months
jboss and JMX Integration!
by Kobi Biton
Hi I am running JBOSS 4.0.2 , I use an application called openNMS which
can monitor via the standard JMX connector I have made all the needed
configurations on the JBOSS run.conf I am able to access via jconsole
IP:PORT , however I fail to see any JBOSS MBEAN , goggling and reading
it seems like the support of JCONSOLE And JMX on 4.0.2 is tricky can
someone assist ?
Thanks,
13 years, 5 months
[jBPM] - Why " TerminateEndEvent" terminator process does not work, is it jBPMN4.4 the Bug it?
by Vincent He
Vincent He [http://community.jboss.org/people/bcanew] created the discussion
"Why "TerminateEndEvent" terminator process does not work, is it jBPMN4.4 the Bug it?"
To view the discussion, visit: http://community.jboss.org/message/577697#577697
--------------------------------------------------------------
http://community.jboss.org/servlet/JiveServlet/showImage/2-577697-10791/s... http://community.jboss.org/servlet/JiveServlet/downloadImage/2-577697-107...
<process id="subProcessTest1" name="subProcessTest1">
<startEvent id="Start_1" name="Start" />
<userTask id="Task3" name="Task3"/>
<endEvent id="End_1" name="End_1" />
<subProcess id="SubProcessA" name="SubProcessA">
<startEvent id="Start_2" name="Start" />
<userTask id="Task1" name="Task1"/>
<userTask id="Task2" name="Task2"/>
<parallelGateway id="Gateway_1" name="Gateway" />
<endEvent id="End_2" name="End_2" />
<endEvent id="End_3" name="End_3">
<terminateEventDefinition id="ted1"/>
</endEvent>
<sequenceFlow id="SequenceFlow_3" sourceRef="Start_2"
targetRef="Gateway_1" />
<sequenceFlow id="SequenceFlow_4" sourceRef="Gateway_1"
targetRef="Task1" />
<sequenceFlow id="SequenceFlow_5" sourceRef="Gateway_1"
targetRef="Task2" />
<sequenceFlow id="SequenceFlow_6" sourceRef="Task1"
targetRef="End_2" />
<sequenceFlow id="SequenceFlow_7" sourceRef="Task2"
targetRef="End_3" />
</subProcess>
<sequenceFlow id="SequenceFlow_1" sourceRef="Start_1"
targetRef="SubProcessA" />
<sequenceFlow id="SequenceFlow_8" sourceRef="SubProcessA"
targetRef="Task3" />
<sequenceFlow id="SequenceFlow_2" sourceRef="Task3"
targetRef="End_1" />
</process>
<process id="subProcessTest1" name="subProcessTest1">
<startEvent id="Start_1" name="Start" />
<userTask id="Task3" name="Task3"/>
<endEvent id="End_1" name="End_1" />
<subProcess id="SubProcessA" name="SubProcessA">
<startEvent id="Start_2" name="Start" />
<userTask id="Task1" name="Task1"/>
<userTask id="Task2" name="Task2"/>
<parallelGateway id="Gateway_1" name="Gateway" />
<endEvent id="End_2" name="End_2" />
<endEvent id="End_3" name="End_3">
<terminateEventDefinition id="ted1"/>
</endEvent>
<sequenceFlow id="SequenceFlow_3" sourceRef="Start_2"
targetRef="Gateway_1" />
<sequenceFlow id="SequenceFlow_4" sourceRef="Gateway_1"
targetRef="Task1" />
<sequenceFlow id="SequenceFlow_5" sourceRef="Gateway_1"
targetRef="Task2" />
<sequenceFlow id="SequenceFlow_6" sourceRef="Task1"
targetRef="End_2" />
<sequenceFlow id="SequenceFlow_7" sourceRef="Task2"
targetRef="End_3" />
</subProcess>
<sequenceFlow id="SequenceFlow_1" sourceRef="Start_1"
targetRef="SubProcessA" />
<sequenceFlow id="SequenceFlow_8" sourceRef="SubProcessA"
targetRef="Task3" />
<sequenceFlow id="SequenceFlow_2" sourceRef="Task3"
targetRef="End_1" />
</process>
ProcessInstance processInstance = executionService.startProcessInstanceByKey("subProcessTest1");
Task task1 = taskService.createTaskQuery().activityName("Task1").uniqueResult();
assertNotNull(task1);
Task task2 = taskService.createTaskQuery().activityName("Task2").uniqueResult();
assertNotNull(task2);
taskService.completeTask(task2.getId());
List<Task> list = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
Task reviewTask1 = taskService.createTaskQuery().activityName("Task1").uniqueResult();
assertNull(reviewTask1);// <----Here, do not pass! Why???
I used version is jBPM4.4, hope for help...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577697#577697]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 5 months
[jBPM] - Problems with JBPM 3.1.7 login
by Lucas Silva
Lucas Silva [http://community.jboss.org/people/jlucasca] created the discussion
"Problems with JBPM 3.1.7 login"
To view the discussion, visit: http://community.jboss.org/message/577621#577621
--------------------------------------------------------------
Good day
I have installed JBPM 3.1.7 in JBOSS AS 5.01 and I'm having problems when trying to login.
It simply returns that the login is incorrect, but I have data loaded in the database, and the db configuration seems correct, since the Jboss AS log didn't complaint about it.
I am receiving this stack trace in Jboss Shell:
10:17:34,913 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role f
iles
java.io.IOException: No properties file: users.properties or defaults: defaultUs
ers.properties found
at org.jboss.security.auth.spi.Util.loadProperties(Util.java:198)
at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRole
sLoginModule.java:186)
at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRo
lesLoginModule.java:200)
at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRol
esLoginModule.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
86)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
80)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(
JaasSecurityManagerBase.java:552)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(
JaasSecurityManagerBase.java:486)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasS
ecurityManagerBase.java:365)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityMa
nager.java:160)
at org.jboss.web.tomcat.security.JBossWebRealm.authenticate(JBossWebReal
m.java:384)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(Form
Authenticator.java:258)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:417)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
ss(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
e(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)
10:17:34,913 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role f
iles
java.io.IOException: No properties file: users.properties or defaults: defaultUs
ers.properties found
at org.jboss.security.auth.spi.Util.loadProperties(Util.java:198)
at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRole
sLoginModule.java:186)
at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRo
lesLoginModule.java:200)
at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRol
esLoginModule.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
86)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
80)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(
JaasSecurityManagerBase.java:552)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(
JaasSecurityManagerBase.java:486)
at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasS
ecurityManagerBase.java:365)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityMa
nager.java:160)
at org.jboss.web.tomcat.security.JBossWebRealm.authenticate(JBossWebReal
m.java:384)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(Form
Authenticator.java:258)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:417)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
ss(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
e(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)
Since I don't know where is meant to be this user.properties file, I didn't create it.
I am using MySQL 5.5 and have configured the hibernate properties along with the database files.
If anybody can help me, I will be pleased.
Thanks to all.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577621#577621]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 5 months
[jBPM] - " Hanging" process when interacting with jBPM5
by Pawel P
Pawel P [http://community.jboss.org/people/pawelp] created the discussion
""Hanging" process when interacting with jBPM5"
To view the discussion, visit: http://community.jboss.org/message/577620#577620
--------------------------------------------------------------
My problem is "hanging" process after interacting with jBPM.
I start process (process with Human Task).
Everything works fine, process starts, human task is generating, but my app never end...
I think it "hangs" on CommandBasedWSHumanTaskHandler.
What am I doing wrong?
My code:
My problem is "hanging" process after interacting with jBPM.
I start process (process with Human Task).
Everything works fine, process starts, human task is generating, but my app never end...
I think it "hangs" on CommandBasedWSHumanTaskHandler.
What am I doing wrong?
Best regards
Pawel
My code:
KnowledgeBase kbase = createKnowledgeBase("BPMN2-MinimalProcess.bpmn");
StatefulKnowledgeSession ksession = createSession(kbase);
CommandBasedWSHumanTaskHandler commandTaskHandler = new CommandBasedWSHumanTaskHandler(
ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task",
commandTaskHandler);
Map<String, Object> params = new HashMap<String, Object>();
params.put("age", Integer.valueOf(14));
Collection<ProcessInstance> processes = ksession.getProcessInstances();
ProcessInstance processInstance = ksession
.startProcess("MyProcess", params);
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577620#577620]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 5 months
[Beginner's Corner] - How to assign task to group of user
by surajaya digdaya
surajaya digdaya [http://community.jboss.org/people/surajaya] created the discussion
"How to assign task to group of user"
To view the discussion, visit: http://community.jboss.org/message/577329#577329
--------------------------------------------------------------
Hello All,
I'm new to Jboss and JBPM, currently trying workflow in Jboss 4.2.3 with JBPM 3.3.1GA. Here is the process definition that I'm trying to run, a very simple process just to test the task assignment :
> <?xml version="1.0" encoding="UTF-8"?>
>
> <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="AssignmentTest">
>
>
> <start-state name="start-state1">
> <task name="testing" blocking="true">
> <description>
> testing
> </description>
> <assignment pooled-actors="group(UserRole)"></assignment>
> <controller></controller>
> </task>
> <transition to="task-node1" name="to_task1"></transition>
> </start-state>
>
>
> <task-node name="task-node1">
> <task name="task1" blocking="true">
> <description>
> Testing task1
> </description>
> <assignment actor-id="user1"></assignment>
> <controller></controller>
> </task>
> <transition to="task-node2" name="to_task2"></transition>
> </task-node>
>
> <task-node name="task-node2">
> <task name="task2" blocking="true">
> <description>
> Testing task2
> </description>
> <assignment actor-id="user2"></assignment>
> <controller></controller>
> </task>
> <transition to="task-node3" name="to_task3"></transition>
> </task-node>
>
> <task-node name="task-node3">
> <task name="task3" blocking="true">
> <description>
> Testing task3
> </description>
> <assignment actor-id="user3"></assignment>
> <controller></controller>
> </task>
> <transition to="task-node4" name="to_task4"></transition>
> </task-node>
>
> <task-node name="task-node4">
> <task name="task4" blocking="true">
> <description>
> Testing task4
> </description>
> <assignment pooled-actors="group(UserRole)"></assignment>
> <controller></controller>
> </task>
> <transition to="end-state1" name="to_end"></transition>
> </task-node>
>
>
> <end-state name="end-state1"></end-state>
>
>
> </process-definition>
and here is my form
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 1.0//EN"
> " http://www.openkm.com/dtd/workflow-forms-1.0.dtd http://www.openkm.com/dtd/workflow-forms-1.0.dtd">
> <workflow-forms>
> <workflow-form task="testing">
> <input label="variable1" name="variable1" />
> <button label="Submit" />
> </workflow-form>
> <workflow-form task="task1">
> <input label="variable1" name="variable1" />
> <button label="Submit" />
> </workflow-form>
> <workflow-form task="task2">
> <input label="variable2" name="variable2" />
> <button label="Submit" />
> </workflow-form>
> <workflow-form task="task3">
> <input label="variable3" name="variable3" />
> <button label="Submit" />
> </workflow-form>
> <workflow-form task="task4">
> <input label="variable4" name="variable4" />
> <button label="Submit" />
> </workflow-form>
> </workflow-forms>
I succesfully deploy that process definition to JBPM, but it turn out that only task : task1, task2, task3 is assigned to the user. Other task (testing and task4) that should be done by group of user is not assigned.
What's probably missing or wrong in my process definition ?.
Thanks in advance for your help
regards,
surajaya digdaya
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577329#577329]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 5 months