access to the Human Resources EbeanServer/Database EbeanServer hrServer = Ebean.getServer("HR"); // fetch contact 3 from the HR database Contact contact = hrServer.find(Contact.class, new Integer(3)); contact.setStatus("INACTIVE"); ... // save the contact back to the HR database hrServer.save(contact);
EbeanServer has more API than Ebean
EbeanServer provides additional API compared with Ebean. For example it provides more control over the use of Transactions that is not available in the Ebean API.
External Transactions: If you wanted to use transactions created externally to eBean then EbeanServer provides additional methods where you can explicitly pass a transaction (that can be created externally).
Bypass ThreadLocal Mechanism: If you want to bypass the built in ThreadLocal transaction management you can use the createTransaction() method. Example: a single thread requires more than one transaction.
@see Ebean
@see EbeanServerFactory
@see ServerConfig