Getting a reference to a bundle in Java
To use entity instances, in many cases you need a reference to a bundle. A bundle is a programmatic abstraction that represents one database transaction. See Bundles and database transactions. The package for the Bundle class changed in this release for both Gosu and Java.
To get the current bundle using the PolicyCenter 8.0 Java API, use the following code:
gw.pl.persistence.core.Bundle b = gw.transaction.Transaction.getCurrent();If there is no current bundle, you must create a bundle before creating entity instances or updating entity instances that you get from a database query. See Getting a reference to an existing bundle from Java.
