怎么样配置Weblogic的数据源

分类: J2EE   出处:iocblog整理  更新时间:2008-05-28   添加到收藏  
应用环境:jbuilderx+welogic7.0+mssql server2000

一、    安装mssql  server驱动程序

此处假设安装路径是:f:greenmicrosoft sql server 2000 jdbc那么在f:greenmicrosoft sql server 2000 jdbclib下面, 会有以下三个文件msbase.jar、mssqlserver.jar、msutil.jar。

二、    设置weblogic的启动classpath,也就是设置weblogic启动时要加载的包

一定记住:是修改%bea_home%user_projectsmydomain目录下的startweblogic.cmd,一定不要修改%wl_home%serverin下的任何文件。

配置后的文件如下:
@rem *************************************************************************
@rem this script is used to start weblogic server for the domain in the 
@rem current working directory.  this script simply sets the server_name 
@rem variable and calls the startwls.cmd script under
@rem %wl_home%serverin.
@rem
@rem to create your own start script for your domain, all you need to set is 
@rem server_name, then call %wl_home%serverinstartwls.cmd
@rem[www.iocblog.net 来源]
@rem other variables that startwls takes are:
@rem
@rem wls_user     - cleartext user for server startup
@rem wls_pw       - cleartext password for server startup
@rem startmode    - true for production mode servers, false for 
@rem                development mode
@rem java_options - java command-line options for running the server. (these
@rem                will be tagged on to the end of the java_vm and mem_args)
@rem java_vm      - the java arg specifying the vm to run.  (i.e. -server, 
@rem                -hotspot, etc.)
@rem mem_args     - the variable to override the standard memory arguments
@rem                passed to java
@rem
@rem for additional information, refer to the weblogic server administration 
@rem guide (http://e-docs.bea.com/wls/docs70/adminguide/startstop.html).
@rem *************************************************************************

echo off
setlocal

@rem set server_name to the name of the server you wish to start up.
set server_name=myserver

@rem set wls_user equal to your system username and wls_pw equal  
@rem to your system password for no username and password prompt 
@rem during server startup.  both are required to bypass the startup
@rem prompt.  this is not recomended for a production environment.

set wls_user=zy
set wls_pw=zy
此处设置后,在启动weblogic时,不需要没次都输入用户名和密码



@rem set production mode.  when this is set to true, the server starts up in 
@rem production mode.  when set to false, the server starts up in development 
@rem mode.  if it is not set, it will default to false.
set startmode=

@rem set java_options to the java flags you want to pass to the vm. i.e.: 
@rem set java_options=-dweblogic.attribute=value -djava.attribute=value
set java_options=-dweblogic.security.ssl.trustedcakeystore=d:eaweblogic700serverlibcacerts

@rem set java_vm to the java virtual machine you want to run.  for instance:
@rem set java_vm=-server
set java_vm=

@rem set mem_args to the memory args you want to pass to java.  for instance:
@rem set mem_args=-xms32m -xmx200m
set mem_args=


set  classpath=%wl_home%commonlibclasses12.jar;%wl_home%commonlibmssqlserver.jar;%wl_home%commonlibmsbase.jar;%wl_home%commonlibmsutil.jar 
此处的设置根据自己的情况来确定




@rem call weblogic server
call "d:eaweblogic700serverinstartwls.cmd"

endlocal

三、    在weblocig的控制台中设置连接池和数据源,略

总结
   配置过程最重要的是第二步,因为如果classpath配置错误,那么在配置数据源的时候将会找不到驱动程序类

如果还有问题和我联系 zhyiwww@163.com

Tag: Weblogic ,数据源



文章整理:iocblog
版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。