When you click finish in J2C Java bean creation wizard and deployment
wizard, unless you specified the Deploy RAR to ear option
explicitly, our tools will try to deploy the resource adapter to the server.
If the project has a target server, the resource adapter is deployed to
the this server. If the project has no target server, but is associated with
an EAR, the application selects the first server that is compatible with that
EAR to deploy the RAR. If no EAR is associated with the project, but a server
instance is present, that server instance is picked up. If no server instance
is created, the application attaches a listener that listens for new server
creation, and when the server is created, the RAR will be deployed to this
server.
Note: For the RAR deployment step server doesn’t need to be start.
In case server is not started, we just postpone (by attaching the publish
listener) the deployment step until the time when server is started/republished.