bea Systems, Inc.

Package examples.passbyvalue

Shows the use of Theory Center's eBusiness Smart Components' pass-by-value feature.

See:
          Description

Class Summary
PassByValueExample Pass-by-value example.
 

Package examples.passbyvalue Description

Shows the use of Theory Center's eBusiness Smart Components' pass-by-value feature.

This example demonstrates:


Getting and Setting Attributes Using pass-by-value

This example shows how you can get and set the attributes of an Entity eBSC by value. What this means is that instead of getting/setting one attribute at a time, you can request that a local copy of all attributes be sent to you directly, in one remote call. You can then read and modify this "Value object" or local copy, and send it back in one remote call. This has tremendous performance advantages compared to accessing one attribute at a time It is also important to be able to set many attributes within a single transaction without having to begin/commit a JTS User Transaction from the client. In short, pass-by-value is really handy! Our implementation is tightly-coupled: that means that at compile time, we enforce type consistency for getting/setting attributes in the value objects. This is a great advantage over "parameter sets", or "late-binding" implementations where you pass around a set of name/value pairs: in that case, if you change the type of an attribute your client will still compile but crash at runtime. That wouldn't happen using eBSCs, since the value object would change accordingly and the client would not compile if an assignment was illegal. And in case you're wondering, our value objects are generated by Theory Center's SmartGenerator (based on a UML model), so they don't add any maintenance costs.

Pass By Value Example

The PassByValue example application performs the following steps:

  1. Find or create or a Customer component
  2. Create a value object and get the CustomerValue.
  3. Change Customer information
  4. Set the CustomerValues

To get the most out of this example, first read through PassByValueExample.java. Then you can build it and run it.

Please note: to build and run, you must have the following in your CLASSPATH:

1) smart-generator.jar (..\theorycenter\smart-generator.jar), axiom-foundation.jar (..\theorycenter\lib\axiom-foundation.jar), and ebusiness.jar (..\theorycenter\lib\ebusiness.jar) .

2) Application Server classes (default classpath required by Weblogic)

The fastest way to run any of the examples is by using the scripts provided in ..\theorycenter\*.bat

 

 


bea Systems, Inc.

© Copyright 2000 bea Systems, Inc. All rights reserved.