[JBoss Transactions Development] - Narayana Release Process
by Paul Robinson
Paul Robinson [https://community.jboss.org/people/paul.robinson] modified the document:
"Narayana Release Process"
To view the document, visit: https://community.jboss.org/docs/DOC-17433
--------------------------------------------------------------
This page provides a list of instructions that must be done *in order* when doing a release of Narayana.
h2. Check JIRA
1. Ensure all issues are resolved. Any outstanding issues must be pushed back or resolved.
h2. Check Hudson
Ensure no test failures in the following group of hudson tests:
...
Also check Newcastle hudson server?
h2. Run XTS Tests
This process is manual at the moment. Paul needs to do this.
1. Build narayana
2. Build the target JBossAS, aftr updating the narayan dep in the root pom.xml
3. Run the unit, interop and crash recovery tests.
h2. Do Release
1. Build the release.
2. Upload to nexus.
h2. Update Website
Update the Narayana community site:
* Documentation
* Downloads
h2. Create Maintenance Branch
If apropriate create a maintenance branch in SVN/Git.
h2. JIRA Release
1. Close all issues in the current release.
2. Mark as released.
h2. Push Upstream
If appropriate for this release, create a new 'component update' issue in AS7 JIRA. Ensure the module is set to 'transactions' and select an appropriate 'fix for'.
h2. Promote
Promote the release through the following channels:
1. Forum
2. JBossTM community front page
3. Email The Core?
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-17433]
Create a new document in JBoss Transactions Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 11 months
[JBoss Transactions Development] - XTSTestingCurrentStatus
by Paul Robinson
Paul Robinson [https://community.jboss.org/people/paul.robinson] modified the document:
"XTSTestingCurrentStatus"
To view the document, visit: https://community.jboss.org/docs/DOC-17242
--------------------------------------------------------------
h1. XTS Testing
h1. Current Status and Roadmap
h1.
This Document describes the current status of the XTS tests and what technology they use. There are currently three sets of tests, Unit, Interop and recovery. Each of these is described in turn, and a list of required improvements is presented.
All improvements are targeted at Narayana 5.x unless specified otherwise.
h2. Unit tests
Each XTS component has a set of unit tests. These tests need to be ran within an instance of JBoss AS. These tests are fully automated by an Ant script ran by Hudson.
h3. Improvements
*High Priority (EAP 6.0)*
1. *Ensure AS 7 compatibility.* See issue JBTM-900 (https://issues.jboss.org/browse/JBTM-900).
2. *Move into the AS test suite*. This will ensure that changes to components, we depend upon (like JbossWS), that break XTS are spotted at QE time rather than after release. (EAP 6 requirement). https://issues.jboss.org/browse/JBQA-5191 JBQA-5191
3. *Additional Testing*. XTS Demo tests https://issues.jboss.org/browse/JBQA-5194 JBQA-5194
*Medium Priority (Narayana 5, EAP 7)*
1. *Automate Emma and collate results*. Emma should be used to obtain coverage stats on the test run. Emma, produces individual reports per test, by default. It would be better to have these reports combined as we are concerned with the overall test coverage, rather than the coverage of each test. Ideally we would combine coverage stats over all sets of tests (unit, interop and recovery). Next step would be to improve the coverage where necessary. https://issues.jboss.org/browse/JBTM-952 JBTM-952
*Low Priority* *(**Narayana 5, EAP 7**)*
1. *Migrate to Maven*. For consistency with rest of the Narayna project. https://issues.jboss.org/browse/JBTM-945 JBTM-945
2. *Update to use Arquillian*. This would mean that that they can be ran from anywhere that can run JUnit tests, such as an IDE or maven. It would also automate the app server lifecycle and test deployment. https://issues.jboss.org/browse/JBTM-954 JBTM-954
3. *Remove home-brew SOAP stack*. In the past these tests used a mock/simple SOAP stack developed specifically for the tests. This stack is no longer used as the tests run within JBoss AS. This code is redundant and should be removed. https://issues.jboss.org/browse/JBTM-953 JBTM-953
h2. Interop Tests
We have two sets of interop tests that live in "XTS/interop". These are built with ant. They are each ran by deploying them as a war to a single JBoss instance which deploys the services needed by the test. This war also exposes a web interface that on request runs the tests and relays the results in the http response.
This process is automated by using ant to deploy the war and then making the http request and validating the response. See here in code for scripts: “XTS/localjunit/run-interop-tests.xml” and “XTS/localjunit/run-tests.xml”
h3. Improvements
*High Priority (EAP 6.0)*
1. *Ensure AS 7 compatibility.* See issue JBTM-905 (https://issues.jboss.org/browse/JBTM-905).
2. *Move into the AS test suite*. https://issues.jboss.org/browse/JBQA-5192 JBQA-5192
*Medium Priority (**Narayana 5, EAP 7**)*
1. *Automate Emma and collate results*. https://issues.jboss.org/browse/JBTM-952 JBTM-952
*Low Priority (**Narayana 5, EAP 7**)*
1. *Update to use Arquillian*. https://issues.jboss.org/browse/JBTM-955 JBTM-955 https://issues.jboss.org/browse/JBTM-956 JBTM-956
2. *Migrate to Maven*. https://issues.jboss.org/browse/JBTM-943 JBTM-943
h2. Recovery Tests
The recovery tests are the tricky ones. At the moment we have a set of test scenarios that run in a single JBoss server invoked by a remote client. There are also a set of Byteman scripts that trigger failure at certain points in a scenario. There are many different permutations of scenario and Byteman scripts that each create a particular test.
The test scenarios log their progress through the protocol and recovery. On completion of a test run, a human needs to look over the trace and check that it looks right. This process is hard to automate as the trace produced can have many valid interleavings. This is due to the asynchronous nature of the application.
These tests are automated with a bash script, but the output traces must be verified manually by a human. The other problem is that they currently run in a single JBoss server which simulates the situation where every party in the protocol is located in the same app server and crashes & recovers at the same time (not that realistic!). In order to test with multiple servers. we would need a way of combining the traces from each server when verifying the outcome of the test. This could be done by implementing a Byteman helper class, but it would not be trivial.
h3. Improvements
*High Priority (EAP 6.0)*
1. *Move into AS test suite*. The tests are unlikely to be accepted in their current form, due to the level of manual intervention required. This improvement can not be made until we have sufficiently automated the process.
2. *Ensure AS 7 compatibility.* JBTM-923 (https://issues.jboss.org/browse/JBTM-923)
3. *Automate running*. Use Arquillian to automate the tests and generate trace output for human verification. JBQA-3926 (https://issues.jboss.org/browse/JBQA-3926) JBTM-817 (https://issues.jboss.org/browse/JBTM-817)
4. *Run as part of CI.* https://issues.jboss.org/browse/JBTM-1029 JBTM-1029
*Medium priority (**Narayana 5, EAP 7**)*
1. *Automate Emma and collate results*. https://issues.jboss.org/browse/JBTM-952 JBTM-952
*Low Priority (**Narayana 5, EAP 7**)
*
1. *Migrate to Maven.* https://issues.jboss.org/browse/JBTM-944 JBTM-944*
*
2. *Automate verification*. Remove the human verification steps. https://issues.jboss.org/browse/JBTM-949 JBTM-949
3. *Multiple Server Tests*. If step 2) is successful, we could be able to build the more complex scenarios where each party runs in its own JBoss server. https://issues.jboss.org/browse/JBTM-950 JBTM-950
4. *Additional Tests*. Andrew Dinn has provided a set of additional tests for us to consider implementing. These should be considered alongside the Emma coverage data for future work. https://issues.jboss.org/browse/JBTM-951 JBTM-951
h2.
h2. Notes
* Arquillian supports multiple JBoss servers:* https://docs.jboss.org/author/display/ARQ/Multiple+Containers https://docs.jboss.org/author/display/ARQ/Multiple+Containers
* Arquillian doesn't yet support servers that crash. This feature is unlikely to make it into EAP 6.* https://issues.jboss.org/browse/ARQ-336 https://issues.jboss.org/browse/ARQ-336
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-17242]
Create a new document in JBoss Transactions Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 11 months
Re: [jboss-dev-forums] [JBoss AS 7 Development] - Data Source Configuration in AS 7
by Xi CHEN
Xi CHEN [https://community.jboss.org/people/seanchenxi] commented on the document
"Data Source Configuration in AS 7"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-16657#comment-8836
--------------------------------------------------
Hello,
I'm migrating a jboss 5 app to jboss 7.1. With this artical, I added correctly the datasource, But I can't find how to configure a "HA DataSource" to use multi databases. Could you help me ?
In Jboss 5, we set two url in <connection-url> to treate databse failover :
<datasources>
<local-tx-datasource>
<jndi-name>Database</jndi-name>
<use-java-context>false</use-java-context>
* <connection-url>*
*jdbc:sqlserver://<IP>:1433;databaseName=MyDB;|jdbc:sqlserver://<IP>:1433;databaseName=MyDB</connection-url>*
* <url-delimiter>|</url-delimiter>*
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<databaseName>MyDB</databaseName>
<user-name>USER_NAME</user-name>
<password>USER_PASSWORD</password>
<check-valid-connection-sql>select COUNT(*) from CLIENT
</check-valid-connection-sql>
</local-tx-datasource>
</datasources>
*But, how can we do the same thing in jboss 7.1 ?* I tried:
<datasource jndi-name="java:/CobraDatabase" pool-name="COBRAPool" enabled="true" use-java-context="true" use-ccm="false">
* <connection-url>jdbc:sqlserver://<IP>:1433;databaseName=MyDB;|jdbc:sqlserver://<IP>:1433;databaseName=MyDB</connection-url>*
* <url-delimiter>|</url-delimiter>*
<driver>
sqlserver
</driver>
<security>
<user-name>USER_NAME</user-name>
<password>USER_PASSWORD</password>
</security>
<validation>
<check-valid-connection-sql>
select COUNT(*) from CLIENT
</check-valid-connection-sql>
</validation>
</datasource>
<drivers>
<driver name="sqlserver" module="com.microsoft.sqlserver">
<xa-datasource-class>
com.microsoft.sqlserver.jdbc.SQLServerXADataSource
</xa-datasource-class>
</driver>
</drivers>
When I shutdown the first sql server, it can't create a new connection with the second url...
Thank you.
--------------------------------------------------
12 years, 11 months
[JBoss AS 7 Development] - AS7, EJB3, JSF, JPA2: LazyInitializationException
by jabu10245
jabu10245 [https://community.jboss.org/people/jabu10245] created the discussion
"AS7, EJB3, JSF, JPA2: LazyInitializationException"
To view the discussion, visit: https://community.jboss.org/message/648068#648068
--------------------------------------------------------------
Hello Forum,
I'm new to AS7 etc. and I'm trying to create a little EAR project in the Standalone environment.
Here's my project configuration (using Maven):
*myapp.ear:*
<ear>/META-INF/application.xml:
[...]
<module><ejb>myapp-ejb.jar</ejb></module>
<module><web><web-uri>myapp-jsf.war</web-uri></web></module>
<library-directory>lib</library-directory>
<ear>/lib/commons-lang.jar
<ear>/myapp-ejb.jar
<ear>/myapp-jsf.war
*myapp-ejb.jar:*
<jar>/META-INF/beans.xml => empty beans.xml
<jar>/META-INF/persistence.xml:
[...]
<persistence-unit name="primary">
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
</properties>
</persistence-unit>
and an EJB (for testing purpose as singleton):
@LocalBean
@Named("fooManager")
@Singleton @Startup
public class FooManagerBean implements FooManager {
private @PersistenceContext EntityManager entityManager;
public Foo getFoo(String name) { /* JPA lookup using entityManager */ }
}
The class Foo is just a mapped entity having Foos as children:
@Entity @Table(name = "foo")
public class Foo implements Serializable {
@Column(name = "name", nullable = false, unique = true, length = 64)
private String name;
@ManyToOne
private Foo parent; // nullable
@OneToMany(mappedBy = "parent")
private List<Foo> children;
// Getters and Setters, hashCode, equals, toString
}
*myapp-jsf.war:*
<war>/WEB-INF/beans.xml => empty beans.xml
<war>/WEB-INF/faces-config.xml => empty JSF 2.0 config xml
<war>foo.xhtml => displays all root foos with all their children => +*LazyInitializationException*+
@Named @RequestScoped
public class FooController implements Serializable {
[...]
}
The FooController uses the @EJB FooManager
to load all root Foo objects, the foo.xhtml should display them with
all their children. The root Foo objects are being loaded correctly, but when I try to access the
children a LazyInitializationException is being thrown, because I access them outside the transaction
scope of the Entity Manager from the FooManager.
My question is: Is there something like Spring's OpenEntityManagerInViewInterceptor?
I googled it and found some descriptions using Seam, but I have no experience with that. Is Seam
party of JBoss AS7? Or do I have to include it in my WAR as a dependency? What version should I
use? Or is there any simpler way solving my problem?
Thanks to anyone who can point me to a solution ;-)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/648068#648068]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 12 months