📄 1046.html
字号:
<HTML><HEAD><TITLE>
linux知识宝库/编程技术/JNDI</TITLE>
<META http-equiv=content-type content="text/html; charset=gb2312">
<META content=linuxtips,linux,php,mysql,apache name=keywords>
<STYLE type=text/css>A:link {
COLOR: #666666; TEXT-DECORATION: underline
}
A:active {
COLOR: #666666; TEXT-DECORATION: underline
}
A:visited {
COLOR: #666666; TEXT-DECORATION: underline
}
A:hover {
COLOR: #708090; TEXT-DECORATION: none
}
.articletitle {
FONT-WEIGHT: bold; FONT-SIZE: 18px; COLOR: #335588; LINE-HEIGHT: 26px; FONT-FAMILY: trebuchet ms, arial, verdana, helvetica, sans-serif; TEXT-DECORATION: none
}
INPUT {
FONT-WEIGHT: normal; FONT-SIZE: 11px; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
TEXTAREA {
FONT-WEIGHT: normal; FONT-SIZE: 11px; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
.bginput {
BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #999999 1px solid; BORDER-BOTTOM: #999999 1px solid; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #f9f9f9
}
.text {
BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #666666 1px solid; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #cccccc 1px solid
}
SELECT {
FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: 宋体; BACKGROUND-COLOR: #ffffff
}
.firstalt {
BACKGROUND-COLOR: #eeeeee
}
.secondalt {
BACKGROUND-COLOR: #ffffff
}
.bigfont {
FONT-SIZE: 45px; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
.normalfont {
FONT-SIZE: 12px; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
.middlefont {
FONT-SIZE: 11px; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
.smallfont {
FONT-SIZE: 9px; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
.smallbold {
FONT-WEIGHT: bold; COLOR: #000000
}
.articletitle {
FONT-WEIGHT: bold; FONT-SIZE: 18px; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
.subhead {
FONT-WEIGHT: bold; FONT-SIZE: 13px; COLOR: #006699; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
#content A:link {
COLOR: #3366cc; TEXT-DECORATION: underline
}
#content A:active {
COLOR: #3366cc; TEXT-DECORATION: underline
}
#content A:visited {
COLOR: #3366cc; TEXT-DECORATION: underline
}
#content A:hover {
COLOR: #9966cc; TEXT-DECORATION: none
}
.content {
FONT-SIZE: 14px; LINE-HEIGHT: 130%; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
.titlefont {
FONT-SIZE: 12px; COLOR: #ffffff; FONT-FAMILY: verdana, arial, helvetica, sans-serif,宋体
}
.bodyline {
BORDER-RIGHT: #aebdc4 1px solid; BORDER-TOP: #aebdc4 1px solid; BORDER-LEFT: #aebdc4 1px solid; BORDER-BOTTOM: #aebdc4 1px solid; BACKGROUND-COLOR: #ffffff
}
.cattitle {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; LETTER-SPACING: 1px
}
.tableoutline {
BORDER-RIGHT: #c4c4c4 1px solid; BORDER-TOP: #c4c4c4 1px solid; BORDER-LEFT: #c4c4c4 1px solid; BORDER-BOTTOM: #c4c4c4 1px solid
}
.root_td {
PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Verdana; HEIGHT: 22px; BACKGROUND-COLOR: #ffffff; font-color: #000000
}
.child_td {
PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-SIZE: 12px; PADDING-BOTTOM: 3px; COLOR: #000000; FONT-FAMILY: Verdana; HEIGHT: 22px; BACKGROUND-COLOR: #f5f5f5; TEXT-DECORATION: underline
}
#cattitle A:link {
COLOR: #000000; TEXT-DECORATION: none
}
#cattitle A:visited {
COLOR: #000000; TEXT-DECORATION: none
}
#cattitle A:active {
COLOR: #000000; TEXT-DECORATION: none
}
#cattitle A:hover {
COLOR: #000000; TEXT-DECORATION: none
}
</STYLE>
<SCRIPT language=JavaScript type=text/javascript>
<!--
if (parent.frames.length > 0) {
parent.location.href = self.document.location
}
function ToggleNode(nodeObject, imgObject){
if(nodeObject.style.display == '' || nodeObject.style.display == 'inline'){
nodeObject.style.display = 'none';
imgObject.src = 'images/plus.gif'/*tpa=http://www.linuxhero.com/docs/images/plus.gif*/;
}else{
nodeObject.style.display = 'inline';
imgObject.src = 'images/minus.gif'/*tpa=http://www.linuxhero.com/docs/images/minus.gif*/;
}
}
-->
</SCRIPT>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0 marginwidth="0"
marginheight="0">
<CENTER>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=296
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=76
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=100
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=98
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=79
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=103
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=26
border=0></TD>
<TD><IMG height=1 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1
border=0></TD></TR>
<TR>
<TD colSpan=3><A title=linux知识宝库
href="index.html" tppabs="http://www.linuxhero.com/docs/index.html"><IMG height=83
src="images/header_r1_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c1.gif" width=472 border=0
name=header_r1_c1></A></TD>
<TD colSpan=3>
<form action="http://www.linuxhero.com/docs/search.html" method=get>
<table
style="BORDER-RIGHT: #c4c4c4 1px solid; BORDER-TOP: #c4c4c4 1px solid; BORDER-LEFT: #c4c4c4 1px solid; BORDER-BOTTOM: #c4c4c4 1px solid"
cellspacing=0 cellpadding=3 width="95%" border=0 align="center">
<tbody>
<tr>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif">
<div align=center><font class=normalfont>搜索文章:
<input type=hidden value=result name=action2>
<input type=radio checked value=title name=type>标题
<input type=radio value=content name=type>内容
<input type=image src="images/button_go.gif" tppabs="http://www.linuxhero.com/docs/images/button_go.gif" border=0 name=image2>
</font></div>
</td>
</tr>
<tr>
<td noWrap>
<div align="center">
<input maxlength=100 size=30 name=keyword2>
</div>
</td>
</tr></tbody>
</table>
</form>
</TD>
<TD rowSpan=2><IMG src="images/header_r1_c7.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c7.gif" width=26 border=0 name=header_r1_c7></TD>
<TD><IMG height=83 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 border=0></TD></TR>
<TR>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif"><IMG height=22
src="images/header_r2_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r2_c1.gif" width=296 border=0
name=header_r2_c1></TD>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colSpan=5>
<DIV align=right><FONT class=normalfont>当前位置:
<A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首页</A>
<font color="#FF6699">>></font>
<A href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</A> | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版权说明</A></font></DIV>
</TD>
<TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff
border=0>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TR>
<TD vAlign=top align=middle width="60%">
<TABLE cellSpacing=0 cellPadding=0 width="100%"
background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
<TBODY>
<TR>
<TD vAlign=top width="80%">
<DIV align=center>
<FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
</FORM>
<TABLE cellSpacing=0 cellPadding=0 width="95%"
border=0><TBODY>
<TR>
<TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif"
height=30></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=3 width="95%"
align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD vAlign=top>
<p><FONT class=normalfont><B><font color=blue>JNDI</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>来自:Linux知识宝库<br>联系方式:无名<br><br>JNDI(Java 命名和目录接口)<br>
分布式计算环境通常使用命名和目录服务来获取共享的组件和资源。命名和目录服务将名称与位置、服务、信息和资源关联起来。<br>
命名服务提供名称—对象的映射。目录服务提供有关对象的信息,并提供定位这些对象所需的搜索工具。有许多命名和目录服务实现,并且到它们的接口是不同的。<br>
<br>
Java 命名和目录接口或 JNDI 提供了一个用于访问不同的命名和目录服务的公共接口。请参阅 URL java.sun.com/products/jndi/serviceproviders.html 以获取支持通过 JNDI 接口访问命名和目录服务的供应商列表。<br>
<br>
JNDI(Java Naming and Directory Interface)<br>
当你在开发企业beans时,JNDI很重要,因为对一个EJB的访问是通过JNDI的命名服务完成的。运用一个命名服务来查找与一个特定名字相关的一个对象。在EJB context中,一个命名服务找到一个企业bean,给定这个bean的名字。因此,了解JNDI在开发一个EJB应用程序中是至关重要的。另外,JDBC可以用JNDI来访问一个关系数据库。<br>
<br>
<br>
<br>
<br>
附:The JNDI Tutorial<br>
http://java.sun.com/products/jndi/tutorial/index.html<br>
(下载)<br>
http://java.sun.com/products/jndi/docs.html#TUTORIAL<br>
<br>
<br>
<br>
JDBC2.0扩展API(1)<br>
<br>
[ 作者: 不详 添加时间: 2001-8-24 14:11:50 ]<br>
<br>
<br>
来源:www.csdn.net<br>
<br>
JDBC 2.0 API被划分为两部分:JDBC 2.0核心API和JDBC 2.0标准扩展API。核心API在java.sql里面。这是原来的版本就实现了的基本的功能。标准扩展API在javax.sql里面。由JDBC2.0规范新规定的一些接口在这里面。当然,JDBC2.0也对原来版本的java.sql核心做了一些改动。不过不是很大。原来JDBC1.0的程序可以不加修改的在JDBC2.0上运行。这是Java的一贯的良好的作风。最新的JDBC包可以从sun公司的网站上下载。<br>
JDBC2.0的扩展API增加了一些数据访问和数据源访问的重大的功能。这中间有一些是主要用来做企业计算的。用JDBC2.0的新的扩展包,JDBC提供了一个从JAVA2平台的通用的数据访问的方法。<br>
首先,我们来看看JDBC标准扩展的API怎样来和JDBC2.0结合在一起的。JDBC2.0包括两个包:<br>
1、 java.sql包,个包里面是JDBC2.0的核心API。它包括了原来的JDBC API(JDBC 1.0版本),再加上一些新的2.0版本的API。这个包在Java 2 Platform SDK里面有。<br>
2、 javax.sql包,这里面是JDBC2.0的标准扩展API。这个包是一个全新的,在Java 2 Platform SDK, Enterprise Edition里面单独提供。<br>
JDBC2.0的核心API包括了JDBC1.0的API,并在此基础上增加了一些功能,对某些性能做了增强。使java语言在数据库计算的前端提供了统一的数据访问方法,效率也得到了提高。<br>
JDBC是向后兼容的,JDBC1.0的程序可以不加修改的运行在JDBC2.0上。但是,假如程序中用到了JDBC2.0的新特性,就必须要运行在JDBC2.0版本上。<br>
概括的来说,JDBC核心API的新特性在两个方面做了工作。一个是支持一些新的功能,另一个就是支持SQL3的数据类型。<br>
1、 在支持新功能方面:包括结果集可以向后滚动,批量的更新数据。另外,还提供了UNICODE字符集的字符流操作。<br>
2、 在支持SQL3的数据类型方面:包括新的SQL3数据类型,增加了对持久性对象的存贮。<br>
为了对数据的存取,操作更加方便,JDBC的新特性是应用程序的设计更容易了。例如:数据块的操作能够显著的提高数据库访问的性能。新增加的BLOB, CLOB,和数组接口能够是应用程序操作大块的数据类型,而不必客户端在存贮之前进行其它的处理。这样,就显著的提高了内存的使用效率。<br>
下面我们来介绍JDBC2.0的标准扩展API。标准扩展API分为如下几个方面:<br>
1、 DataSource接口:和Java名字目录服务(JNDI)一起工作的数据源接口。它提供了对数 吹囊恢指
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -