名称与实体关联,貌似就是为了便利,可能效率上有些差别或者...看维基也没看出到底适用性或必要性在哪The Java Naming and Directory Interface (JNDI) is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name. Like all Java APIs that interface with host systems, JNDI is independent of the underlying implementation. Additionally, it specifies a service provider interface (SPI) that allows directory service implementations to be plugged into the framework. It may make use of a server, a flat file, or a database; the choice is up to the vendor.感觉就是一种解耦
访问容器的ejb,性能不错
你当然可以注册然后在代码中查找
但是没有必要...自己直接引用性能才高
下午马上结贴