我正在尝试将J2EE,非常重的旧学校应用程序从RAD 8.5.5.1迁移到IntelliJ 2016.1.1。使用JNDI构建DataSource。
我编译并配置了除DataSource之外的所有组件(目前正确)。
在这样配置的RAD DataSource中,在resource.xml中:
<resources.jdbc:JDBCProvider xmi:id="JDBCProvider_1163951110780" name="DB2 DataSource" description="DB2 Universal JDBC Driver Provider" implementationClassName="com.ibm.db2.jcc.DB2ConnectionPoolDataSource">
<classpath>${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar</classpath>
<classpath>${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar</classpath>
<classpath>${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar</classpath>
<nativepath>${DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH}</nativepath>
<factories xmi:type="resources.jdbc:DataSource" xmi:id="DataSource_1163951270521" name="pensionjndi" jndiName="pensionjndi" description="DB2 Universal Driver Datasource" category="" authDataAlias="sec" relationalResourceAdapter="builtin_rra" statementCacheSize="150" datasourceHelperClassname="com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper">
<propertySet xmi:id="J2EEResourcePropertySet_1163951270522">
<resourceProperties xmi:id="J2EEResourceProperty_1163951270523" name="databaseName" type="java.lang.String" value="value" description="This is a required property. This is an actual database name, and its not the locally catalogued database name. The Universal JDBC Driver does not rely on information catalogued in the DB2 database directory." required="true"/>
<resourceProperties xmi:id="J2EEResourceProperty_1163951270524" name="driverType" type="java.lang.Integer" value="4" description="The JDBC connectivity-type of a data source. If you want to use type 4 driver, set the value to 4. If you want to use type 2 driver, set the value to 2. On WAS z/OS, driverType 2 uses RRS and supports 2-phase commit processing." required="true"/>
<resourceProperties xmi:id="J2EEResourceProperty_1163951270525" name="serverName" type="java.lang.String" value="serverName" description="The TCP/IP address or host name for the DRDA server. If custom property driverType is set to 4, this property is required." required="false"/>
<resourceProperties xmi:id="J2EEResourceProperty_1163951270526" name="portNumber" type="java.lang.Integer" value="50000" description="The TCP/IP port number where the DRDA server resides. If custom property driverType is set to 4, this property is required." required="false"/>
...
...
...
<resourceProperties xmi:id="J2EEResourceProperty_1175088739299" name="webSphereDefaultIsolationLevel" type="java.lang.Integer" value="2" description="" required="false"/>
</propertySet>
<connectionPool xmi:id="ConnectionPool_1163951270521" connectionTimeout="15" maxConnections="200" minConnections="5" reapTime="180" unusedTimeout="1800" agedTimeout="0" purgePolicy="EntirePool"/>
<mapping xmi:id="MappingModule_1163951296456" mappingConfigAlias="DefaultPrincipalMapping" authDataAlias="sec"/>
</factories>
我尝试使用IntelliJ的DataSource和Driver窗口定义具有相同名称的DataSource(pensionjndi) DS IntelliJ Screen
没有运气!应用程序无法识别DataSourse(但它正在寻找正确的DS名称“pensionjndi”)
问题是:为IntelliJ工件配置DataSource的正确方法是什么? (使用现有的DataSources)
如果需要其他信息,我会编辑帖子..
我没有为websphere的DataSource配置找到任何示例或指南。
请帮忙!?
答案 0 :(得分:0)
通过在Websphere Application Console中定义数据源解决了该问题。 WAS控制台| Resorces |数据来源
请参阅IBM“使用管理控制台配置数据源”主题
Here is discussion about the problem with IntelliJ support