[jboss-dev-forums] [Design of EJB 3.0] - Re: Status of annotation based configuration
adrian@jboss.org
do-not-reply at jboss.com
Fri Nov 16 11:17:40 EST 2007
"anil.saldhana at jboss.com" wrote : Use reasonable defaults for annotations?
That doesn't make sense you have to specify the value if you use the annotation
directly.
Rather than the normal annotation, I'd guess the problem is the annotation
created from the xml.
No default here:
| public class PoolImpl implements Pool
| {
| public String value;
|
or here:
| private void addPoolAnnotations(EJBContainer container,
| JBossEnterpriseBeanMetaData enterpriseBean) throws Exception
| {
| if (enterpriseBean.getPoolConfig() != null)
| {
| PoolConfigMetaData config = enterpriseBean.getPoolConfig();
|
| PoolImpl poolAnnotation = new PoolImpl();
|
| if (config.getValue() != null && !config.getValue().trim().equals(""))
| poolAnnotation.setValue(config.getValue());
|
| if (config.getMaxSize() != null)
| poolAnnotation.setMaxSize(config.getMaxSize());
|
| if (config.getTimeout() != null)
| poolAnnotation.setTimeout(config.getTimeout());
|
| addClassAnnotation(container, Pool.class, poolAnnotation);
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105553#4105553
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105553
More information about the jboss-dev-forums
mailing list