WebSphere  Application Server连接PostgreSQL数据库解决方案

  1. 配置 JAAS-J2C 认证

WebSphere Application Server连接PostgreSQL

配置J2C信息

   别名:自定义

   用户名:数据库用户

   密码: 用户密码

   描述:自定义

WebSphere Application Server连接PostgreSQL

应用并保存到主配置

WebSphere Application Server连接PostgreSQL

2.创建JDBC提供程序

    新建JDBC提供程序

WebSphere Application Server连接PostgreSQL

数据库类型有PostgreSQL则选择PostgreSQL

如果没有数据库可选项为PostgreSQL ,我们可以进行用户自定义,然后配置好支持类:org.postgresql.ds.PGConnectionPoolDataSource

注意:如果使用的是国产瀚高数据库驱动,则支持类为:com.highgo.jdbc.ds.PGConnectionPoolDataSource

    名称:自定义

    描述:自定义

WebSphere Application Server连接PostgreSQL

下一步配置好驱动jar包路径

WebSphere Application Server连接PostgreSQL

下一步,点击完成并且保存到主配置

WebSphere Application Server连接PostgreSQL

 

3.配置数据源

WebSphere Application Server连接PostgreSQL

新建

数据源名称:自定义

JNDI名称:自定义

WebSphere Application Server连接PostgreSQL

选择JDBC驱动程序,配置上面配置好的JDBC提供程序

WebSphere Application Server连接PostgreSQL

配置Helpl类

注意Help类名为:com.ibm.websphere.rsadapter.GenericDataStoreHelper

WebSphere Application Server连接PostgreSQL

配置安全认证(选择J2C认证配置好的)

注意:映射配置别名选择默认就好

WebSphere Application Server连接PostgreSQL

下一步,完成并且保存到主配置

WebSphere Application Server连接PostgreSQL

4.配置连接属性

数据库名字,服务器IP和数据库服务端口

点击选择数据源postgres,选择右侧定制属性

WebSphere Application Server连接PostgreSQL

配置serverName,portNumber,databaseName设置数据库ip、端口、数据库名等信息

WebSphere Application Server连接PostgreSQL

如上我们可以点小图标进行搜索,如果无搜索项,则点击上面新建手动添加相应数据配置,如果有则直接修改该属性的值。

如下:搜索后有该属性名

WebSphere Application Server连接PostgreSQL

点击属性名,修改属性值

WebSphere Application Server连接PostgreSQL

应用并保存到主配置

portNumber和databaseName配置同上。

WebSphere Application Server连接PostgreSQL

WebSphere Application Server连接PostgreSQL

 

5.测试数据源

WebSphere Application Server连接PostgreSQL

连接成功

WebSphere Application Server连接PostgreSQL

相关文章:

  • 2021-08-27
  • 2021-11-13
  • 2021-11-23
  • 2021-11-23
  • 2021-12-07
  • 2021-09-22
  • 2021-08-21
  • 2021-12-07
猜你喜欢
  • 2021-08-16
  • 2021-08-16
  • 2021-12-16
  • 2021-10-06
  • 2019-02-09
  • 2021-08-16
  • 2021-11-05
  • 2018-01-30
相关资源
相似解决方案