You should be able to do this. Let me look into it in the morning and see if I can figure out what is wrong (bed time now.)<br><br><div class="gmail_quote">On Tue, Aug 28, 2012 at 8:47 PM, JFlower <span dir="ltr"><<a href="mailto:fiorenzino@gmail.com" target="_blank">fiorenzino@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div><br></div><div>I should add a nested (complex) annotation to MDB class, like this:</div><div><div>@MessageDriven(name = "MDBName", activationConfig = {</div>
<div><span style="white-space:pre-wrap">                                </span> @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),</div>
<div><span style="white-space:pre-wrap">                                </span> @ActivationConfigProperty(propertyName = "destination", propertyValue = "blah"),</div><div><span style="white-space:pre-wrap">                                </span> @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),</div>
<div><span style="white-space:pre-wrap">                                </span> @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1"),</div><div><span style="white-space:pre-wrap">                                </span> @ActivationConfigProperty(propertyName = "transactionTimeout", propertyValue = "10800"),</div>
<div><span style="white-space:pre-wrap">                                </span> @ActivationConfigProperty(propertyName = "dLQMaxResent", propertyValue = "0") </div><div>})</div></div><div><br></div><div>i can't find something like this in forge code...</div>
<div><br></div><div>I tried with :</div><div>JavaClass ejb =((JavaResource) resource).getJavaSource();</div><div><div>ejb.addAnnotation(EjbType.MESSAGEDRIVEN.getAnnotation())</div><div><span style="white-space:pre-wrap">                                                </span>.setStringValue( "name", resource.getName().substring(0, resource.getName().lastIndexOf(".")))</div>
<div><span style="white-space:pre-wrap">                                                </span><b>.setStringValue( "activationConfig",</b></div><div><b> + "\"{ @ActivationConfigProperty(propertyName = \"destinationType\", propertyValue = \"" + destinationType + "\") "</b></div>
<div><b><span style="white-space:pre-wrap">                                                                                </span>+ "@ActivationConfigProperty(propertyName = \"destination\", propertyValue = \"" + destinationName + "\")}");</b></div>
</div><div><br></div><div>This code does not generate errors, but doesn't add properties to @MessageDriven annotation.</div><div><br></div><div>Someone can help me?</div><div><br></div><div>thanks</div><div><br></div>
<div>Fiorenzo</div>
<br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>"Simpler is better."<br>