org.superbiz.injection
Class InvoiceBean
java.lang.Object
org.superbiz.injection.InvoiceBean
- All Implemented Interfaces:
- Invoice
public class InvoiceBean
- extends Object
- implements Invoice
This example demostrates the use of the injection of environment entries
using Resource annotation.
"EJB Core Contracts and Requirements" specification section 16.4.1.1.
- Version:
- $Rev: 649752 $ $Date: 2008-04-19 05:59:15 +0200 (Sa, 19. Apr 2008) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InvoiceBean
public InvoiceBean()
setMaxLineItems
public void setMaxLineItems(int maxLineItems)
- Injects the maxLineItems simple environment entry through bean
method.
The JavaBeans property name (not the method name) is used as the default
JNDI name. By default, the JavaBeans propery name is combined with the
name of the class in which the annotation is used and is used directly as
the name in the bean's naming context. JNDI name for this entry would
be
java:comp/env/org.apache.openejb.examples.resource.InvoiceBean/maxLineItems
Refer "EJB Core Contracts and Requirements" specification section 16.2.2.
- Parameters:
maxLineItems
-
addLineItem
public void addLineItem(LineItem item)
throws TooManyItemsException
- Specified by:
addLineItem
in interface Invoice
- Throws:
TooManyItemsException
getMaxLineItems
public int getMaxLineItems()
- Specified by:
getMaxLineItems
in interface Invoice
Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.