[jBPM Development] - Usage of ksession in Jbpm Spring Implementation
by Mohamed Abuthahir
Mohamed Abuthahir [https://community.jboss.org/people/abuinigate] created the discussion
"Usage of ksession in Jbpm Spring Implementation"
To view the discussion, visit: https://community.jboss.org/message/784268#784268
--------------------------------------------------------------
Hi,
I am developing a web application which I will invoke a jbpm workflow. I am following a *spring-jbpm* integeration pattern to create a *kbase,ksession* etc.My question is how we have to use the *ksession*? Means for each request I have to create a seperate session(every process instance has unique session id ) or multiple process instances sharing the same *ksession.*
Currently I am following a spring approach in which one session id shared between multiple process instances. How to change this behaviour to make it one session per process instance.Is there any way to do this in spring. I tried bean scope"prototype" which will not workout. and jbpm session tag not having the attribute scope.
My XML is:
<jbpm:kbase id="kbase">
<jbpm:resources>
<jbpm:resource type="BPMN2" source="classpath:Hello.bpmn" />
</jbpm:resources>
</jbpm:kbase>
<jbpm:ksession id="ksession" type="stateful" kbase="kbase">
<jbpm:configuration>
<jbpm:jpa-persistence>
<jbpm:entity-manager-factory ref="entityManagerFactory"/>
<jbpm:transaction-manager ref="transactionManager"/>
</jbpm:jpa-persistence>
</jbpm:configuration>
</jbpm:ksession>
<bean id="ds" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql://localhost:3306/jbpmworkflow?autoReconnect=true"/>
<property name="username" value="root"/>
<property name="password" value="root"/>
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
p:dataSource-ref="ds">
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="persistenceUnitName" value="org.jbpm.persistence.jpa" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="MYSQL"/>
<property name="showSql" value="true"/>
<property name="databasePlatform" value="org.hibernate.dialect.MySQL5Dialect" />
</bean>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" p:entityManagerFactory-ref="entityManagerFactory">
<property name="dataSource" ref="ds"/>
</bean>
Waiting eagerly for your replies.
--Abuthahir
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/784268#784268]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 10 months
[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. Check all issues resolved.
2. Create next point release version if not exists - this is so you can push issues in step 3 below.
3. Unresolved issues should be resolved or pushed.
h2. Check Hudson
Ensure no test failures in the group of hudson tests, for the branch you intend to release.
h2. Raise AS7 component upgrade request in Jira
Prepare for a PR to update AS7.
1. https://issues.jboss.org/browse/AS7 https://issues.jboss.org/browse/AS7
2. create a new 'component update' issue.1. Ensure the module is set to 'transactions'
2. select an appropriate 'fix for'.
3. Assign it to yourself.
h2. Do Release
h3. Git Branches (4.17 and 5 only)
Must be done first as the build-release-packages.xml relies on the tag being available
cd $NARAYAN_SRC/scripts
pre-release.sh <next version, e.g: 5.0.0.M3>
h3. Create the AS7 pull request branch and roll the jbosstm/jboss-as branch to next SNAPSHOT (UN-TESTED COMMANDS!!)
BRANCH=4_BRANCH
AS_BRANCH=master
JIRA=AS7-5815
CURRENT=4.17.2.Final
NEXT=4.17.3.Final
git clone git@github.com:jbosstm/jboss-as.git
cd jboss-asgit checkout $BRANCH
git remote add upstream git://github.com/jbossas/jboss-as.git
git pull --rebase --ff-only upstream $AS_BRANCH
sed -i "s/$CURRENT-SNAPSHOT/$CURRENT/g" pom.xml
git commit -am "Updated to $CURRENT"
# should use git merge-base $BRANCH upstream/master
git rebase -i HEAD~10
git checkout -b "${JIRA}_Upgrading_JBossTS_to_${CURRENT}"
git checkout $BRANCH
sed -i "s/$CURRENT/$NEXT-SNAPSHOT/g" pom.xml
git commit -am "Updated to $NEXT-SNAPSHOT"
git push origin ${JIRA}_Upgrading_JBossTS_to_${CURRENT}
git push origin $BRANCH
h2. Build and release
CURRENT=<Point version to release>
mkdir -p ~/narayana/filemgmt.jboss.org/
On Linux:
sshfs jbosstm(a)filemgmt.jboss.org (mailto:jbosstm@filemgmt.jboss.org): ~/narayana/filemgmt.jboss.org/
On MacOS:
sshfs -o defer_permissions jbosstm(a)filemgmt.jboss.org (mailto:jbosstm@filemgmt.jboss.org): ~/narayana/filemgmt.jboss.org/
git clone git(a)github.com (mailto:git@github.com):jbosstm/narayana.git
cd narayana
git checkout 4.17.$CURRENT.Final
On Linux:
ant -f build-release-pkgs.xml dist downloads docs magnolia -Drsync=false
On MacOS:
ant -f build-release-pkgs.xml dist downloads docs magnolia
h3. svn branches
#Make sure your checkout has no local changes
svn update
svn status
POINT_VERSION=5
NEXT_POINT_VERSION=6
#Update the version in text files
find . -name \*.java -o -name \*.xml -o -name \*.properties -o -name \*.ent -o -name \INSTALL -o -name \README | grep -v ".svn" | grep -v target | xargs grep -l "4[._]16" | xargs sed -i "s/4\([._]\)16\([._]\)${POINT_VERSION}\([._]\)Final-SNAPSHOT/4\116\2$POINT_VERSION\3Final/"
svn commit -m "Updated to version 4.16.$POINT_VERSION.Final"
#Tag the release:
svn cp https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_16 https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_16 https://svn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_16_4_Final/ https://svn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_16_${POINT_V... -m "4.16.$POINT_VERSION"
#Bump to next version using similar find to above
find . -name \*.java -o -name \*.xml -o -name \*.properties -o -name \*.ent -o -name \INSTALL -o -name \README | grep -v ".svn" | grep -v target | xargs grep -l "4[._]16" | xargs sed -i "s/4\([._]\)16\([._]\)${POINT_VERSION}\([._]\)Final/4\116\2${NEXT_POINT_VERSION}\3Final-SNAPSHOT/"
svn commit -m "Updated to version 4.16.${NEXT_POINT_VERSION}.Final-SNAPSHOT"
#Update the maven version of jbossts in our fork of JBossAS: https://github.com/jbosstm/jboss-as https://github.com/jbosstm/jboss-as
git checkout 4_16_BRANCH
git pull --rebase --ff-only
#Check no local changes
git status
sed -i "s/4.16.${POINT_VERSION}.Final-SNAPSHOT/4.16.${NEXT_POINT_VERSION}.Final-SNAPSHOT/g" pom.xml
git commit -am "Updated to 4.16.${NEXT_POINT_VERSION}.Final-SNAPSHOT"
git push
#Build and deploy the release to nexus staging:
mkdir ~/filemgmt.jboss.org/
sshfs -o defer_permissions mailto:jbosstm@filemgmt.jboss.org jbosstm(a)filemgmt.jboss.org: ~/filemgmt.jboss.org/
svn switch https://svn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_16_$ https://svn.jboss.org/repos/labs/labs/jbosstm/tags/JBOSSTS_4_16_${NEXT_PO...
ant -f build-release-pkgs.xml dist mvn-repository downloads magnolia
h3.
h2. Release the artifact through Nexus
1. https://repository.jboss.org/nexus/index.html#welcome https://repository.jboss.org/nexus/index.html#welcome
2. login
3. "Staging Repositories"
4. Click tickbox for your repo
5. Click "Close"
6. Don't worry about a description, just click "Close"
7. Click tickbox after it is closed
8. Click "Release"
9. Again a description doesn't matter
h2. Push Upstream
Check that the pull request will work. *If it doesn't and it requires Narayana changes you *have* to rev the version number - DON'T attempt to re-release with the same version number:*
JIRA=AS7-5815
CURRENT=4.17.2.Final
git clone mailto:git@github.com git@github.com:jbosstm/jboss-as.git
cd jboss-as
git checkout "${JIRA}_Upgrading_JBossTS_to_${CURRENT}"
rm -rf ~/.m2/repository/org/jboss/jbossts
rm -rf ~/.m2/repository/org/jboss/narayana
./build.sh clean install
1. Raise the pull request using our branch
2. Once merged, resolve the AS7 Jira issue.
h2. JIRA Release
1. Close all issues for the release
2. Mark as released (Need admin permissions)
h2. Update Website
Update the Narayana community site:
* Login to Magnolia* https://www.jboss.org/author/.magnolia/pages/adminCentral.html https://www.jboss.org/author/.magnolia/pages/adminCentral.html
* Login with credentials: Tom and Paul know these, ask them.
* Documentation* Browse to 'jbosstm/documentation'
* right click on 'downloads' and select 'import'
* browse to the location of the 'website.jbosstm.documentation.4.16.5.Final.xml' file
* Right click on the new file and click 'move'
* Drag the file to the top of the documentation list.
* Right click on the new page and select 'open page...'
* Check that the page looks right and that the download links work
* Right click on the new page and select 'activate'
* You now need to wait for the page to be moderated before it will appear.
* Downloads* Browse to 'jbosstm/downloads'
* right click on 'downloads' and select 'import'
* browse to the location of the 'website.jbosstm.downloads.4.16.5.Final.xml' file
* Right click on the new file and click 'move'
* Drag the file to the top of the downloads list.
* Right click on the new page and select 'open page...'
* Check that the page looks right and that the download links work
* Right click on the new page and select 'activate'
* You now need to wait for the page to be moderated before it will appear.
* Announcement* Right click on 'jbosstm' and select 'open page...'
* Click edit on the 'announcement' pane
* Update the announcement for this release.
* Right click on 'jbosstm' and select 'activate changes'
* You now need to wait for the page to be moderated before it will appear.
* Release notes* Right click on 'jbosstm' and select 'open page...'
* Click edit on the 'getting started' pane on the right-hand-side
* Edit the release notes url to point to the release notes for this version
* Click save
* Right click on 'jbosstm' and select 'activate changes'
* You now need to wait for the page to be moderated before it will appear.
h2. Promote
NOTE: It is worth waiting for the merge of the pull request before advertising, or at least wait for the merge build notification first ;)
Promote the release through the following channels:
1. Email jbossts-announce(a)lists.jboss.org (mailto:jbossts-announce@lists.jboss.org)
2. Forum
3. Blog: project in (jbtm, blacktie) AND fixversion = "5.0.0.M2" AND priority >= major AND issuetype not in (Bug, task) AND resolution not in ("Duplicate Issue", Rejected, "Won't Fix", "Out of Date", "Cannot Reproduce Bug")
--------------------------------------------------------------
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...]
11 years, 10 months