1 登录websphere后台,选择“资源”->“JDBC提供者”

2 新建jdbc提供者,选择sybase,选择提供类型为sybase JDBC driver,选择实现类型为"连接池数据源",如图,然后下一步

填写名称和描述,修改类路径

注意:需要将jtds2.jar和jconn2.jar复制到websphere对应的lib目录,如AppServer/lib目录下。可以直接写死类路径,也可以到“环境”->“websphere变量”中设置SYBASE_JDBC_DRIVER_PATH的值,如E:/WebSphere/AppServer/lib


3 设置数据源

新建数据源,并填写属性



相关的认证不用填写,数据库名称、服务名和端口号需要填写sybase对应的端口号
点击定制属性,添加用户名(user)和密码(password)两个自定义属性



4 测试连接池

5 修改对应应用的配置 database.xml
如:
<database name="Default">
<config name="Type">SYBASE</config>
<config name="JNDIName">jdbc/zcms</config>
</database>
|
所有评论仅代表网友意见