target()
field is an empty array. For example,javax.ejb.ActivationConfigProperty:
@Target(value={})
@Retention(value=RUNTIME)
public @interface ActivationConfigPropertyjavax.persistence.EntityResult
@Target(value={})
@Retention(value=RUNTIME)
public @interface EntityResult
@ActivationConfigProperty
can only be used inside @javax.ejb.MessageDriven
to specify properties for the Message-Driven Bean (MDB):@MessageDriven(name="MessageBean",
activationConfig = {
@ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Topic"),
@ActivationConfigProperty(propertyName="acknowledgeMode",
propertyValue="Auto-acknowledge"),
@ActivationConfigProperty(propertyName="subscriptionDurability",
propertyValue="Durable"),
@ActivationConfigProperty(propertyName="messageSelector",
propertyValue="name='java' AND bugs < 1")
})
public class MessageBean implements MessageListener {
...
}
@javax.persistence.EntityResult
can only be used as nested annotation inside @javax.persistence.SqlResultSetMapping
. Here is a more complex example from its java doc, with 3 nested annotations at 3 different levels:@SqlResultSetMapping(name="OrderResults",
entities={
@EntityResult(entityClass=com.acme.Order.class, fields={
@FieldResult(name="id", column="order_id"),
@FieldResult(name="quantity", column="order_quantity"),
@FieldResult(name="item", column="order_item")})},
columns={
@ColumnResult(name="item_name")}
)
Tags: