|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.axiom.AxiomExample
Shows how to use Theory Center's Axiom package of eBusiness Smart Components.
This example illustrates how to use the different types of
Axiom eBusiness Smart Components, including Belongings and
Entities. You can also see how to use the abstract factory
pattern and the Collections API
The Axiom package contains light weight components known
as belongings, as well as Entity and Session EJB
components. Belongings can be aggregated to other components by
value. EJBs are used alone or aggregated to other components by
reference or value.
Belongings are local. Whether client or server-side, the Belonging is
local. They are always passed by value. Although not EJBs, belongings
still are eBusiness Smart Components and use the abstract factory
pattern: you don't use new()
to create one, instead, you
use Home.create()
.
This example also shows the use of Remote Iterators, one of
Theory Center's collection APIs. You can iterate through a collection both
locally and remotely. Locally, the whole collection is sent to you
from the server and you can traverse it. This is good for small
collections where you need to iterate a lot. For large
collections, you can use one or more remote iterators. Remote
iterators traverse the collection in the server. That way, you only
bring over the net the values that you need saving bandwidth. They
also serve as "bookmarks" on a collection, since they "remember" in
what position you leave them.
Belonging
,
theory.smart.foundation.RemoteIterator
,
Email
,
CreditCard
,
Customer
Constructor Summary | |
AxiomExample()
The default constructor for the AxiomExample class |
Method Summary | |
void |
addBelongings(Customer customer)
Demonstrates the creation and use of Belongings Demonstrates the use of the abstract factory pattern to create belongings. |
void |
exitExample(java.lang.String message,
java.lang.Exception e)
Terminates the program, displaying the message and exception |
Customer |
findOrCreateCustomer(java.lang.String customerKey)
Finds or Creates a customer with the given customerKey. |
javax.naming.Context |
getInitialContext()
Gets an initial context for the current user, password and url. |
static void |
main(java.lang.String[] args)
Parses the command line and runs the example. |
void |
removeBelongings(Customer customer)
Shows how to remove belongings from a larger component. |
void |
run()
Controls the examples sequence. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AxiomExample()
Method Detail |
public void addBelongings(Customer customer)
customer
- public void removeBelongings(Customer customer)
customer
- The customer that has the belongingspublic Customer findOrCreateCustomer(java.lang.String customerKey)
customerKey
- the key for the customerpublic void run()
public javax.naming.Context getInitialContext() throws javax.naming.NamingException
public void exitExample(java.lang.String message, java.lang.Exception e)
message
- the exit messagee
- the exception that was raisedpublic static void main(java.lang.String[] args)
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |