-
1. Re: Plug-able default JNDI binding policy
alrubinger Nov 2, 2007 6:40 PM (in response to bdecoste)+1.
Current implementation is dependent on packaging, which, while ensuring namespace-based unique values, immediately breaks all applications once JAR names change, are placed into an EAR, etc.
Bean providers must currently override default names using their own homebaked solution; I'd heavily made use of LocalBinding/RemoteBinding on every EJB just for this purpose. Pluggable policy would address this in one fell swoop.
S,
ALR -
2. Re: Plug-able default JNDI binding policy
alrubinger Nov 2, 2007 7:18 PM (in response to bdecoste)Would also make sense to determine what properties in a deployment might be interesting to a developer implementing a binding strategy, and pass this in:
String getJndiName(SomeNewEjb3DeploymentTO)
..giving the TO instance members:
* deploymentName
* ejbName
* isLocal
* isHome
* isService
* isStateful
* deploymentType
* beanType
...anything else?
S,
ALR -
3. Re: Plug-able default JNDI binding policy
gavin.king Nov 2, 2007 7:24 PM (in response to bdecoste)Not sure if an annotation is really useful. Makes most sense in jboss.xml or jboss-app.xml.
-
4. Re: Plug-able default JNDI binding policy
bdecoste Nov 2, 2007 7:30 PM (in response to bdecoste)We'll have both - an annotation and a place in jboss.xml. All of out metadata is available via an annotation and xml.
-
5. Re: Plug-able default JNDI binding policy
alrubinger Nov 3, 2007 1:46 PM (in response to bdecoste)An entry in jboss-app.xml would also allow us to define a policy for all modules in the EAR; wouldn't require explicit definition on the part of the bean provider for each. Sounds very beneficial.
S,
ALR -
6. Re: Plug-able default JNDI binding policy
alrubinger Nov 4, 2007 1:18 AM (in response to bdecoste)http://jira.jboss.com/jira/browse/EJBTHREE-1101
I've added a default pluggable binding strategy that mirrors the legacy implementation.
Still TODO: Allow definition in jboss.xml, jboss-app.xml (optional for now).
API in org.jboss.ejb3.jndipolicy.DefaultJndiBindingPolicy
S,
ALR -
7. Re: Plug-able default JNDI binding policy
wolfc Nov 5, 2007 3:26 AM (in response to bdecoste)Create a new artifact in projects/ejb3 so we can import one component into both 4.2 and 5.
For the xml I would to see an expression in the likes of: ${earName}/${deploymentName}/${beanName}/${interfaceType}
I don't want a requirement to create new classes when configuring xml stuff. -
8. Re: Plug-able default JNDI binding policy
starksm64 Apr 12, 2008 3:24 PM (in response to bdecoste)Alexey has added a String class name to JBossEnterpriseBeanMetaData. The DefaultJndiBindingPolicy/EjbDeploymentSummary interfaces could be part of metadata so that one can load the policy and use it in the determineJndiName() methods so that there is one method to call to obtain an ejb's jndi name.
-
9. Re: Plug-able default JNDI binding policy
starksm64 Apr 14, 2008 10:39 AM (in response to bdecoste)Related to this is how the ProxyDeployer determines the remote interface binding jndi name. If I need to determine the target jndi name at reference resolution time, this needs to be set earlier.
-
10. Re: Plug-able default JNDI binding policy
rodrigo.uchoa Jul 9, 2012 2:33 PM (in response to bdecoste)Can this be done in JBoss 5.1.0? I would like a way to change the default naming behavior for all EJB jndi names, instead of using the LocalBinding/RemoteBinding annotation in code. Something like a external configuration done on jboss itself, not hard coded inside the applcation code.