• Post Reply Bookmark Topic Watch Topic
  • New Topic

SQLServer with J2EE 1.3.1  RSS feed

 
vijay256
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for open this mail

Java Platform
----------------
j2sdkee1.3.1
Database
------------
SQL Server 2000

Driver abd its Classpath
--------------------
D:\j2sdkee1.3.1\lib\system\jdbc2_0-stdext.jar;
Driver Name:
------------
jdbc2_0-stdext.jar;
EJBCode:
--------
Bean class has this varible
String dbName="java:comp/env/jdbc/KinNMS1";
hai,
thanks for open this mail once again and hope you will read fully.
i have to tell clearly what i did at J2EE server files.
In default.properties at CONFIG direc at J2EE, i added
this
default.properties
=========================
jdbc.drivers=com.jnetdirect.jsql.JSQLDriver
jdbc.drivers=JData2_0.sql.$Driver

jdbc.datasources=jdbc/KinNMS1|jdbc:KinNMS1://localhost/database=KinNMS1|jdbc/KinNMS1|jdbc:KinNMS1://localhost/KinNMS1

# Establish pooling datasources
# PoolingDataSource1 uses a JSQLConnect XA Datasource
# PoolingDataSource2 uses a JDataConnect XA Datasource
jdbc20.datasources=jdbc/KinNMS1|jdbc/XAJSQLConnect|jdbc/KinNMS1|jdbc/XAJDataConnect

# Set properties for each pooling data source

#Pooling Datasource 1 (JSQLConnect)
xadatasource.0.jndiname=jdbc/KinNMS1
xadatasource.0.classname=com.jnetdirect.jsql.JSQLXADataSource
xadatasource.0.dbuser=KinNMS
xadatasource.0.dbpassword=
xadatasource.0.prop.serverName=localhost
xadatasource.0.prop.databaseName=KinNMS1

#Pooling Datasource 2 (JDataConnect)
xadatasource.1.jndiname=jdbc/KinNMS1
xadatasource.1.classname=com.NetDirect.Jdbc.JXADataSource
xadatasource.1.dbuser=KinNMS
xadatasource.1.dbpassword=
xadatasource.1.prop.serverName=localhost
xadatasource.1.prop.databaseName=KinNMS1

Here KinNMS1 is databasename.Servername is localhost
jdbc/KinNMS1 is logic name of databasename

How to connect J2EE Server with SQL Server 2000 database based on this(jdbc2_0-stdext.jar) JDBC 2.0 Driver ?

jdbc2_0-stdext.jar is downloaded JDBC 2.0 Driver jar file and compatable for accessing the SQLServer
line no 33-59 given by the JDBC 2.0 Driver vendor to add at default.properties file.

what has to be modified at UserCOnfig.bat file and give how to add classapth in that file clearly?.
set J2EE_CLASSPATH=---->it is there in the file.i added like this
%CLASSPATH%;%J2EE_HOME%;D:\j2sdkee1.3.1\lib\system\jdbc2_0-stdext.jar; actually i don't know
this is correct or not.pls address.

while deploying the bean 'Enterprise bean resource ref' screen has
1.codeName--what has to be specified here (i specified jdbc/KinNMS1 like this)
2.JNDI Name--what has to be specified here (i specified jdbc/KinNMS1 like this)
3.what is difference between these 2?.

what is name of server? if it is SQLserver. where can i find it?.
or what has to specifiy for serverName='----here---'?
Finally i need help how to connect with Sqlserver and J2EE Server? pls any one do me favour


with thanks
vijay
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!