Steven Takerson
Steven Takerson

Reputation: 83

JBoss AS 7 deployments - use deployment scanner or console repo?

I've started using AS 7 after a migration and trying to work out whether the hot deployment works the same way as the console method of uploading applications?

If the hot deployment stays in the deployment folder, where do the applications "go" when they are loaded by the console (or the cli?). Which method should I be using in an admin role? What happens if I use both?

Upvotes: 1

Views: 1936

Answers (2)

Davide Consonni
Davide Consonni

Reputation: 2124

If you use hotdeploy your application will stay in "deployments", otherwise if you use cli your application will stay in "data" folder.

You can use hotdeploy or cli deploy both, last deployed is the current.

here the documentation about deploy command:

[standalone@localhost:9999 /] deploy --help SYNOPSIS

deploy (file_path [--name=deployment_name] [--runtime_name=deployment_runtime_name] [--force | --disabled] |

--name=deployment_name) [--server-groups=group_name (,group_name)* | --all-server-groups] [--headers={operation_header (;operation_header)*}]

DESCRIPTION

Deploys the application designated by the file_path or enables an already existing
but disabled in the repository deployment designated by the name argument.
If executed w/o arguments, will list all the existing deployments.

ARGUMENTS

file_path - the path to the application to deploy. Required in case the deployment doesn't exist in the repository. The path can be either absolute or relative to the current directory.

--name - the unique name of the deployment. If the file path argument is specified the name argument is optional with the file name been the default value. If the file path argument isn't specified then the command is supposed to enable an already existing but disabled deployment, and in this case the name argument is required.

--runtime_name - optional, the runtime name for the deployment.

--force - if the deployment with the specified name already exists, by default, deploy will be aborted and the corresponding message will printed. Switch --force (or -f) will force the replacement of the existing deployment with the one specified in the command arguments.

--disabled - indicates that the deployment has to be added to the repository disabled.

--server-groups - comma separated list of server group names the deploy command should apply to. Either server-groups or all-server-groups is required in the domain mode. This argument is not applicable in the standalone mode.

--all-server-groups - indicates that deploy should apply to all the available server groups. Either server-groups or all-server-groups is required in domain mode. This argument is not applicable in the standalone mode.

-l - in case none of the required arguments is specified the command will print all of the existing deployments in the repository. The presence of the -l switch will make the existing deployments printed one deployment per line, instead of in columns (the default).

--headers - a list of operation headers separated by a semicolon. For the list of supported headers, please, refer to the domain management documentation or use tab-completion.

Upvotes: 2

James R. Perkins
James R. Perkins

Reputation: 17780

I believe the only way to have a hot deployment is to use the file system deployments, e.g. the deployment scanner. You can get some information about that on the application deployment documentation.

When you deploy through the console or CLI the deployment stays compressed and goes into the content directory. There's not much you can really do with the content of it there though.

For production it's advised to not use the deployment scanner. There are several ways to deploy your application, but the easiest tend to be with the web console, CLI or the maven plug-in. There are Java API's as well or you could write a script to execute CLI commands.

Upvotes: 1

Related Questions