That helps, thank you. I'm starting to undrestand. What's still confusing is how my tests would do something like creating users and roles/groups programmatically. With GlassFish I was using their embedded API to do this (their interface to a command-line utility), so how I would do this in the non-embedded modes you describe? Sorry if I'm not clear, I'm still wrapping my head around all this.