...
maxLineItem field in PurchaseOrderBean class is annotated with @Resource annotation to inject a simple environment entry. Default value of10 is assigned. Deployer can modify the values of the environment entries at deploy time in deployment descriptor.
No Format |
---|
@Resource public void setMaxLineItems(int maxLineItems) { this.maxLineItems = maxLineItems10; } |
Injection through a setter method
...
- java:comp/env/org.apache.openejb.examples.resource.InvoiceBean/maxLineItems
No Format |
---|
@Resource public void setMaxLineItems(int maxLineItems) { this.maxLineItems = maxLineItems; } |