引言:
http://www.sina.com.cn 2004年09月08日 10:38 天极yesky 文/leisureful DriverManager 类是 JDBC 的管理层,作用于用户和驱动程序之间。
摘要:
chapter 6. creating a cmp entity beanthis chapter covers how to create a container managed persistence (cmp) ejb component. we will create two cmp beans, item and supplier as shown below. the item be......
摘要:
chapter 8. creating web clientsthis chapter describes how to create web clients in the client tier/presentation tier to access or otherwise communicate with the business tier. servlets and jsp pages ......
Java数据库接口JDBC基础教程之驱动设置上一页 ...以下代码加载类 acme.db.driver: class.forname("acme.db.driver"); 如果将 acme.db.driver 编写为加载时创建实例,并调用以该实例为参数的 drivermanager.registerdriver(本该如此),则它在 drivermanager 的驱动程序列表中,并可用于创建连接. 通过将驱动程序添加到 java.lang.system 的属性 jdbc.drivers 中.这是一个由 drivermanager 类加载的驱动程序类名的列表,由冒号分隔:初始化 drivermanager 类时,它搜索系统属性 jdbc.drivers,如果用户已输入了一个或多个驱动程序,则 drivermanager 类将试图加载它们.以下代码说明程序员如何在 ~/.hotjava/properties 中输入三个驱动程序类(启动时,hotjava 将把它加载到系统属性列表中): jdbc.drivers=foo.bah.driver:wombat.sql.driver:bad.test.ourdriver; 对 drivermanager 方法的第一次调用将自动加载这些驱动程序类. 注意:加载驱动程序的第二种方法需要持久的预设环境.如果对这一点不能保证,则调用方法 class.forname 显式地加载每个驱动程序就显得更为安全.这也是引入特定驱动程序的方法,因为一旦 drivermanager 类被初始化,它将不再检查 jdbc.drivers 属性列表. 在以上两种情况中,新加载的 driver 类都要通过调用 drivermanager.registerdriver 类进行自我注册.如上所述,加载类时将自动执行这一过程. 由于安全方面的原因,jdbc 管理层将跟踪哪个类加载器提供哪个驱动程序....
下一页 摘要:
使用ejb3.o简化ejb开发 原著:debu panda我们引入ejb来构造分布式的组件。它诞生之时是为了解决所有corba的问题和复杂性。经历过几次重要的版本更新和增加许多特性之后,ejb已经成为了j2ee的核心。在早期,很多开发人员沉迷于ejb甚至在没有任何意义的情况下在他们的工程中使用ejb。而当他们发现所使用的工程并没有质的变化后,谴责ejb成了一种趋势。开发ejb从来没有变得简单甚至......