[JBoss AS7 Development] - CLI Batch Mode
by Scott Stark
Scott Stark [http://community.jboss.org/people/starksm64] modified the document:
"CLI Batch Mode"
To view the document, visit: http://community.jboss.org/docs/DOC-16728
--------------------------------------------------------------
h2. Prototype of the batch mode
The batch mode allows one to group commands and operations and execute them together as an atomic unit, i.e., if at least one of the commands or operations fails, all the other successfully executed commands and operations in the batch are rolled back.
Not all of the commands are allowed in the batch. E.g. commands like 'cd', 'ls', 'help', etc are not allowed in the batch since they don't translate into operation requests. Only the commands that translate into operation requests are allowed in the batch. The batch, actually, is executed as a 'composite' operation request.
The batch mode is entered by executing command +batch+.
[localhost:9999 /] batch
[localhost:9999 / #]
The '#' sign in the prompt indicates that the CLI is in the batch mode. Operations and commands like deploy, create-jms-topic, etc won't be executed immediately, instead they will be added to the current batch.
[localhost:9999 / #] deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
[localhost:9999 / #] create-jms-topic name=mytop
[localhost:9999 / #] :add-system-property(name=myprop,value=myval)
[localhost:9999 / #]
But commands that don't translate into operation requests will be executed immediately. E.g.
[localhost:9999 / #] ls
extension path subsystem deployment management-interfaces
interface socket-binding-group
[localhost:9999 / #] cd subsystem=web
[localhost:9999 web #]
To see the list of the commands and operations in the current batch execute list-batch
[localhost:9999 / #] list-batch
#1 deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
#2 create-jms-topic name=mytop
#3 /:add-system-property(name=myprop,value=myval)
If you want to edit a line in the batch, use edit-batch-line command by providing the line number as the first argument and the edited command as the second one
[localhost:9999 / #] edit-batch-line 2 create-jms-topic name=mytopic
[localhost:9999 / #] list-batch
#1 deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
#2 create-jms-topic name=mytopic
#3 /:add-system-property(name=myprop,value=myval)
If you want to re-order the lines in the batch you can do this using move-batch-line by specifying the command number you want to move as the first argument and its new position as the second argument
[localhost:9999 / #] move-batch-line 3 1
[localhost:9999 / #] list-batch
#1 /:add-system-property(name=myprop,value=myval)
#2 deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
#3 create-jms-topic name=mytopic
You can remove a line using remove-batch-line and specifying the line number of the command in the batch
[localhost:9999 / #] remove-batch-line 2
[localhost:9999 / #] list-batch
#1 /:add-system-property(name=myprop,value=myval)
#2 create-jms-topic name=mytopic
You can postpone batch editing if suddenly you want to perform some other tasks by executing holdback-batch
[localhost:9999 / #] holdback-batch
[localhost:9999 /]
To return to the held back batch, just execute batch command
[localhost:9999 /] batch
Re-activated batch
#1 /:add-system-property(name=myprop,value=myval)
#2 create-jms-topic name=mytopic
Actually, it's possible to hold back more than one batch by adding an argument to holdback-batch
[localhost:9999 / #] holdback-batch mybatch
[localhost:9999 /]
Now, the batch was saved under the name 'mybatch'. To activate it, you now have to execute 'batch mybatch'. Executing just 'batch' will start a new batch.
[localhost:9999 /] batch
[localhost:9999 / #] deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
[localhost:9999 / #] holdback-batch
Now there are two batches held back. Too see the list of all the held back batches, execute batch with '-l' switch
[localhost:9999 /] batch -l
<unnamed>
mybatch
The unnamed batch (there can be only one unnamed batch) is activated by just executing batch command
[localhost:9999 /] batch
Re-activated batch
#1 deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
[localhost:9999 / #]
You can discard the currently active batch by executing discard-batch
[localhost:9999 / #] discard-batch
[localhost:9999 /] batch -l
mybatch
Note, that after you re-activate your batch it is removed from the held back list and not associated with any name anymore. So, if you want to hold it back again, you will have to give it a new unique name or leave it unnamed.
Finally, run-batch executes the currently active batch after which the batch is automatically discarded.
[localhost:9999 /] batch mybatch
Re-activated batch 'mybatch'
#1 /:add-system-property(name=myprop,value=myval)
#2 create-jms-topic name=mytopic
[localhost:9999 / #] run-batch
The batch executed successfully.
[localhost:9999 /]
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16728]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
12 years, 11 months
[jBPM Development] - Question about jbpm4 in web application
by roxy1987
roxy1987 [http://community.jboss.org/people/roxy1987] created the discussion
"Question about jbpm4 in web application"
To view the discussion, visit: http://community.jboss.org/message/605617#605617
--------------------------------------------------------------
HI,
I am using jbpm 4.3 in my web application. Whenever I try to run the method deploy, that is actually using repository service to deploy the resource, it gives the following exception :
javax.servlet.ServletException: Servlet.init() for servlet MainServlet threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
java.lang.Thread.run(Thread.java:619)
*root cause*
java.lang.NoSuchMethodError: org.w3c.dom.Element.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;
org.jbpm.pvm.internal.xml.DomBuilder.startElement(DomBuilder.java:318)
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
org.jbpm.pvm.internal.xml.Parser.buildDom(Parser.java:452)
org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:389)
org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)
org.jbpm.pvm.internal.wire.xml.WireParser.<clinit>(WireParser.java:284)
org.jbpm.pvm.internal.cfg.ConfigurationParser.<init>(ConfigurationParser.java:46)
org.jbpm.pvm.internal.cfg.ConfigurationParser.<clinit>(ConfigurationParser.java:49)
org.jbpm.pvm.internal.cfg.ConfigurationImpl.parse(ConfigurationImpl.java:139)
org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:118)
org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:76)
org.jbpm.api.Configuration.buildProcessEngine(Configuration.java:105)
action.MainServlet.init(MainServlet.java:52)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
java.lang.Thread.run(Thread.java:619)
This has something to do with the jars i am using but I have searched java forums for this exception and could not find anything. SO finally I posted this question here so if any one who came across could help.
regds.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/605617#605617]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
Re: [jboss-dev-forums] [JBoss AS7 Development] - AS7 Deployment Terms
by Stan Silvert
Stan Silvert [http://community.jboss.org/people/ssilvert] commented on the document
"AS7 Deployment Terms"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-16804#comment-6402
--------------------------------------------------
For domain, you can not remove until you have unassigned from all server groups. The unassign would result in an undeploy.
For standalone, I think that remove implies that the deployment will try to undeploy first. It might be an open question as to whether or not we require an explicit "disable" before we allow a remove operation.
In any case, it doesn't make sense to remove without undeploy. For instance, what if the deployment needs to load static conent like an html page? If the deployment is removed then the server wouldn't be able to find it.
--------------------------------------------------
12 years, 11 months
[JBoss AS7 Development] - AS7 Deployment Terms
by Stan Silvert
Stan Silvert [http://community.jboss.org/people/ssilvert] modified the document:
"AS7 Deployment Terms"
To view the document, visit: http://community.jboss.org/docs/DOC-16804
--------------------------------------------------------------
AS7 adds a lot of new functionality to the world of deployments. Consequently, there is a need to add new terms and define some old terms more strictly. This document provides a means to define deployment-related terms and explain a bit about AS7 deployments along the way.
|| *Term
* || *Definition
* || *Notes
* ||
| deployment | The bits that make up an application. A deployment consists of one or more content archives. | Examples are WAR, EAR, JAR, RAR |
| deploy | This is what happens when a deployment starts to initalize and become available for use. Note that, strictly speaking, "deploy" is not something you do directly. It is what happens when a deployment is ready to run. | Actions that might cause a deployment to deploy might be a server starting, or enabling a disabled deployment. |
| undeploy | This is what happens when a running deployment shuts down and executes its uninitialization process. The deployment will then cease to respond to user requests. | Actions that might cause an undeploy would be to disable a deployment or remove a deployment. |
| redeploy | This is what happens when a running deployment does an undeploy followed by an immediate deploy. | Actions that might cause a redeploy would be to sucessively disable and enable a running deployment. In some cases a redeploy would happen when the deployment's content bundle is updated. |
| content bundle / content archive / content | Sub-archives that make up a deployment are content archives. The archives together may be referred to as a content bundle or just content. | For example, an EAR deployment might consist of a WAR, an ejb JAR, and a RAR. Altogether, the EAR is a content bundle. Each of its parts are content archives. |
| managed content | A content bundle that is uploaded to a standalone AS7 instance or an AS7 domain. |
|
| content store | The place where managed content is kept and managed by a standalone AS7 instace or an AS7 domain |
|
| upload | Copy a deployment's bits into the content store. +Should the CLI change the name of the "deploy" command to "upload"? Right now the console uses the term "upload".+ | Depending on the tool used and the options chosen, an upload may or may not cause the deployment to immediately deploy. |
| unmanaged content | Content that exists on a file system. It can be referenced and deployed by AS7, but its bits are managed manually on a file system. |
|
| exploded content | unmanaged content that is not in jar format. Instead, it is "unzipped" onto a file system. | Any deployment or content bundle can be exploded onto a file system. The root of the exploded content bundle should be a directory that mimics an archive file name such as /foo.ear/ or /bar.war/ |
| unexploded content | unmanaged content that is in a jar format. It exists on the file system with a well-known extension such as .war, .ear, or .jar |
|
| deployment name | The name of the deployment. In an AS7 domain, this name must be unique across the entire domain. The name must also be unique in a standalone server. |
|
| runtime name | The EE application/module name. This name must be unique in a standalone server. In a domain, it must be unique within a server group. | +I think this needs some better explanation and a better definition. For instance in the case of an EAR does it always correspond to a name in application.xml?
+ |
| enable | Enable a deployment to deploy. If there are no errors, the deployment will complete its initialization process and make itself available as an application. | In the case of a domain, a deployment can be enabled or disabled for each individual server group. |
| disable | Stop a deployment from running. The deployment will start its uninitialization process and stop taking user requests. |
|
| assign | Assign a deployment to a server group. | Domain only. |
| unassign | Unassign a deployment from a server group. | Domain only. |
| remove | Make the deployment unknown to the standalone server or domain. In the case of managed content, the content *will* be removed from the content store. In the case of unmanaged content, the content *will not* be removed from the file system. |
|
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16804]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
12 years, 11 months
[JBoss AS7 Development] - AS7 Deployment Terms
by Stan Silvert
Stan Silvert [http://community.jboss.org/people/ssilvert] modified the document:
"AS7 Deployment Terms"
To view the document, visit: http://community.jboss.org/docs/DOC-16804
--------------------------------------------------------------
AS7 adds a lot of new functionality to the world of deployments. Consequently, there is a need to add new terms and define some old terms more strictly. This document provides a means to define deployment-related terms and explain a bit about AS7 deployments along the way.
|| *Term
* || *Definition
* || *Notes
* ||
| deployment | The bits that make up an application. A deployment consists of one or more content archives. | Examples are WAR, EAR, JAR, RAR |
| deploy | This is what happens when a deployment starts to initalize and become available for use. Note that "deploy" is not something you do directly. It is what happens when a deployment is ready to run. | Actions that might cause a deployment to deploy might be a server starting, or enabling a disabled deployment. |
| undeploy | This is what happens when a running deployment shuts down and executes its uninitialization process. The deployment will then cease to respond to user requests. | Actions that might cause an undeploy would be to disable a deployment or remove a deployment. |
| redeploy | This is what happens when a running deployment does an undeploy followed by an immediate deploy. | Actions that might cause a redeploy would be to sucessively disable and enable a running deployment. In some cases a redeploy would happen when the deployment's content bundle is updated. |
| content bundle / content archive / content | Sub-archives that make up a deployment are content archives. The archives together may be referred to as a content bundle or just content. | For example, an EAR deployment might consist of a WAR, an ejb JAR, and a RAR. Altogether, the EAR is a content bundle. Each of its parts are content archives. |
| managed content | A content bundle that is uploaded to a standalone AS7 instance or an AS7 domain. |
|
| content store | The place where managed content is kept and managed by a standalone AS7 instace or an AS7 domain |
|
| upload | Copy a deployment's bits into the content store. +Should the CLI change the name of the "deploy" command to "upload"? Right now the console uses the term "upload".+ | Depending on the tool used and the options chosen, an upload may or may not cause the deployment to immediately deploy. |
| unmanaged content | Content that exists on a file system. It can be referenced and deployed by AS7, but its bits are managed manually on a file system. |
|
| exploded content | unmanaged content that is not in jar format. Instead, it is "unzipped" onto a file system. | Any deployment or content bundle can be exploded onto a file system. The root of the exploded content bundle should be a directory that mimics an archive file name such as /foo.ear/ or /bar.war/ |
| unexploded content | unmanaged content that is in a jar format. It exists on the file system with a well-known extension such as .war, .ear, or .jar |
|
| deployment name | The name of the deployment. In an AS7 domain, this name must be unique across the entire domain. The name must also be unique in a standalone server. |
|
| runtime name | The EE application/module name. This name must be unique in a standalone server. In a domain, it must be unique within a server group. | +I think this needs some better explanation and a better definition. For instance in the case of an EAR does it always correspond to a name in application.xml?
+ |
| enable | Enable a deployment to deploy. If there are no errors, the deployment will complete its initialization process and make itself available as an application. | In the case of a domain, a deployment can be enabled or disabled for each individual server group. |
| disable | Stop a deployment from running. The deployment will start its uninitialization process and stop taking user requests. |
|
| assign | Assign a deployment to a server group. |
|
| unassign | Unassign a deployment from a server group. |
|
| remove | Make the deployment unknown to the standalone server or domain. In the case of managed content, the content *will* be removed from the content store. In the case of unmanaged content, the content *will not* be removed from the file system. |
|
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16804]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
12 years, 11 months