Monday, December 29, 2008

jBPM 3.3.0.GA and JBoss AS 4.2.3.GA

The ops guys had already installed JBoss 4.2.3.GA on our servers. In an attempt to submit as few help desk requests as possible I decided to port jBPM 3.3.0.GA to JBoss instead of asking them to roll back.

The new docs say,

"The jbpm directory
"When jBPM is installed on a server configuration in JBoss, only the jbpm directory is added to the deploy directory and all components will be deployed under that directory. No other files of JBoss are changed or added outside that directory. "

I figured that would be a good place to start.

I copied the jbpm folder from the 3.3.0.GA distro to a clean JBoss 4.2.3.GA that I built from source.

I opened my browser and checked, "http://localhost:8080/jbpm-console." I tried logging in with "manager/manager." I got the error, "Login failed. Invalid user name or password. "

I added the following to $JBOSS_INSTALL/server/default/conf/login-congif.xml :

<application-policy name = "jbpm">
<authentication>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="dsJndiName">java:/JbpmDS</module-option>
<module-option name="principalsQuery">
SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
</module-option>
<module-option name="rolesQuery">
SELECT g.NAME_ ,'Roles'
FROM JBPM_ID_USER u,
JBPM_ID_MEMBERSHIP m,
JBPM_ID_GROUP g
WHERE g.TYPE_='security-role'
AND m.GROUP_ = g.ID_
AND m.USER_ = u.ID_
AND u.NAME_=?
</module-option>
</login-module>
</authentication>
</application-policy>

When I restarted I could log in fine. I saw the processes that I had been working on.

3 comments:

AsitMonika&Family said...

I am using "jbpm-jpdl-suite-3.2.3" and trying to run the server.
It is failing when i m trying to open it using http://localhost:8080/jbpm-console/app.html.

Though i have "login-config.xml" in place with same content which u described here.
I am not able to login it.Could you plz look in to it

Anonymous said...

Could you please explain the posted code! because for me also, it doesn't work! i have used the same code as is, but i may need to change some values!

jeremyrdavis said...

The JBPM and JBoss AS versions in this post are pretty old.

Try the newer releases. AS 7 is waaay faster, and jBPM 5 is a greatly improved platform.

Links :
http://www.jboss.org/jbossas
http://www.jboss.org/jbpm

Happy coding,
Jeremy