I learned a lot from a new YouTube clip by Thomas Stütz, a teacher who uses NetBeans to teach Java at a secondary school in Austria. (A lot more about him here.) It turns out that NetBeans is even better integrated with GlassFish than I thought it was. The @Entity annotation, shown in the YouTube clip by Thomas, gives you access to a series of dialogs for defining the persistence.xml, which also let you define the database itself. Pretty cool. This is a movie well worth watching:
I had a couple of problems following the scenario above on Windows 7.
Depending on the problems you run into, you may need to play with starting NetBeans, GlassFish, and the registration of GlassFish only after starting NetBeans via "Run as Administrator", as discussed here.
You may need to use the "eclipselink.target-database"="Derby" property in your persistence.xml, as described here.
However, in the end, after figuring out various problems via the links above, I was really impressed with the fact that so much can be done directly from the Java Editor in the IDE, via the various yellow lightbulb hints in the left sidebar. Domain-driven development is really possible, when you combine Java EE with NetBeans IDE.