Open topic with navigation

TIBCO® Enterprise Administrator 2.4.2

# Object Type Definition: Overview

Within your agent code, you can define an object type using either of two implementation styles—interface style or annotation style. Your choice of style depends on the characteristics of the product that the agent manages.

Aspect | Interface Style | Annotation Style
--- | --- | ---
Defining Object Types | Define an object type by defining a class that implements interfaces such as TopLevelTeaObject, TeaObject or SingletonTeaObject. | Define a class, then annotate it as an object type using TeaObjectType or TeaObjectTypes.
Representing Product Objects | To represent an object in the product, your agent code creates a Java instance of a corresponding class. | To represent an object in the product, your agent code can use an object identifier that indexes into a database.
Objects in the Agent Library | Your agent code can pass these Java instances to the agent library through a provider object. The agent library calls the interface methods of these instances. Note: Your agent code and the agent library share access to these instances, which could affect memory management. | Your agent code passes only object identifiers to the agent library.
Advantages | Java coding style is straightforward. | Object identifiers are inexpensive strings. One database query can retrieve many objects.
Disadvantages | Instantiating many objects can be costly. If a product has many managed objects, then the agent instantiates many Java objects to represent them. | Translating between object identifier strings and object information adds an additional layer of complexity to your agent code.
Choosing a Style | Appropriate for products with relatively few managed objects Appropriate for rapid prototyping | Appropriate for products with many managed objects Appropriate for products that already store objects in a database (including a flat-file database or a non-persistent database)

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Enterprise Administrator

Copyright © 1996-2025. Cloud Software Group, Inc. All Rights Reserved.