[Design of EJB 3.0] - jndi name issues
by scott.stark@jboss.org
How does the following ejb-jar.xml/jboss.xml produce these bindings:
| <?xml version="1.0" encoding="UTF-8"?>
| <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
| <display-name>Ejb1</display-name>
| <enterprise-beans>
| <session>
| <ejb-name>TestBean</ejb-name>
| <home>com.sun.ts.tests.appclient.deploy.compat12_50.TestBeanHome</home>
| <remote>com.sun.ts.tests.appclient.deploy.compat12_50.TestBean</remote>
| <ejb-class>com.sun.ts.tests.appclient.deploy.compat12_50.TestBeanEJB</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Bean</transaction-type>
| <security-identity>
| <use-caller-identity/>
| </security-identity>
| </session>
| </enterprise-beans>
| </ejb-jar>
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
| http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" version="3.0">
| <unauthenticated-principal>guest</unauthenticated-principal>
| <enterprise-beans>
| <session>
| <ejb-name>TestBean</ejb-name>
| <jndi-name>appclient_deploy_compat12_50_TestBean</jndi-name>
| <call-by-value>true</call-by-value>
| </enterprise-beans>
| </jboss>
|
|
| +- TestBean (class: org.jnp.interfaces.NamingContext)
| | +- home (proxy: $Proxy292 implements interface com.sun.ts.tests.appclient.deploy.compat12_50.TestBeanHome)
| +- appclient_deploy_compat12_50_TestBean (proxy: $Proxy290 implements interface org.jboss.ejb3.proxy.JBossProxy)
|
| 2008-04-28 18:22:14,699 DEBUG [org.jboss.ejb3.proxy.factory.ProxyFactoryHelper:1022] Obtaining JNDI name from policy org.jboss.ejb3.jndipolicy.impl.PackagingBasedJndiBindingPolicy
| 2008-04-28 18:22:14,700 DEBUG [org.jboss.ejb3.proxy.factory.BaseSessionProxyFactory:187] Binding proxy for TestBean in JNDI at appclient_deploy_compat12_50_TestBean
| 2008-04-28 18:22:14,701 DEBUG [org.jboss.ejb3.proxy.factory.ProxyFactoryHelper:1022] Obtaining JNDI name from policy org.jboss.ejb3.jndipolicy.impl.PackagingBasedJndiBindingPolicy
| 2008-04-28 18:22:14,702 DEBUG [org.jboss.ejb3.proxy.factory.ProxyFactoryHelper:1022] Obtaining JNDI name from policy org.jboss.ejb3.jndipolicy.impl.PackagingBasedJndiBindingPolicy2008-04-28 18:22:14,705 DEBUG [org.jboss.ejb3.proxy.factory.ProxyFactoryHelper:1022] Obtaining JNDI name from policy org.jboss.ejb3.jndipolicy.impl.PackagingBasedJndiBindingPolicy
| 2008-04-28 18:22:14,706 DEBUG [org.jboss.ejb3.proxy.factory.stateless.StatelessRemoteProxyFactory:83] Binding proxy for TestBean in JNDI at TestBean/home
|
There has to be a way for a deployer to look at the metadata in the context of a given ejb ref and be able to determine the jndi name for the binding. Right now its impossible with the logic being done by the proxy factories.
We have the DefaultJndiPolicy/EjbDeploymentSummary in metadata and the EjbDeploymentSummary includes the JBossEnterpriseBeanMetaData for the bean whose jndi name is being processed. We don't have the jndi policy to use generally available in the JBossMetaData. We could add it to a merged view that bridged the annotation information which is the current source of the policy default.
We have to get to the point where unit tests in metadata demonstrate how to obtain the jndi name for an ejb reference for every usecase. Currently this is not possible.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147403#4147403
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147403
16 years, 8 months