... in the NetBeans Services tab’s Databases > Java DB node.
databaseName
—The database’s name.user
—The username for logging into the database.password
—The password for logging into the database.1
Though we do not do so here, the @DataSourceDefinition
annotation also can create the database, by specifiying the attribute
properties = {“createDatabase=create”}
The app could then create the database’s table(s) programmatically. We manually created the database in advance so we could prepopulate it with sample address data.
Class AddressBean
’s Annotations—@Named
and @javax.faces.view.ViewScoped
In Chapter 30, we introduced the @ManagedBean ...
Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.