[JBoss jBPM] - Re: clean handoff
by wasperen
Hi Tom,
I have just got my first Drools / jBPM integration working in the area of Authorization - or PooledActors more to speak.
Basically, at each task node I have a set of rules that determine the pooled actors for all active swimlane instances at that moment in time.
For this I have the rulebase stored in a database.
The sequence is straight forward:
* create a new working memory from it and populate it with business data and an abstraction of the swimlane, actor and pooled actor objects.
* fire the rules.
* sync the simlaneinstance and taskinstances with what is in the working memory.
I tried keeping a working memory live for the duration of the process instance, but storing serialized data is a) very slow and b) runs into problems (stack overflows) with large objects. I found it was quicker to assert all business objects and jBPM abstractions each and every time (in memory, no db involved other than retrieving the compiled rulebase).
Works pretty cool.
I can now very easily have rather complex assignments of tasks. for instance: a reviewer is any person that is not the originator, works more than 0.7 FTE and works in the same department as the originator. Cool huh?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962567#3962567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962567
18 years, 5 months
[JNDI/Naming/Network] - Problem with Generic JavaBean Resources
by olliplough
Hi,
I use JBoss 4.0.2 with Tomcat running inside JBoss (hence no external JNDI lookup needed). I want to define a plain Generic JavaBean Resources aka POJO as described in http://tomcat.apache.org/tomcat-4.1-doc/jndi-resources-howto.html ==> Generic JavaBean Resources.
I have made the respective entries in the Tomcat web.xml and in JBoss' jboss-web.xml.
Entry in web.xml:
<resource-ref>
<res-ref-name>bean/MyBeanFactory</res-ref-name>
<res-type>foo.MyBean</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Entry in jboss-web.xml:
<resource-ref>
<res-ref-name>bean/MyBeanFactory</res-ref-name>
<res-type>foo.MyBean</res-type>
<jndi-name>java:/MyBeanFactory</jndi-name>
</resource-ref>
This also seems to be correct since JBoss throws an exception at startup if I make both entries to mismatch on purpose otherwise no exception is thrown.
Now I get a javax.naming.NamingException when I execute the following code in my servlet (javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: ConnectionParamsFactory not bound]):
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
MyBean myBean = (MyBean) envCtx.lookup("bean/MyBeanFactory");
This does not worry me all that much since my bean's attributes have not been defined so far and the looked up bean would not contain any useful configuration data for me. Nevertheless, when I look into the envCtx in the debugger I see that an entry for bean/MyBeanFactory exists.
Defining the bean's attributes, though, seems exactly to be the problem. I define a Context in Tomcat's server.xml (which is located in jboss-4.0.2\server\default\deploy\jbossweb-tomcat55.sar if I'm right) to do so:
| <Host ... >
| <Context reloadable="true" crossContext="true">
| <Resource name="bean/MyBeanFactory" auth="Container" type="foo.MyBean" />
|
| <ResourceParams name="bean/MyBeanFactory">
| <parameter> <!-- whatever params -->
| <name>language</name>
| <value>de</value>
| </parameter>
| </ResourceParams>
|
| </Context>
| </Host>
|
| (Had to display this as code since the sucks wouldn't display correctly otherwise for whatever reason.)
|
But this doesn't do the job. I still get the same exception. I have tried zillion different ways to define the context in the server.xml but was not successful. Now I need somebody's help to get the problem found.
Thanks for any suggestions,
Oliver Plohmann
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962562#3962562
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962562
18 years, 5 months
[Security & JAAS/JBoss] - JDBC Realm
by bjornn
Hi all,
Following some hints, tips, articles I'm trying to develop a small sample using JAAS & JBoss.
I think I have understood the concepts, but when I start to code, things became hard... hehehe.
Maybe I have forgot something... I don't know exactaly.
According what I have read, I proceed like this:
Step 1: Declare a new application policy in login-config.xml at conf dir:
| <application-policy name = "jaas-webapp-domain">
| <authentication>
| <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
| flag = "required">
| <module-option name = "unauthenticatedIdentity">pirata</module-option>
| <module-option name = "dsJndiName">jdbc/jaasDS</module-option>
| <module-option name = "principalsQuery">SELECT PASSWORD FROM USERS WHERE LOGIN=?</module-option>
| <module-option name = "rolesQuery">SELECT LOGIN, 'Roles' FROM ROLES WHERE LOGIN=?</module-option>
| </login-module>
| </authentication>
| </application-policy>
Step 2: Modify web.xml file:
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>página dos pebas</web-resource-name>
| <url-pattern>/peba/*</url-pattern>
| </web-resource-collection>
| <auth-constraint>
| <role-name>peba</role-name>
| </auth-constraint>
| </security-constraint>
|
| <security-role>
| <role-name>peba</role-name>
| </security-role>
|
| <login-config>
| <auth-method>BASIC</auth-method>
| <realm-name>jaas-webapp-realm</realm-name>
| </login-config>
Step 3: add jboss-web.xml inside WEB-INF dir. Like this:
| <?xml version="1.0" encoding="UTF-8"?>
| <jboss-web>
| <security-domain>java:/jaas/jaas-webapp-domain</security-domain>
| </jboss-web>
I have tried to write de sql to query principals in a WRONG WAY (i.e. missing table name after from keywork, missing where keyword) just to see if jboss would complain, tell me that something was wrong.... But nothing happened. I think it isn't called...
IE shows me the login window, I try 3 times, and I get a forbidden error... but no sql error appears in jboss log...
Maybe tag X in file Y must have the same value as tag Z in file W and I didn't realize...
What I'm doing wrong? should I find some reference to my security domain(java:/jaas/jaas-webapp-domain ) in jmx-console? I didn't found. My datasources are there... I found them...
I hope that you can understand me e send me some help.
Thanks in advance.
Excuse me for any english mistakes.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962555#3962555
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962555
18 years, 5 months