The default database of Roller is MySQL. In many cases, it is integrated into the existing web system, and the database used in the original web system is not MySQL. Therefore, you have to replace the database when integrating with Roller. Roller's installation manual does not detail how to replace different databases. However, if you are familiar with J2EE, you can see that you can change the database for roroller by modifying the two files. For example, if you want to change roroller to Oracle8i Database, you only need to do this: 1. Modify hibernate. cfg. hibernate database localization parameter in xml: that is, the original <property name = "dialect"> org. hibernate. dialect. change MySQLDialect </property> to <property name = "dialect"> org. hibernate. dialect. oracleDialect </property> 2. Modify Roller. database Configuration in the xml file: the modified Roller. xml is roughly as follows:
<Context path = "/roller" docBase = "D:/mywork/java/Roller" debug = "0">
<Resource name = "jdbc/rollerdb" auth = "Container"
Type = "javax. SQL. DataSource"
DriverClassName = "oracle. jdbc. driver. OracleDriver"
Url = "jdbc: oracle: thin: @ (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.3) (PORT = 1521 ))) (CONNECT_DATA = (SERVICE_NAME = rollerdb) (SRVR = DEDICATED )))"
Username = "roller"
Password = "roller123"
MaxActive = "20"
MaxIdle = "3"
RemoveAbandoned = "true"
MaxWait = "3000" type = "codeph" text = "/codeph"/>
<! -- If you want e-mail features, un-comment the section below -->
<! --
<Resource name = "mail/Session" auth = "Container"
Type = "javax. mail. Session"
Mail. smtp. host = "mailhost.example.com"/>
-->
</Context> In fact, the main modification is the driver and url for accessing the database. It may be because of the configuration of the oracle database. The url configuration is not the same as that of other databases. In particular, SRVR = DEDICATED is required in many cases. I still don't understand the specific reason: (if anyone knows this, I hope you can give me more advice !!