Re: [jboss-dev-forums] [JBoss AS7 Development] - Data Source Configuration in AS 7
by henk de boer
henk de boer [http://community.jboss.org/people/henk53] commented on the document
"Data Source Configuration in AS 7"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-16657#comment-7056
--------------------------------------------------
> Terrence Curran wrote:
>
>
>
> why was the ability to deploy *-ds.xml datasources removed?
>
I had a similar question about deployment of those files when embedded inside a war or ear. I tried fairly hard to get an answer from the JBoss guys at: http://community.jboss.org/thread/164554 http://community.jboss.org/thread/164554
But 'the answers' are mostly just different variations on "it won't be supported", which is just stating a fact and not really answering the question about the why at all. The closest thing to an answer is a statement about an archive with an embedded datasource not being a Java EE archive anymore.
Personally I disagree with that, since the Java EE specification doesn't state at all that an archive stops being Java EE compliant as soon as its META-INF folder contains a datasource definition. The spec does indeed hints at it 'being the norm' that external resources (including JMS destinations) are defined externally, but IMHO this is open to interpretation and except for the simplistic @DataSourceDefinition the spec doesn't state how and exactly where these resources should be defined.
All of this doesn't explain at all why separate *-ds.xml files also can't be deployed anymore. To me the two cases do seem to be strongly related.
Maybe there's some sensitivity going on that the JBoss guys can't or don't want to discuss publicly.
> @DataSourceDefinition seems problamatic because it makes it very difficult for us to deploy the same war file to test, stage, and production.
Indeed, that's my beef with this (and the corresponding variant in XML as well). There are some options with parameterizing application.xml using the JBoss ${} syntax, but unlike *-ds.xml there doesn't seem to be an easy way to include different variations of application.xml.
One option that Jesper suggested is a totally new archive that contains a script, as well as any number of ears, wars, datasources etc. The script would then talk to the CLI of JBoss AS 7, which would then be able to do the deployment of all artifacts.
For those normally deploying with embedded datasources it would practically mean moving the definition one level up, while for those who normally deploy a separate war and -ds.xml it would mean doing a quick package before copying the files to the remote server.
--------------------------------------------------
14 years, 6 months
Re: [jboss-dev-forums] [JBoss AS7 Development] - Hacking on AS7
by Craig Ringer
Craig Ringer [http://community.jboss.org/people/ringerc] commented on the document
"Hacking on AS7"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-15596#comment-7054
--------------------------------------------------
It'd be really good to see some coverage of how to add new unit tests to the JBoss AS 7 test suite here.
I'm finding issues on a daily basis, and while I file bugs with minimal self-contained test cases attached I'd really like to be able to add the test cases and variants of them to the JBoss AS 7 automatic testing infrastructure to prevent future regressions.
Most of the issues are run- or deployment-time, so they'll need to run with Arquillian.
There isn't any README in the testsuite/ directory of the sources, nor any comment about tests in the main README. If you're not already used to working on the AS7 sources and with Arquillian it's not easy to get started. Since contributing test cases can be really handy and should be encouraged (IMO) perhaps a bit of guidance on this might be beneficial here?
--------------------------------------------------
14 years, 6 months
[JBoss AS7 Development] - CLI non-interactive mode
by Alexey Loubyansky
Alexey Loubyansky [http://community.jboss.org/people/aloubyansky] created the document:
"CLI non-interactive mode"
To view the document, visit: http://community.jboss.org/docs/DOC-17041
--------------------------------------------------------------
Normally, jboss-admin.sh (or jboss-admin.bat) launches a command line session in an interactive mode, meaning it is prompting the user to type in commands and operations and prints the results of the performed actions in the same terminal window for the user to see. There is also another (non-interactive) mode to execute commands and operations that doesn't require typing them after the prompt. The commands can be stored in a file which can be specified as an argument to jboss-admin.sh (or jboss-admin.bat) or even the commands themselves can be specified as arguments to jboss-admin.sh (or jboss-admin.bat). In this case, the CLI session will not display the prompt but just execute the commands and operations listed in the file or specified as the arguments to jboss-admin.sh (or jboss-admin.bat) and quit after the last command has been executed.
h3. Commands in a file
If there is a sequence of commands and/or operations that need to be executed regularly, they can be stored in a file one command or operation per line and this file can be specified as the input source for the CLI. E.g. suppose we have a file test.cli with the following content:
> version
We can execute this file like this
> ./jboss-admin.sh --file=test.cli
> JBoss Admin Command-line Interface
> JBOSS_HOME: /home/XXX/git/jboss-as/build/target/jboss-as-7.1.0.Alpha1-SNAPSHOT
> JAVA_HOME: /opt/jdk/
> java.version: 1.6.0_21
> java.vm.vendor: Sun Microsystems Inc.
> java.vm.version: 17.0-b16
> os.name: Linux
> os.version: 2.6.35.13-92.fc14.i686.PAE
The CLI session is terminated after all the commands and operations have been executed. Note, the CLI doesn't automatically connects to the controller. So, if you want to execute a command or an operation which requires a connection to the controller, you can either add connect command to the file, e.g.
> connect
> ls
>
> ./jboss-admin.sh --file=test.cli
> Connected to standalone controller at localhost:9999
> extension
> core-service
> path
> subsystem
> system-property
> deployment
> interface
> socket-binding-group
> Closed connection to localhost:9999
The connection to the controller will be closed implicitly before the CLI session terminates.
Or instead of adding the command to the file, you could add --connect (or its shorter version -c) argument to jboss-admin.sh (or jboss-admin.bat), e.g.
> ls
> ./jboss-admin.sh -c --file=test.cli
> Connected to standalone controller at localhost:9999
> extension
> core-service
> path
> subsystem
> system-property
> deployment
> interface
> socket-binding-group
h3. Commands as arguments
If all you want to do is execute a single command, then you can specify it using --command argument, e.g.
> ./jboss-admin.sh -c --command=ls
> Connected to standalone controller at localhost:9999
> extension
> core-service
> path
> subsystem
> system-property
> deployment
> interface
> socket-binding-group
or just
>
> ./jboss-admin.sh -c ls
> Connected to standalone controller at localhost:9999
> extension
> core-service
> path
> subsystem
> system-property
> deployment
> interface
> socket-binding-group
If you want to execute more than one command then you should use -commands argument and separate commands with commas, e.g.
> ./jboss-admin.sh -c --commands="cd subsystem=web,ls"
> Connected to standalone controller at localhost:9999
> virtual-server
> connector
Note, the quotes are necessary in this case because between cd and its argument there is a space.
Or a shorter version of the above
> ./jboss-admin.sh -c "cd subsystem=web,ls"
> Connected to standalone controller at localhost:9999
> virtual-server
> connector
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-17041]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
14 years, 6 months
[JBoss AS7 Development] - AS 7 + MyFaces
by Esteve Aviles
Esteve Aviles [http://community.jboss.org/people/esteve] created the discussion
"AS 7 + MyFaces"
To view the discussion, visit: http://community.jboss.org/message/615453#615453
--------------------------------------------------------------
Hi,
I have tested myfaces JSF impl with jboss-as-kitchensink JBoss AS 7 example and failed to startup.
I only added this dependencies to the pom.xml:
| | <dependency> |
| | | | <groupId>org.apache.myfaces.core</groupId> |
| | | | <artifactId>myfaces-api</artifactId> |
| | | | <version>2.1.1</version> |
| | | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | | <groupId>org.apache.myfaces.core</groupId> |
| | | | <artifactId>myfaces-impl-ee6</artifactId> |
| | | | <version>2.1.1</version> |
| | | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | | <groupId>org.apache.myfaces.core</groupId> |
| | | | <artifactId>myfaces-impl</artifactId> |
| | | | <version>2.1.1</version> |
| | | | <scope>compile</scope> |
| | | </dependency> |
|
|
| |
The dependency is added to de MANIFEST.MF too:
Dependencies: org.apache.log4j, javax.faces.api
14:04:40,625 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Error listenerStart
14:04:40,625 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Falló en arranque del Contexto [/jboss-as-kitchensink] debido a errores previos
14:04:40,626 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jboss-as-kitchensink]] (MSC service thread 1-1) Excepción enviando evento de contexto destruído a instancia de escuchador de clase org.apache.myfaces.webapp.StartupServletContextListener: java.lang.IllegalStateException: La aplicación no se ha inicializado correctamente durante el inicio, no se encuentra la fábrica: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:137) [myfaces-impl-2.1.1.jar:]
at org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:186) [myfaces-impl-2.1.1.jar:]
at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1456) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.myfaces.webapp.AbstractFacesInitializer._createFacesContext(AbstractFacesInitializer.java:404) [myfaces-impl-2.1.1.jar:]
at org.apache.myfaces.webapp.AbstractFacesInitializer.initShutdownFacesContext(AbstractFacesInitializer.java:386) [myfaces-impl-2.1.1.jar:]
at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:147) [myfaces-impl-2.1.1.jar:]
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3465) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3970) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3888) [jbossweb-7.0.0.CR4.jar:7.0.0.Final]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.Final.jar:7.0.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_16]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_16]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_16]
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/615453#615453]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months