WebSphere 部署java程序(war) DB2数据库
1:安装好后,点击验证http://94share.com/bbs/attachment/15_2_2969e7b91313f0b.png
http://94share.com/bbs/attachment/15_2_3074ead88d6c6c2.png
2:成功后进入控制台
https://127.0.0.1:9043/ibm/console
http://94share.com/bbs/attachment/15_2_2576115efde1ad4.jpg
3:资源-》JDBC-》JDBC提供的程序
http://94share.com/bbs/attachment/15_2_a54f2162d6f01c0.jpg
选择作用域后新建
http://94share.com/bbs/attachment/15_2_de9cd6c30b88ddd.jpg
http://94share.com/bbs/attachment/15_2_16cd01c5a60a393.jpg
http://94share.com/bbs/attachment/15_2_05640e8c893b7d9.jpg
http://94share.com/bbs/attachment/15_2_08ddf6ccbf83177.jpg
完成后保存
http://94share.com/bbs/attachment/15_2_8ef6c003ab82221.jpg
成功后点击修改,如图
http://94share.com/bbs/attachment/15_2_f957c6b79bc17f5.jpg
4:环境-》WebSphere 变量,选择作用域后新建刚刚填写的变量
${DB2UNIVERSAL_JDBC_DRIVER_PATH}
http://94share.com/bbs/attachment/15_2_fbf571e6cefa191.jpg
填写相对应的位置后保存修改
http://94share.com/bbs/attachment/15_2_5273ce08f7bfa17.jpg
5:资源-》JDBC-》数据源
http://94share.com/bbs/attachment/15_2_e2d6505a92783ad.jpg
http://94share.com/bbs/attachment/15_2_08d24d304c73288.jpg
http://94share.com/bbs/attachment/15_2_c6b6ec3babd00f8.jpg
http://94share.com/bbs/attachment/15_2_60e86b3d7619dc1.jpg
完成后保存修改
6:点击进入刚刚创建的数据源
JAAS - J2C 认证数据
http://94share.com/bbs/attachment/15_2_4a78eb52f680918.jpg
http://94share.com/bbs/attachment/15_2_9cbd55b552dd64b.jpg
填写数据源用户名和密码,完成后保存修改
http://94share.com/bbs/attachment/15_2_6561e0cc4adf2b3.jpg
7:5:资源-》JDBC-》数据源
安全性设置,完成后保存修改
http://94share.com/bbs/attachment/15_2_2b5ed7d0337df54.jpg
8:把jar包复制到/IBM/WebSphere/AppServer/lib目录下
db2jcc.jar;db2jcc_license_cu.jar;db2jcc_license_cisuz.jar
9: 测试连接
http://94share.com/bbs/attachment/15_2_2eb08d684e73f95.jpg
http://94share.com/bbs/attachment/15_2_fc20e335e52bcbe.jpg
10:应用程序-》新建应用程序-》企业应用程序
选择war文件
http://94share.com/bbs/attachment/15_2_f0457202659544a.jpg
http://94share.com/bbs/attachment/15_2_8da710ba6e4acb3.jpg
http://94share.com/bbs/attachment/15_2_1c9a916837d63f0.jpg
http://94share.com/bbs/attachment/15_2_4fdbc5d3711d15d.jpg
http://94share.com/bbs/attachment/15_2_647c595c1276a80.jpg
11:成功后保存修改
程序部署在
IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/pengbinNode01Cell/xmove4_war.ear/xmove4.war
修 改
IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/pengbinNode01Cell/xmove4_war.ear/xmove4.war/WEB-INF/classes数据库连接方式为:
<transactionManager type="JDBC" >
<dataSource type="JNDI">
<property name="DBJndiContext" value="jdbc/db2"/>
</dataSource>
</transactionManager>
12:应用程序-》应用程序类型-》企业级应用程序
http://94share.com/bbs/attachment/15_2_b4e33be4d8b8794.jpg
13:打开浏览器测试
http://94share.com/bbs/attachment/15_2_e8af9f509ae0a1e.jpg
页:
[1]