Java Reference
In-Depth Information
Thankfully, all of the steps described in the previous paragraph are automated when
using NetBeans with the bundled GlassFish application server. When using this
combination, all we need to do is open our Enterprise Application Project then
right-click on it and select Debug . At this point the application server is started
in debug mode (or restarted in debug mode if it was already running in standard
mode), the application is deployed and the debugger is automatically attached to
the application server.
We will use the application we developed in Chapter 10 to illustrate NetBeans
debugging capabilities. In order to illustrate such capabilities, we will make
one slight modification to the application in order for it to break under certain
circumstances. Recall that all JPA entities were generated for that application.
When generating JPA entities with NetBeans, we either need to set the primary key
explicitly when inserting a new row in the database, or we need to set automatic
primary key generation using the @GeneratedValue annotation. In our example we
used the second approach. In order to "force" our application to break when inserting
new rows, we will remove this annotation from the Customer JPA entity.
 
Search WWH ::




Custom Search