第四套面试题.docVIP

  • 5
  • 0
  • 约5.35千字
  • 约 6页
  • 2017-08-24 发布于河南
  • 举报
JNDI全称,用途? 答案:JNDI全称 Java Naming and Directory Interface 开发者使用JNDI,能够实现目录和Java对象之间的交互。 使用JNDI,开发者能获得对JAVA事务API中UserTransaction接口的引用。 借助于JNDI,开发者能连接到各种资源工厂,如JDBC数据源,Java消息服务等。 客户和EJB组件能够借助于JNDI查找到其他EJB组件jndi的用途: 。你可以用jndi来得到object类的属性 如:Attribute attr =directory.getAttributes(personName).get(email); String email = (String)attr.get(); 你可以用jndi来搜索对象 如:foxes = directory.search(o=Wiz,c=US, sn=Fox, controls); 查找谁的名字叫Fox在wiz部门的员工? 你可以用jndi通过naming/directory服务查询像printers和databases的对象 如:查询 Printer Printer printer = (Printer)namespace.lookup(printerName); printer.print(document); 你可以用jndi列表出命

文档评论(0)

1亿VIP精品文档

相关文档