I have read that embedded containers are worse than managed containers, which are in turn less reliable than remote containers.
Arquillian allows you to write 'real' tests, but I do not know the difference between these container types, mainly the embedded vs managed.
If I use Jboss within Eclipse, is that an embedded or managed container?
If I start Jboss from the command line, without eclipse, is that embedded or managed, or remote?
For bonus points, how does the word 'standalone' container fit in with these terms?
Container technology is fundamentally changing how systems are developed, tested, deployed, and managed. The main functions of embedded containers are to wrap up applications and services with all their dependencies and to isolate multiple software components running on the same hardware.
Enterprise JavaBeans (EJB) container: Manages the execution of enterprise beans for Java EE applications. Enterprise beans and their container run on the Java EE server. Web container: Manages the execution of web pages, servlets, and some EJB components for Java EE applications.
Containers are the interface between a component and the low-level platform-specific functionality that supports the component. Before a web, enterprise bean, or application client component can be executed, it must be assembled into a Java EE module and deployed into its container.
The Target container varieties documentation linked by Max provide the conceptual background and terminology:
Arquillian recognizes three container interaction styles:
A remote container resides in a separate JVM from the test runner; Arquillian binds to the container to deploy and undeploy the test archive and invokes tests via a remote protocol (typically HTTP)
An embedded container resides in the same JVM as the test runner; lifecycle managed by Arquillian; tests are executed via a local protocol for containers without a web component (e.g., Embedded EJB) and via a remote protocol for containers that have a web component (e.g., Embedded Java EE)
A managed container is the same as a remote container, but in addition, its lifecycle (startup/shutdown) is managed by Arquillian and is run as a separate process
Now I'll try to answer your questions.
I have read that embedded containers are worse than managed containers, which are in turn less reliable than remote containers.
Each type of container will have it's appropriate use case. The "worse" or "better" depends what you are trying to do.
For example, most of the time I am writing some code my container is running, so I prefer to test with a remote container, since it saves up a lot of start/stop time.
Arquillian allows you to write 'real' tests, but I do not know the difference between these container types, mainly the embedded vs managed.
The difference is explained in the documentation linked above.
If I use Jboss within Eclipse, is that an embedded or managed container?
It is remote, because Arquillian doesn't have any control over it. It is a totally separated process from the Arquillian lifecycle.
If I start Jboss from the command line, without eclipse, is that embedded or managed, or remote?
Still a remote container. Eclipse starts up JBoss pretty much in the same way you do it using command line, and Arquillian does not have any control over it.
For bonus points, how does the word 'standalone' container fit in with these terms?
Standalone means that the server is not part of centralized management control, meaning that any changes made to one node are not coordinated to other nodes.
For example, if you create a data source on a standalone node 1, it will not be replicated to node 2.
That is why a Domain configuration is much preferable since you'll managed the entire cluster in a centralized manner (Reference: Operating modes).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With