jpbm - mandsdesign.net

streakconvertingΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 6 μήνες)

69 εμφανίσεις

jBMP

Copyright © 2000
-
2007 Liferay, Inc.

All Rights Reserved.

No material may be reproduced electronically or in print without written
permission from Liferay, Inc.

Objectives

Set database “jbpm” in MySQL for jbpm
-
web

1.
Create database and user

2.
Populate database

3.
Database Connection


Create a database called “jbpm”, user
“jbpm”, password “jbpm”

1.
Click Start


Run…

2.
Type
cmd

and press Enter

3.
Type
mysql

u root

4.
Type
(source ../source
-
jbpm/db_setup.sql)


create database jbpm;


grant all on jbpm.* to 'jbpm'@'localhost' identified by
'jbpm' with grant option;


grant all on jbpm.* to 'jbpm'@'localhost.localdomain'
identified by 'jbpm' with grant option;

Populate your database

1.
Click Start


Run…

2.
Type
cmd

and press Enter

3.
Navigate to the **
\
source
-
jbpm

directory

4.
Type
mysql
-
u root jbpm < mysql.create.sql

5.
Type

mysql
-
u jbpm
-
pjbpm jbpm

6.
In MySQL, check tables; Type

show
tables;

7.
To exit, type

exit;

Database Connection

Set tomcat as linked source in ext project

-
In Resource perspective, edit .classpath;

-
Remove

<classpathentry *=“tomcat"/>



-
Go to Java perspective

Change database link connection

Ext/tomcat/webapps/jbpm
-
web/WEB
-
INF/classes/hibernate.cfg.xml


Database Connection


Comment these lines


<!
--

Hypersonic
--
>


<!
--

<property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prope
rty>


<property
name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</p
roperty>


<property
name="hibernate.connection.url">
jdbc:hsqldb:file:../webapps/jbpm
-
web/WEB
-
INF/sql/jbpm
</property>


<property name="hibernate.connection.username">
sa
</property>


<property name="hibernate.connection.password"></property>
--
>

Database Connection


Use MySQL


<!
--

MySQL
--
>


<property
name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop
erty>




<property
name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</
property>




<property
name="hibernate.connection.url">
jdbc:mysql://localhost/jbpm?useU
nicode=true&amp;characterEncoding=UTF
-
8
</property>




<property
name="hibernate.connection.username">
jbpm
</property>




<property
name="hibernate.connection.password">
jbpm
</property>


Test


Stop Tomcat if it is running.


Restart tomcat in Eclipse or Command Line.


Check console


Revision History

Jonas Yuan

06/07/07

Created for Liferay 4.2.2