You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by "Igor I. Nuzhnov" <ig...@malva.ua> on 2003/12/08 15:06:11 UTC
JBoss help
Hello, all
I try to configure Slide from CVS HEAD for work with JBoss 3.2.3
I want to use new J2EEStore, but get many transaction errors, such as
15:55:36,750 INFO [STDOUT] 08 Dec 2003 15:55:36 -
org.apache.slide.common.Namespace - INFO - Loading namespace slide base data
15:55:36,843 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl
[FormatId=257, GlobalId=dwarf//61, BranchQual=] errorCode=XA_HEURCOM
javax.transaction.xa.XAException
at
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.rollback(AbstractRDBMSS
tore.java:396)
at
org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:458)
at org.jboss.tm.TxManager.rollback(TxManager.java:264)
at
org.apache.slide.common.Namespace.loadBaseData(Namespace.java:802)
at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
at org.apache.slide.common.Domain.init(Domain.java:476)
at org.apache.slide.common.Domain.init(Domain.java:410)
at org.apache.slide.common.Domain.init(Domain.java:373)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
...
...
15:55:38,828 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl
[FormatId=257, GlobalId=dwarf//65, BranchQual=] errorCode=XA_RBCOMMFAIL
javax.transaction.xa.XAException
at
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.commit(AbstractRDBMSSto
re.java:354)
at
org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
at org.jboss.tm.TxManager.commit(TxManager.java:141)
at
org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessToken
Impl.java:452)
at
org.apache.slide.common.Namespace.loadBaseData(Namespace.java:825)
at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
at org.apache.slide.common.Domain.init(Domain.java:476)
at org.apache.slide.common.Domain.init(Domain.java:410)
at org.apache.slide.common.Domain.init(Domain.java:373)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
Here is my configuration:
[web.xml]
...
<resource-ref>
<res-ref-name>jdbc/HRMDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>TransactionManager</res-ref-name>
<res-type>javax.transaction.TransactionManager</res-type>
<res-auth>Container</res-auth>
</resource-ref>
...
[jboss-web.xml]
...
<resource-ref>
<res-ref-name>jdbc/HRMDS</res-ref-name>
<jndi-name>java:/XAHRMDS</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>TransactionManager</res-ref-name>
<jndi-name>java:/TransactionManager</jndi-name>
</resource-ref>
...
[Domain.xml]
...
<definition>
<transaction-manager
type="jndi">TransactionManager</transaction-manager>
<store name="j2ee"
classname="org.apache.slide.store.ExtendedStore">
<nodestore
classname="org.apache.slide.store.impl.rdbms.J2EEStore">
<parameter name="datasource">jdbc/HRMDS</parameter>
<parameter
name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter</para
meter>
</nodestore>
<securitystore>
<reference store="nodestore"/>
</securitystore>
<lockstore>
<reference store="nodestore"/>
</lockstore>
<revisiondescriptorsstore>
<reference store="nodestore"/>
</revisiondescriptorsstore>
<revisiondescriptorstore>
<reference store="nodestore"/>
</revisiondescriptorstore>
<contentstore>
<reference store="nodestore"/>
</contentstore>
</store>
<scope match="/" store="j2ee"/>
</definition>
...
[hrm-ds.xml]
...
<xa-datasource>
<jndi-name>XAHRMDS</jndi-name>
<track-connection-by-tx>true</track-connection-by-tx>
<xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-d
atasource-class>
<xa-datasource-property name="ServerName">gnome</xa-datasource-property>
<xa-datasource-property name="PortNumber">1433</xa-datasource-property>
<xa-datasource-property name="DatabaseName">hrm</xa-datasource-property>
<xa-datasource-property
name="SelectMethod">cursor</xa-datasource-property>
<xa-datasource-property
name="SendStringParametersAsUnicode">true</xa-datasource-property>
<user-name>sa</user-name>
<password></password>
<min-pool-size>10</min-pool-size>
<max-pool-size>50</max-pool-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
</xa-datasource>
...
Please, help me
By
Igor Nuzhnov, igor@malva.ua
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: SlideApi: specify a major AutoVersion
Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
I don't think this is possible. And it's not mentioned in the WebDAV
specification.
Compare this to the behavior of CVS: If you want to specify a
particular version number for your program (which might be quite
different from the CVS version number) you assign a tag. Similarly you
could use the WebDAV LABEL method to assign one or more names to a
particular version.
Regards,
Ingo
> Hello,
>
> I am using the SlideApi to check-in files. I specified the automatic
> versioning in the Domain.xml.
> It works without problem. But how can I specify that I want to check-in
> a major version using the SlideApi.?
> For example, I have a version 1.7 of a file, I check-in a new file and
> instead of having version 1.8, I would like to have a version 2.0.
>
> Thanks in advance for your help.
>
> De
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
SlideApi: specify a major AutoVersion
Posted by De <de...@alineo.com>.
Hello,
I am using the SlideApi to check-in files. I specified the automatic
versioning in the Domain.xml.
It works without problem. But how can I specify that I want to check-in
a major version using the SlideApi.?
For example, I have a version 1.7 of a file, I check-in a new file and
instead of having version 1.8, I would like to have a version 2.0.
Thanks in advance for your help.
De
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: JBoss help
Posted by "Igor I. Nuzhnov" <ig...@malva.ua>.
Hello, Oliver
----- Original Message -----
From: "Oliver Zeigermann" <ol...@zeigermann.de>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, December 12, 2003 12:02 PM
Subject: Re: JBoss help
...
> Hmmmm. The folder name must be unique at any price. I really see no
> alternative to Xid... What do you mean by UID?
I mean 128 bit generated value by IP address, JVM, system time and counter -
its unique
And as above mentioned, xid may contain many various invalid chars, so it's
very dangerous to make file names by xid
and after replacing of invalid chars xid may lose its uniqueness
...
By
Igor
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: JBoss help
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Hi Igor!
Igor I. Nuzhnov wrote:
> I successfully tried your patch and its works
That makes me happy :) I will try it with the other stores and if it
works with them I will check it in...
> But, other transaction managers can use other invalid characters in
> transaction id, so your replace code then fails
That's possible :( I will have fix those characters incementally after
problems are reported. At least I see no other option :(
> As I understand, you scan work/content folder for subfolders and then
> process transaction log in subfolders. And you anyway store xid in that log.
Correct.
> Maybe folder name must be UID, not translated xid
Hmmmm. The folder name must be unique at any price. I really see no
alternative to Xid... What do you mean by UID?
Anyway, thanks for helping me and glad I could help you :) :) :)
Oliver
> Thanks, by
>
> Igor
>
> ----- Original Message -----
> From: "Oliver Zeigermann" <ol...@zeigermann.de>
> To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
> Sent: Tuesday, December 09, 2003 5:27 PM
> Subject: Re: JBoss help
>
>
>
>>Igor I. Nuzhnov wrote:
>>
>>
>>>Thank you for the help, Oliver
>>>After your patch, all works just fine
>>>Can you, please, make usage of commit and rollback in AbstractRDBMSStore
>>>configurable (Domain.xml)
>>
>>Did not see your post before my previous one, where I proposed to do
>>exactly that :) So it will be one of the next things I will do :)
>>
>>
>>>And another question
>>>When I use new TxFileStore on slide start I get exception
>>>...
>>>08:13:58,078 INFO [STDOUT] 09 Dec 2003 08:13:58 -
>>>org.apache.slide.common.Namespace - INFO - Content store:
>>>org.apache.slide.store.txfile.TxFileContentStore
>>>08:13:58,125 INFO [STDOUT] 09 Dec 2003 08:13:58 -
>>>org.apache.slide.store.txfile.AbstractTxFileStoreService - INFO - File
>
> Store
>
>>>configured to store/content, working directory work/content
>>>...
>>>08:13:58,203 INFO [STDOUT] 09 Dec 2003 08:13:58 -
>>>org.apache.slide.store.txfile.rm.impl.FileResourceManager - INFO -
>
> Starting
>
>>>RM at 'store/content' / 'work/content'
>>>08:13:58,203 INFO [STDOUT] 09 Dec 2003 08:13:58 -
>>>org.apache.slide.store.txfile.rm.impl.FileResourceManager - INFO -
>>>Recovering dwarf
>>>08:13:58,218 INFO [STDOUT] 09 Dec 2003 08:13:58 -
>>>org.apache.slide.store.txfile.rm.impl.FileResourceManager - EMERGENCY -
>>>Recovering status information from 'work/content/dwarf/transaction.log'
>>>faile
>>>d! Could not find file
>>>08:13:58,218 INFO [STDOUT] 09 Dec 2003 08:13:58 -
>>>org.apache.slide.store.txfile.rm.impl.FileResourceManager - EMERGENCY -
>>>java.io.FileNotFoundException: work\content\dwarf\transaction.log
>>>08:13:58,218 ERROR [STDERR] java.io.FileNotFoundException:
>>>work\content\dwarf\transaction.log
>>>08:13:58,218 ERROR [STDERR] at java.io.FileInputStream.open(Native
>>>Method)
>>>08:13:58,218 ERROR [STDERR] at
>>>java.io.FileInputStream.<init>(FileInputStream.java:106)
>>>08:13:58,218 ERROR [STDERR] at
>>>
>
> org.apache.slide.store.txfile.rm.impl.FileResourceManager$TransactionContext
>
>>>.recoverState(FileResourceManager.java:1517)
>>>08:13:58,218 ERROR [STDERR] at
>>>
>
> org.apache.slide.store.txfile.rm.impl.FileResourceManager.recoverContexts(Fi
>
>>>leResourceManager.java:1243)
>>>08:13:58,218 ERROR [STDERR] at
>>>
>
> org.apache.slide.store.txfile.rm.impl.FileResourceManager.recover(FileResour
>
>>>ceManager.java:480)
>>>08:13:58,218 ERROR [STDERR] at
>>>
>
> org.apache.slide.store.txfile.rm.impl.FileResourceManager.start(FileResource
>
>>>Manager.java:433)
>>>08:13:58,281 ERROR [STDERR] at
>>>
>
> org.apache.slide.store.txfile.AbstractTxFileStoreService.connect(AbstractTxF
>
>>>ileStoreService.java:160)
>>>08:13:58,281 ERROR [STDERR] at
>>>
>
> org.apache.slide.common.AbstractServiceBase.connect(AbstractServiceBase.java
>
>>>:162)
>>>08:13:58,281 ERROR [STDERR] at
>>>org.apache.slide.store.AbstractStore.connect(AbstractStore.java:227)
>>>08:13:58,281 ERROR [STDERR] at
>>>
>
> org.apache.slide.common.AbstractServiceBase.connectIfNeeded(AbstractServiceB
>
>>>ase.java:234)
>>>08:13:58,281 ERROR [STDERR] at
>>>org.apache.slide.common.Namespace.connectService(Namespace.java:534)
>>>08:13:58,328 ERROR [STDERR] at
>>>org.apache.slide.common.Namespace.retrieveStore(Namespace.java:633)
>>>08:13:58,328 ERROR [STDERR] at
>>>org.apache.slide.common.Uri.parseUri(Uri.java:379)
>>>08:13:58,328 ERROR [STDERR] at
>>>org.apache.slide.common.Uri.<init>(Uri.java:106)
>>>08:13:58,328 ERROR [STDERR] at
>>>org.apache.slide.common.Namespace.getUri(Namespace.java:681)
>>>08:13:58,328 ERROR [STDERR] at
>>>org.apache.slide.common.Namespace.getUri(Namespace.java:661)
>>>...
>>>
>>>As I understand, slide can't set correct txId:
>>> public synchronized void recoverState() throws
>>>ResourceManagerException {
>>> String statePath = workDir + "/" + txId + "/" +
>
> CONTEXT_FILE;
>
>>>'work\content\dwarf\transaction.log'
>>>
>>>but transaction log in 'work\content\dwarf\65\transaction.log'
>>
>>Thanks for that hint, you are actually helping me more than I help you :)
>>
>>Let me explain what I suspect: Upon startup the tx file store checks for
>>transactions that have not been completed correctly. It does so by
>>examining the directories under its working directory, in your case
>>"work/content/". There it finds the directory dwarf and assumes this is
>>the identifier for a transaction and tries to look up transaction.log
>>inside of it: "work/content/dwarf/transaction.log". As indicated by the
>>other thread dump you sent ([FormatId=257, GlobalId=dwarf//61,
>>BranchQual=]) JBoss' TM has a / in the toString output for the Xid which
>>messes up the path to the filesystem. As a workaround I would propose to
>>replace all '/' and '\' with a less offensive character in the
>>XidWrapper which already is used inside the tx file store. I will attach
>>a patch for it that is to be applied to org.apache.slide.util.XidWrapper
>>
>>Again, this may be nonsense as I just guess. But still, what you give it
>>a try, please?
>>
>>Thanks,
>>
>>Oliver
>>
>>
>>>Thanks
>>>
>>>Igor
>>>
>>>----- Original Message -----
>>>From: "Oliver Zeigermann" <ol...@zeigermann.de>
>>>To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
>>>Sent: Monday, December 08, 2003 10:02 PM
>>>Subject: Re: JBoss help
>>>
>>>
>>>
>>>
>>>>Hi Igor,
>>>>
>>>>I suppose you use the patch provided by Grant that allows for external
>>>>TMs, right? I have never tried it and did not check with JBoss as well,
>>>>so I can only guess. When I was merging the stores I was really
>>>>wondering if a commit on the XAResource should also commit the
>>>>transaction as one implementation did and another did not. If I remember
>>>>correctly the implementation that was in
>>>>org.apache.slide.store.impl.rdbms before did not, but now does. Did you
>>>>use this implementation before? Slide's TM does not commit the
>>>>transaction, except over the XAResource, I guess JBoss is closer to the
>>>>specification and actually does as it has a full transactional resource
>>>>including the connection and the XAResource. Can any expert please check
>>>>if I am correct here? At least the exceptions you present here perfectly
>>>>match what I suspect...
>>>>
>>>>For now simply try to comment out the rollbacks and commit on the
>>>>connection and see if it works. I suppose you know how to do this, if
>>>>not use the attached patch. Please report back success or failure.
>>>>
>>>>Thanks,
>>>>
>>>>Oliver
>>>>
>>>>
>>>>Igor I. Nuzhnov wrote:
>>>>
>>>>
>>>>>Hello, all
>>>>>I try to configure Slide from CVS HEAD for work with JBoss 3.2.3
>>>>>I want to use new J2EEStore, but get many transaction errors, such as
>>>>>
>>>>>15:55:36,750 INFO [STDOUT] 08 Dec 2003 15:55:36 -
>>>>>org.apache.slide.common.Namespace - INFO - Loading namespace slide base
>>>
>>>data
>>>
>>>
>>>>>15:55:36,843 WARN [TransactionImpl] XAException:
>>>
>>>tx=TransactionImpl:XidImpl
>>>
>>>
>>>>>[FormatId=257, GlobalId=dwarf//61, BranchQual=] errorCode=XA_HEURCOM
>>>>>javax.transaction.xa.XAException
>>>>> at
>>>>>
>>>
>>>
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.rollback(AbstractRDBMSS
>
>>>>>tore.java:396)
>>>>> at
>>>>>
>>>
>>>
> org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
>
>>>>> at
>>>
>>>org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:458)
>>>
>>>
>>>>> at org.jboss.tm.TxManager.rollback(TxManager.java:264)
>>>>> at
>>>>>org.apache.slide.common.Namespace.loadBaseData(Namespace.java:802)
>>>>> at
>
> org.apache.slide.common.Domain.initNamespace(Domain.java:857)
>
>>>>> at org.apache.slide.common.Domain.init(Domain.java:476)
>>>>> at org.apache.slide.common.Domain.init(Domain.java:410)
>>>>> at org.apache.slide.common.Domain.init(Domain.java:373)
>>>>> at
>>>>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
>>>>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>>>>> at
>>>>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
>>>>>...
>>>>>...
>>>>>15:55:38,828 WARN [TransactionImpl] XAException:
>>>
>>>tx=TransactionImpl:XidImpl
>>>
>>>
>>>>>[FormatId=257, GlobalId=dwarf//65, BranchQual=] errorCode=XA_RBCOMMFAIL
>>>>>javax.transaction.xa.XAException
>>>>> at
>>>>>
>>>
>>>
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.commit(AbstractRDBMSSto
>
>>>>>re.java:354)
>>>>> at
>>>>>org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
>>>>> at
>
> org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
>
>>>>> at org.jboss.tm.TxManager.commit(TxManager.java:141)
>>>>> at
>>>>>
>>>
>>>
> org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessToken
>
>>>>>Impl.java:452)
>>>>> at
>>>>>org.apache.slide.common.Namespace.loadBaseData(Namespace.java:825)
>>>>> at
>
> org.apache.slide.common.Domain.initNamespace(Domain.java:857)
>
>>>>> at org.apache.slide.common.Domain.init(Domain.java:476)
>>>>> at org.apache.slide.common.Domain.init(Domain.java:410)
>>>>> at org.apache.slide.common.Domain.init(Domain.java:373)
>>>>> at
>>>>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
>>>>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>>>>> at
>>>>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
>>>>> at
>>>>>
>>>
>>>
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
>
>>>>>5)
>>>>>
>>>>>
>>>>>Here is my configuration:
>>>>>
>>>>>[web.xml]
>>>>>...
>>>>><resource-ref>
>>>>> <res-ref-name>jdbc/HRMDS</res-ref-name>
>>>>> <res-type>javax.sql.DataSource</res-type>
>>>>> <res-auth>Container</res-auth>
>>>>></resource-ref>
>>>>><resource-ref>
>>>>> <res-ref-name>TransactionManager</res-ref-name>
>>>>> <res-type>javax.transaction.TransactionManager</res-type>
>>>>> <res-auth>Container</res-auth>
>>>>></resource-ref>
>>>>>...
>>>>>
>>>>>[jboss-web.xml]
>>>>>...
>>>>> <resource-ref>
>>>>> <res-ref-name>jdbc/HRMDS</res-ref-name>
>>>>> <jndi-name>java:/XAHRMDS</jndi-name>
>>>>> </resource-ref>
>>>>> <resource-ref>
>>>>> <res-ref-name>TransactionManager</res-ref-name>
>>>>> <jndi-name>java:/TransactionManager</jndi-name>
>>>>> </resource-ref>
>>>>>...
>>>>>
>>>>>[Domain.xml]
>>>>>...
>>>>> <definition>
>>>>> <transaction-manager
>>>>>type="jndi">TransactionManager</transaction-manager>
>>>>> <store name="j2ee"
>>>>>classname="org.apache.slide.store.ExtendedStore">
>>>>> <nodestore
>>>>>classname="org.apache.slide.store.impl.rdbms.J2EEStore">
>>>>> <parameter name="datasource">jdbc/HRMDS</parameter>
>>>>> <parameter
>>>>>
>>>
>>>
> name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter</para
>
>>>>>meter>
>>>>> </nodestore>
>>>>> <securitystore>
>>>>> <reference store="nodestore"/>
>>>>> </securitystore>
>>>>> <lockstore>
>>>>> <reference store="nodestore"/>
>>>>> </lockstore>
>>>>> <revisiondescriptorsstore>
>>>>> <reference store="nodestore"/>
>>>>> </revisiondescriptorsstore>
>>>>> <revisiondescriptorstore>
>>>>> <reference store="nodestore"/>
>>>>> </revisiondescriptorstore>
>>>>> <contentstore>
>>>>> <reference store="nodestore"/>
>>>>> </contentstore>
>>>>> </store>
>>>>> <scope match="/" store="j2ee"/>
>>>>> </definition>
>>>>>...
>>>>>
>>>>>[hrm-ds.xml]
>>>>>...
>>>>> <xa-datasource>
>>>>> <jndi-name>XAHRMDS</jndi-name>
>>>>> <track-connection-by-tx>true</track-connection-by-tx>
>>>>>
>>>>>
> <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-d
>
>>>>>atasource-class>
>>>>> <xa-datasource-property
>>>
>>>name="ServerName">gnome</xa-datasource-property>
>>>
>>>>> <xa-datasource-property
>>>
>>>name="PortNumber">1433</xa-datasource-property>
>>>
>>>>> <xa-datasource-property
>>>
>>>name="DatabaseName">hrm</xa-datasource-property>
>>>
>>>>> <xa-datasource-property
>>>>>name="SelectMethod">cursor</xa-datasource-property>
>>>>> <xa-datasource-property
>>>>>name="SendStringParametersAsUnicode">true</xa-datasource-property>
>>>>> <user-name>sa</user-name>
>>>>> <password></password>
>>>>> <min-pool-size>10</min-pool-size>
>>>>> <max-pool-size>50</max-pool-size>
>>>>> <blocking-timeout-millis>5000</blocking-timeout-millis>
>>>>> <idle-timeout-minutes>15</idle-timeout-minutes>
>>>>> </xa-datasource>
>>>>>...
>>>>>
>>>>>Please, help me
>>>>>
>>>>>By
>>>>>
>>>>>Igor Nuzhnov, igor@malva.ua
>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>--------------------------------------------------------------------------
>
> --
>
>>>----
>>>
>>>
>>>
>>>
>>>>Index: AbstractRDBMSStore.java
>>>>===================================================================
>>>>RCS file:
>>>
>>>
> /home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/Abstrac
>
>>>tRDBMSStore.java,v
>>>
>>>
>>>>retrieving revision 1.1
>>>>diff -u -r1.1 AbstractRDBMSStore.java
>>>>--- AbstractRDBMSStore.java 3 Dec 2003 12:00:46 -0000 1.1
>>>>+++ AbstractRDBMSStore.java 8 Dec 2003 20:00:54 -0000
>>>>@@ -344,9 +344,9 @@
>>>> try {
>>>> if (id.rollbackOnly) {
>>>>
>>>>- conn.rollback();
>>>>+// conn.rollback();
>>>> } else {
>>>>- conn.commit();
>>>>+// conn.commit();
>>>> }
>>>> activeTransactionContext.set(null);
>>>>
>>>>@@ -389,12 +389,12 @@
>>>> throw new XAException(XAException.XAER_NOTA);
>>>> }
>>>>
>>>>- try {
>>>>- conn.rollback();
>>>>+// try {
>>>>+// conn.rollback();
>>>> activeTransactionContext.set(null);
>>>>- } catch (SQLException e) {
>>>>- throw new XAException(XAException.XA_HEURCOM);
>>>>- } finally {
>>>>+// } catch (SQLException e) {
>>>>+// throw new XAException(XAException.XA_HEURCOM);
>>>>+// } finally {
>>>> try {
>>>> conn.close();
>>>> /* We must always return connections to the pool,
>>>>@@ -402,7 +402,7 @@
>>>> } catch (SQLException e) {
>>>> getLogger().log(e, LOG_CHANNEL, Logger.ERROR);
>>>> }
>>>>- }
>>>>+// }
>>>> }
>>>>
>>>> /**
>>>>
>>>>
>>>
>>>
>>>
>>--------------------------------------------------------------------------
>
> --
>
>>>----
>>>
>>>
>>>
>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>
>
> ----------------------------------------------------------------------------
> ----
>
>
>
>>Index: XidWrapper.java
>>===================================================================
>>RCS file:
>
> /home/cvs/jakarta-slide/src/share/org/apache/slide/util/XidWrapper.java,v
>
>>retrieving revision 1.2
>>diff -u -r1.2 XidWrapper.java
>>--- XidWrapper.java 21 Nov 2003 11:50:13 -0000 1.2
>>+++ XidWrapper.java 9 Dec 2003 15:24:05 -0000
>>@@ -13,7 +13,7 @@
>> *
>> */
>> public class XidWrapper implements Xid {
>>-
>>+
>> public static final Xid wrap(Xid xid) {
>> return wrap(xid, false); // for Slide branch qualifier must not
>
> be included in onePhase commit
>
>> }
>>@@ -29,11 +29,17 @@
>> private XidWrapper(Xid xid, boolean includeBranch) {
>> this.xid = xid;
>> // do calculations once for performance
>>- asString =
>>+ String tmpString =
>> new String(xid.getGlobalTransactionId())
>> + (includeBranch ? "-" + new
>
> String(xid.getBranchQualifier()) : "");
>
>>- hashCode = asString.hashCode();
>>
>>+ // XXX for tx file store replace :, \ and / which might be part
>
> of the identifier with chars not
>
>>+ // offensive to any file system specific chars
>>+ tmpString = tmpString.replace(':', '.');
>>+ tmpString = tmpString.replace('/', '-');
>>+ asString = tmpString.replace('\\', '_');
>>+
>>+ hashCode = asString.hashCode();
>> }
>>
>> public Xid getXid() {
>>@@ -53,22 +59,22 @@
>> }
>>
>> public boolean equals(Object o) {
>>- return (o != null && asString.equals(o.toString()));
>>- /*
>>- if (this == o) {
>>- return true;
>>- }
>>-
>>- if (o != null && o instanceof Xid) {
>>- Xid xid2 = (Xid) o;
>>- // we do not need equality of format Id
>>- return (
>>- Arrays.equals(xid.getGlobalTransactionId(),
>
> xid2.getGlobalTransactionId())
>
>>- && Arrays.equals(xid.getBranchQualifier(),
>
> xid2.getBranchQualifier()));
>
>>- }
>>-
>>- return false;
>>- */
>>+ return (o != null && asString.equals(o.toString()));
>>+ /*
>>+ if (this == o) {
>>+ return true;
>>+ }
>>+
>>+ if (o != null && o instanceof Xid) {
>>+ Xid xid2 = (Xid) o;
>>+ // we do not need equality of format Id
>>+ return (
>>+ Arrays.equals(xid.getGlobalTransactionId(),
>
> xid2.getGlobalTransactionId())
>
>>+ && Arrays.equals(xid.getBranchQualifier(),
>
> xid2.getBranchQualifier()));
>
>>+ }
>>+
>>+ return false;
>>+ */
>> }
>>
>> public String toString() {
>>
>>
>
>
>
> ----------------------------------------------------------------------------
> ----
>
>
>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: JBoss help
Posted by "Igor I. Nuzhnov" <ig...@malva.ua>.
Hello Oliver, sorry for late answer
I successfully tried your patch and its works
But, other transaction managers can use other invalid characters in
transaction id, so your replace code then fails
As I understand, you scan work/content folder for subfolders and then
process transaction log in subfolders. And you anyway store xid in that log.
Maybe folder name must be UID, not translated xid
Thanks, by
Igor
----- Original Message -----
From: "Oliver Zeigermann" <ol...@zeigermann.de>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Tuesday, December 09, 2003 5:27 PM
Subject: Re: JBoss help
> Igor I. Nuzhnov wrote:
>
> > Thank you for the help, Oliver
> > After your patch, all works just fine
> > Can you, please, make usage of commit and rollback in AbstractRDBMSStore
> > configurable (Domain.xml)
>
> Did not see your post before my previous one, where I proposed to do
> exactly that :) So it will be one of the next things I will do :)
>
> > And another question
> > When I use new TxFileStore on slide start I get exception
> > ...
> > 08:13:58,078 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> > org.apache.slide.common.Namespace - INFO - Content store:
> > org.apache.slide.store.txfile.TxFileContentStore
> > 08:13:58,125 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> > org.apache.slide.store.txfile.AbstractTxFileStoreService - INFO - File
Store
> > configured to store/content, working directory work/content
> > ...
> > 08:13:58,203 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> > org.apache.slide.store.txfile.rm.impl.FileResourceManager - INFO -
Starting
> > RM at 'store/content' / 'work/content'
> > 08:13:58,203 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> > org.apache.slide.store.txfile.rm.impl.FileResourceManager - INFO -
> > Recovering dwarf
> > 08:13:58,218 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> > org.apache.slide.store.txfile.rm.impl.FileResourceManager - EMERGENCY -
> > Recovering status information from 'work/content/dwarf/transaction.log'
> > faile
> > d! Could not find file
> > 08:13:58,218 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> > org.apache.slide.store.txfile.rm.impl.FileResourceManager - EMERGENCY -
> > java.io.FileNotFoundException: work\content\dwarf\transaction.log
> > 08:13:58,218 ERROR [STDERR] java.io.FileNotFoundException:
> > work\content\dwarf\transaction.log
> > 08:13:58,218 ERROR [STDERR] at java.io.FileInputStream.open(Native
> > Method)
> > 08:13:58,218 ERROR [STDERR] at
> > java.io.FileInputStream.<init>(FileInputStream.java:106)
> > 08:13:58,218 ERROR [STDERR] at
> >
org.apache.slide.store.txfile.rm.impl.FileResourceManager$TransactionContext
> > .recoverState(FileResourceManager.java:1517)
> > 08:13:58,218 ERROR [STDERR] at
> >
org.apache.slide.store.txfile.rm.impl.FileResourceManager.recoverContexts(Fi
> > leResourceManager.java:1243)
> > 08:13:58,218 ERROR [STDERR] at
> >
org.apache.slide.store.txfile.rm.impl.FileResourceManager.recover(FileResour
> > ceManager.java:480)
> > 08:13:58,218 ERROR [STDERR] at
> >
org.apache.slide.store.txfile.rm.impl.FileResourceManager.start(FileResource
> > Manager.java:433)
> > 08:13:58,281 ERROR [STDERR] at
> >
org.apache.slide.store.txfile.AbstractTxFileStoreService.connect(AbstractTxF
> > ileStoreService.java:160)
> > 08:13:58,281 ERROR [STDERR] at
> >
org.apache.slide.common.AbstractServiceBase.connect(AbstractServiceBase.java
> > :162)
> > 08:13:58,281 ERROR [STDERR] at
> > org.apache.slide.store.AbstractStore.connect(AbstractStore.java:227)
> > 08:13:58,281 ERROR [STDERR] at
> >
org.apache.slide.common.AbstractServiceBase.connectIfNeeded(AbstractServiceB
> > ase.java:234)
> > 08:13:58,281 ERROR [STDERR] at
> > org.apache.slide.common.Namespace.connectService(Namespace.java:534)
> > 08:13:58,328 ERROR [STDERR] at
> > org.apache.slide.common.Namespace.retrieveStore(Namespace.java:633)
> > 08:13:58,328 ERROR [STDERR] at
> > org.apache.slide.common.Uri.parseUri(Uri.java:379)
> > 08:13:58,328 ERROR [STDERR] at
> > org.apache.slide.common.Uri.<init>(Uri.java:106)
> > 08:13:58,328 ERROR [STDERR] at
> > org.apache.slide.common.Namespace.getUri(Namespace.java:681)
> > 08:13:58,328 ERROR [STDERR] at
> > org.apache.slide.common.Namespace.getUri(Namespace.java:661)
> > ...
> >
> > As I understand, slide can't set correct txId:
> > public synchronized void recoverState() throws
> > ResourceManagerException {
> > String statePath = workDir + "/" + txId + "/" +
CONTEXT_FILE;
> > 'work\content\dwarf\transaction.log'
> >
> > but transaction log in 'work\content\dwarf\65\transaction.log'
>
> Thanks for that hint, you are actually helping me more than I help you :)
>
> Let me explain what I suspect: Upon startup the tx file store checks for
> transactions that have not been completed correctly. It does so by
> examining the directories under its working directory, in your case
> "work/content/". There it finds the directory dwarf and assumes this is
> the identifier for a transaction and tries to look up transaction.log
> inside of it: "work/content/dwarf/transaction.log". As indicated by the
> other thread dump you sent ([FormatId=257, GlobalId=dwarf//61,
> BranchQual=]) JBoss' TM has a / in the toString output for the Xid which
> messes up the path to the filesystem. As a workaround I would propose to
> replace all '/' and '\' with a less offensive character in the
> XidWrapper which already is used inside the tx file store. I will attach
> a patch for it that is to be applied to org.apache.slide.util.XidWrapper
>
> Again, this may be nonsense as I just guess. But still, what you give it
> a try, please?
>
> Thanks,
>
> Oliver
>
> > Thanks
> >
> > Igor
> >
> > ----- Original Message -----
> > From: "Oliver Zeigermann" <ol...@zeigermann.de>
> > To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
> > Sent: Monday, December 08, 2003 10:02 PM
> > Subject: Re: JBoss help
> >
> >
> >
> >>Hi Igor,
> >>
> >>I suppose you use the patch provided by Grant that allows for external
> >>TMs, right? I have never tried it and did not check with JBoss as well,
> >>so I can only guess. When I was merging the stores I was really
> >>wondering if a commit on the XAResource should also commit the
> >>transaction as one implementation did and another did not. If I remember
> >>correctly the implementation that was in
> >>org.apache.slide.store.impl.rdbms before did not, but now does. Did you
> >>use this implementation before? Slide's TM does not commit the
> >>transaction, except over the XAResource, I guess JBoss is closer to the
> >>specification and actually does as it has a full transactional resource
> >>including the connection and the XAResource. Can any expert please check
> >>if I am correct here? At least the exceptions you present here perfectly
> >>match what I suspect...
> >>
> >>For now simply try to comment out the rollbacks and commit on the
> >>connection and see if it works. I suppose you know how to do this, if
> >>not use the attached patch. Please report back success or failure.
> >>
> >>Thanks,
> >>
> >>Oliver
> >>
> >>
> >>Igor I. Nuzhnov wrote:
> >>
> >>>Hello, all
> >>>I try to configure Slide from CVS HEAD for work with JBoss 3.2.3
> >>>I want to use new J2EEStore, but get many transaction errors, such as
> >>>
> >>>15:55:36,750 INFO [STDOUT] 08 Dec 2003 15:55:36 -
> >>>org.apache.slide.common.Namespace - INFO - Loading namespace slide base
> >
> > data
> >
> >>>15:55:36,843 WARN [TransactionImpl] XAException:
> >
> > tx=TransactionImpl:XidImpl
> >
> >>>[FormatId=257, GlobalId=dwarf//61, BranchQual=] errorCode=XA_HEURCOM
> >>>javax.transaction.xa.XAException
> >>> at
> >>>
> >
> >
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.rollback(AbstractRDBMSS
> >
> >>>tore.java:396)
> >>> at
> >>>
> >
> >
org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
> >
> >>> at
> >
> > org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:458)
> >
> >>> at org.jboss.tm.TxManager.rollback(TxManager.java:264)
> >>> at
> >>>org.apache.slide.common.Namespace.loadBaseData(Namespace.java:802)
> >>> at
org.apache.slide.common.Domain.initNamespace(Domain.java:857)
> >>> at org.apache.slide.common.Domain.init(Domain.java:476)
> >>> at org.apache.slide.common.Domain.init(Domain.java:410)
> >>> at org.apache.slide.common.Domain.init(Domain.java:373)
> >>> at
> >>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
> >>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
> >>> at
> >>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
> >>>...
> >>>...
> >>>15:55:38,828 WARN [TransactionImpl] XAException:
> >
> > tx=TransactionImpl:XidImpl
> >
> >>>[FormatId=257, GlobalId=dwarf//65, BranchQual=] errorCode=XA_RBCOMMFAIL
> >>>javax.transaction.xa.XAException
> >>> at
> >>>
> >
> >
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.commit(AbstractRDBMSSto
> >
> >>>re.java:354)
> >>> at
> >>>org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
> >>> at
org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
> >>> at org.jboss.tm.TxManager.commit(TxManager.java:141)
> >>> at
> >>>
> >
> >
org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessToken
> >
> >>>Impl.java:452)
> >>> at
> >>>org.apache.slide.common.Namespace.loadBaseData(Namespace.java:825)
> >>> at
org.apache.slide.common.Domain.initNamespace(Domain.java:857)
> >>> at org.apache.slide.common.Domain.init(Domain.java:476)
> >>> at org.apache.slide.common.Domain.init(Domain.java:410)
> >>> at org.apache.slide.common.Domain.init(Domain.java:373)
> >>> at
> >>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
> >>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
> >>> at
> >>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
> >>> at
> >>>
> >
> >
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
> >
> >>>5)
> >>>
> >>>
> >>>Here is my configuration:
> >>>
> >>>[web.xml]
> >>>...
> >>> <resource-ref>
> >>> <res-ref-name>jdbc/HRMDS</res-ref-name>
> >>> <res-type>javax.sql.DataSource</res-type>
> >>> <res-auth>Container</res-auth>
> >>> </resource-ref>
> >>> <resource-ref>
> >>> <res-ref-name>TransactionManager</res-ref-name>
> >>> <res-type>javax.transaction.TransactionManager</res-type>
> >>> <res-auth>Container</res-auth>
> >>> </resource-ref>
> >>>...
> >>>
> >>>[jboss-web.xml]
> >>>...
> >>> <resource-ref>
> >>> <res-ref-name>jdbc/HRMDS</res-ref-name>
> >>> <jndi-name>java:/XAHRMDS</jndi-name>
> >>> </resource-ref>
> >>> <resource-ref>
> >>> <res-ref-name>TransactionManager</res-ref-name>
> >>> <jndi-name>java:/TransactionManager</jndi-name>
> >>> </resource-ref>
> >>>...
> >>>
> >>>[Domain.xml]
> >>>...
> >>> <definition>
> >>> <transaction-manager
> >>>type="jndi">TransactionManager</transaction-manager>
> >>> <store name="j2ee"
> >>>classname="org.apache.slide.store.ExtendedStore">
> >>> <nodestore
> >>>classname="org.apache.slide.store.impl.rdbms.J2EEStore">
> >>> <parameter name="datasource">jdbc/HRMDS</parameter>
> >>> <parameter
> >>>
> >
> >
name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter</para
> >
> >>>meter>
> >>> </nodestore>
> >>> <securitystore>
> >>> <reference store="nodestore"/>
> >>> </securitystore>
> >>> <lockstore>
> >>> <reference store="nodestore"/>
> >>> </lockstore>
> >>> <revisiondescriptorsstore>
> >>> <reference store="nodestore"/>
> >>> </revisiondescriptorsstore>
> >>> <revisiondescriptorstore>
> >>> <reference store="nodestore"/>
> >>> </revisiondescriptorstore>
> >>> <contentstore>
> >>> <reference store="nodestore"/>
> >>> </contentstore>
> >>> </store>
> >>> <scope match="/" store="j2ee"/>
> >>> </definition>
> >>>...
> >>>
> >>>[hrm-ds.xml]
> >>>...
> >>> <xa-datasource>
> >>> <jndi-name>XAHRMDS</jndi-name>
> >>> <track-connection-by-tx>true</track-connection-by-tx>
> >>>
> >>>
> >
<xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-d
> >
> >>>atasource-class>
> >>> <xa-datasource-property
> >
> > name="ServerName">gnome</xa-datasource-property>
> >
> >>> <xa-datasource-property
> >
> > name="PortNumber">1433</xa-datasource-property>
> >
> >>> <xa-datasource-property
> >
> > name="DatabaseName">hrm</xa-datasource-property>
> >
> >>> <xa-datasource-property
> >>>name="SelectMethod">cursor</xa-datasource-property>
> >>> <xa-datasource-property
> >>>name="SendStringParametersAsUnicode">true</xa-datasource-property>
> >>> <user-name>sa</user-name>
> >>> <password></password>
> >>> <min-pool-size>10</min-pool-size>
> >>> <max-pool-size>50</max-pool-size>
> >>> <blocking-timeout-millis>5000</blocking-timeout-millis>
> >>> <idle-timeout-minutes>15</idle-timeout-minutes>
> >>> </xa-datasource>
> >>>...
> >>>
> >>>Please, help me
> >>>
> >>>By
> >>>
> >>>Igor Nuzhnov, igor@malva.ua
> >>>
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >>>
> >>>
> >>
> >>
> >>
> >
> >
>
> --------------------------------------------------------------------------
--
> > ----
> >
> >
> >
> >>Index: AbstractRDBMSStore.java
> >>===================================================================
> >>RCS file:
> >
> >
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/Abstrac
> > tRDBMSStore.java,v
> >
> >>retrieving revision 1.1
> >>diff -u -r1.1 AbstractRDBMSStore.java
> >>--- AbstractRDBMSStore.java 3 Dec 2003 12:00:46 -0000 1.1
> >>+++ AbstractRDBMSStore.java 8 Dec 2003 20:00:54 -0000
> >>@@ -344,9 +344,9 @@
> >> try {
> >> if (id.rollbackOnly) {
> >>
> >>- conn.rollback();
> >>+// conn.rollback();
> >> } else {
> >>- conn.commit();
> >>+// conn.commit();
> >> }
> >> activeTransactionContext.set(null);
> >>
> >>@@ -389,12 +389,12 @@
> >> throw new XAException(XAException.XAER_NOTA);
> >> }
> >>
> >>- try {
> >>- conn.rollback();
> >>+// try {
> >>+// conn.rollback();
> >> activeTransactionContext.set(null);
> >>- } catch (SQLException e) {
> >>- throw new XAException(XAException.XA_HEURCOM);
> >>- } finally {
> >>+// } catch (SQLException e) {
> >>+// throw new XAException(XAException.XA_HEURCOM);
> >>+// } finally {
> >> try {
> >> conn.close();
> >> /* We must always return connections to the pool,
> >>@@ -402,7 +402,7 @@
> >> } catch (SQLException e) {
> >> getLogger().log(e, LOG_CHANNEL, Logger.ERROR);
> >> }
> >>- }
> >>+// }
> >> }
> >>
> >> /**
> >>
> >>
> >
> >
> >
>
> --------------------------------------------------------------------------
--
> > ----
> >
> >
> >
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >
> >
>
>
>
----------------------------------------------------------------------------
----
> Index: XidWrapper.java
> ===================================================================
> RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/util/XidWrapper.java,v
> retrieving revision 1.2
> diff -u -r1.2 XidWrapper.java
> --- XidWrapper.java 21 Nov 2003 11:50:13 -0000 1.2
> +++ XidWrapper.java 9 Dec 2003 15:24:05 -0000
> @@ -13,7 +13,7 @@
> *
> */
> public class XidWrapper implements Xid {
> -
> +
> public static final Xid wrap(Xid xid) {
> return wrap(xid, false); // for Slide branch qualifier must not
be included in onePhase commit
> }
> @@ -29,11 +29,17 @@
> private XidWrapper(Xid xid, boolean includeBranch) {
> this.xid = xid;
> // do calculations once for performance
> - asString =
> + String tmpString =
> new String(xid.getGlobalTransactionId())
> + (includeBranch ? "-" + new
String(xid.getBranchQualifier()) : "");
> - hashCode = asString.hashCode();
>
> + // XXX for tx file store replace :, \ and / which might be part
of the identifier with chars not
> + // offensive to any file system specific chars
> + tmpString = tmpString.replace(':', '.');
> + tmpString = tmpString.replace('/', '-');
> + asString = tmpString.replace('\\', '_');
> +
> + hashCode = asString.hashCode();
> }
>
> public Xid getXid() {
> @@ -53,22 +59,22 @@
> }
>
> public boolean equals(Object o) {
> - return (o != null && asString.equals(o.toString()));
> - /*
> - if (this == o) {
> - return true;
> - }
> -
> - if (o != null && o instanceof Xid) {
> - Xid xid2 = (Xid) o;
> - // we do not need equality of format Id
> - return (
> - Arrays.equals(xid.getGlobalTransactionId(),
xid2.getGlobalTransactionId())
> - && Arrays.equals(xid.getBranchQualifier(),
xid2.getBranchQualifier()));
> - }
> -
> - return false;
> - */
> + return (o != null && asString.equals(o.toString()));
> + /*
> + if (this == o) {
> + return true;
> + }
> +
> + if (o != null && o instanceof Xid) {
> + Xid xid2 = (Xid) o;
> + // we do not need equality of format Id
> + return (
> + Arrays.equals(xid.getGlobalTransactionId(),
xid2.getGlobalTransactionId())
> + && Arrays.equals(xid.getBranchQualifier(),
xid2.getBranchQualifier()));
> + }
> +
> + return false;
> + */
> }
>
> public String toString() {
>
>
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: JBoss help
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Igor I. Nuzhnov wrote:
> Thank you for the help, Oliver
> After your patch, all works just fine
> Can you, please, make usage of commit and rollback in AbstractRDBMSStore
> configurable (Domain.xml)
Did not see your post before my previous one, where I proposed to do
exactly that :) So it will be one of the next things I will do :)
> And another question
> When I use new TxFileStore on slide start I get exception
> ...
> 08:13:58,078 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> org.apache.slide.common.Namespace - INFO - Content store:
> org.apache.slide.store.txfile.TxFileContentStore
> 08:13:58,125 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> org.apache.slide.store.txfile.AbstractTxFileStoreService - INFO - File Store
> configured to store/content, working directory work/content
> ...
> 08:13:58,203 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> org.apache.slide.store.txfile.rm.impl.FileResourceManager - INFO - Starting
> RM at 'store/content' / 'work/content'
> 08:13:58,203 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> org.apache.slide.store.txfile.rm.impl.FileResourceManager - INFO -
> Recovering dwarf
> 08:13:58,218 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> org.apache.slide.store.txfile.rm.impl.FileResourceManager - EMERGENCY -
> Recovering status information from 'work/content/dwarf/transaction.log'
> faile
> d! Could not find file
> 08:13:58,218 INFO [STDOUT] 09 Dec 2003 08:13:58 -
> org.apache.slide.store.txfile.rm.impl.FileResourceManager - EMERGENCY -
> java.io.FileNotFoundException: work\content\dwarf\transaction.log
> 08:13:58,218 ERROR [STDERR] java.io.FileNotFoundException:
> work\content\dwarf\transaction.log
> 08:13:58,218 ERROR [STDERR] at java.io.FileInputStream.open(Native
> Method)
> 08:13:58,218 ERROR [STDERR] at
> java.io.FileInputStream.<init>(FileInputStream.java:106)
> 08:13:58,218 ERROR [STDERR] at
> org.apache.slide.store.txfile.rm.impl.FileResourceManager$TransactionContext
> .recoverState(FileResourceManager.java:1517)
> 08:13:58,218 ERROR [STDERR] at
> org.apache.slide.store.txfile.rm.impl.FileResourceManager.recoverContexts(Fi
> leResourceManager.java:1243)
> 08:13:58,218 ERROR [STDERR] at
> org.apache.slide.store.txfile.rm.impl.FileResourceManager.recover(FileResour
> ceManager.java:480)
> 08:13:58,218 ERROR [STDERR] at
> org.apache.slide.store.txfile.rm.impl.FileResourceManager.start(FileResource
> Manager.java:433)
> 08:13:58,281 ERROR [STDERR] at
> org.apache.slide.store.txfile.AbstractTxFileStoreService.connect(AbstractTxF
> ileStoreService.java:160)
> 08:13:58,281 ERROR [STDERR] at
> org.apache.slide.common.AbstractServiceBase.connect(AbstractServiceBase.java
> :162)
> 08:13:58,281 ERROR [STDERR] at
> org.apache.slide.store.AbstractStore.connect(AbstractStore.java:227)
> 08:13:58,281 ERROR [STDERR] at
> org.apache.slide.common.AbstractServiceBase.connectIfNeeded(AbstractServiceB
> ase.java:234)
> 08:13:58,281 ERROR [STDERR] at
> org.apache.slide.common.Namespace.connectService(Namespace.java:534)
> 08:13:58,328 ERROR [STDERR] at
> org.apache.slide.common.Namespace.retrieveStore(Namespace.java:633)
> 08:13:58,328 ERROR [STDERR] at
> org.apache.slide.common.Uri.parseUri(Uri.java:379)
> 08:13:58,328 ERROR [STDERR] at
> org.apache.slide.common.Uri.<init>(Uri.java:106)
> 08:13:58,328 ERROR [STDERR] at
> org.apache.slide.common.Namespace.getUri(Namespace.java:681)
> 08:13:58,328 ERROR [STDERR] at
> org.apache.slide.common.Namespace.getUri(Namespace.java:661)
> ...
>
> As I understand, slide can't set correct txId:
> public synchronized void recoverState() throws
> ResourceManagerException {
> String statePath = workDir + "/" + txId + "/" + CONTEXT_FILE;
> 'work\content\dwarf\transaction.log'
>
> but transaction log in 'work\content\dwarf\65\transaction.log'
Thanks for that hint, you are actually helping me more than I help you :)
Let me explain what I suspect: Upon startup the tx file store checks for
transactions that have not been completed correctly. It does so by
examining the directories under its working directory, in your case
"work/content/". There it finds the directory dwarf and assumes this is
the identifier for a transaction and tries to look up transaction.log
inside of it: "work/content/dwarf/transaction.log". As indicated by the
other thread dump you sent ([FormatId=257, GlobalId=dwarf//61,
BranchQual=]) JBoss' TM has a / in the toString output for the Xid which
messes up the path to the filesystem. As a workaround I would propose to
replace all '/' and '\' with a less offensive character in the
XidWrapper which already is used inside the tx file store. I will attach
a patch for it that is to be applied to org.apache.slide.util.XidWrapper
Again, this may be nonsense as I just guess. But still, what you give it
a try, please?
Thanks,
Oliver
> Thanks
>
> Igor
>
> ----- Original Message -----
> From: "Oliver Zeigermann" <ol...@zeigermann.de>
> To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
> Sent: Monday, December 08, 2003 10:02 PM
> Subject: Re: JBoss help
>
>
>
>>Hi Igor,
>>
>>I suppose you use the patch provided by Grant that allows for external
>>TMs, right? I have never tried it and did not check with JBoss as well,
>>so I can only guess. When I was merging the stores I was really
>>wondering if a commit on the XAResource should also commit the
>>transaction as one implementation did and another did not. If I remember
>>correctly the implementation that was in
>>org.apache.slide.store.impl.rdbms before did not, but now does. Did you
>>use this implementation before? Slide's TM does not commit the
>>transaction, except over the XAResource, I guess JBoss is closer to the
>>specification and actually does as it has a full transactional resource
>>including the connection and the XAResource. Can any expert please check
>>if I am correct here? At least the exceptions you present here perfectly
>>match what I suspect...
>>
>>For now simply try to comment out the rollbacks and commit on the
>>connection and see if it works. I suppose you know how to do this, if
>>not use the attached patch. Please report back success or failure.
>>
>>Thanks,
>>
>>Oliver
>>
>>
>>Igor I. Nuzhnov wrote:
>>
>>>Hello, all
>>>I try to configure Slide from CVS HEAD for work with JBoss 3.2.3
>>>I want to use new J2EEStore, but get many transaction errors, such as
>>>
>>>15:55:36,750 INFO [STDOUT] 08 Dec 2003 15:55:36 -
>>>org.apache.slide.common.Namespace - INFO - Loading namespace slide base
>
> data
>
>>>15:55:36,843 WARN [TransactionImpl] XAException:
>
> tx=TransactionImpl:XidImpl
>
>>>[FormatId=257, GlobalId=dwarf//61, BranchQual=] errorCode=XA_HEURCOM
>>>javax.transaction.xa.XAException
>>> at
>>>
>
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.rollback(AbstractRDBMSS
>
>>>tore.java:396)
>>> at
>>>
>
> org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
>
>>> at
>
> org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:458)
>
>>> at org.jboss.tm.TxManager.rollback(TxManager.java:264)
>>> at
>>>org.apache.slide.common.Namespace.loadBaseData(Namespace.java:802)
>>> at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
>>> at org.apache.slide.common.Domain.init(Domain.java:476)
>>> at org.apache.slide.common.Domain.init(Domain.java:410)
>>> at org.apache.slide.common.Domain.init(Domain.java:373)
>>> at
>>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
>>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>>> at
>>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
>>>...
>>>...
>>>15:55:38,828 WARN [TransactionImpl] XAException:
>
> tx=TransactionImpl:XidImpl
>
>>>[FormatId=257, GlobalId=dwarf//65, BranchQual=] errorCode=XA_RBCOMMFAIL
>>>javax.transaction.xa.XAException
>>> at
>>>
>
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.commit(AbstractRDBMSSto
>
>>>re.java:354)
>>> at
>>>org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
>>> at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
>>> at org.jboss.tm.TxManager.commit(TxManager.java:141)
>>> at
>>>
>
> org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessToken
>
>>>Impl.java:452)
>>> at
>>>org.apache.slide.common.Namespace.loadBaseData(Namespace.java:825)
>>> at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
>>> at org.apache.slide.common.Domain.init(Domain.java:476)
>>> at org.apache.slide.common.Domain.init(Domain.java:410)
>>> at org.apache.slide.common.Domain.init(Domain.java:373)
>>> at
>>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
>>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>>> at
>>>org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
>>> at
>>>
>
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
>
>>>5)
>>>
>>>
>>>Here is my configuration:
>>>
>>>[web.xml]
>>>...
>>> <resource-ref>
>>> <res-ref-name>jdbc/HRMDS</res-ref-name>
>>> <res-type>javax.sql.DataSource</res-type>
>>> <res-auth>Container</res-auth>
>>> </resource-ref>
>>> <resource-ref>
>>> <res-ref-name>TransactionManager</res-ref-name>
>>> <res-type>javax.transaction.TransactionManager</res-type>
>>> <res-auth>Container</res-auth>
>>> </resource-ref>
>>>...
>>>
>>>[jboss-web.xml]
>>>...
>>> <resource-ref>
>>> <res-ref-name>jdbc/HRMDS</res-ref-name>
>>> <jndi-name>java:/XAHRMDS</jndi-name>
>>> </resource-ref>
>>> <resource-ref>
>>> <res-ref-name>TransactionManager</res-ref-name>
>>> <jndi-name>java:/TransactionManager</jndi-name>
>>> </resource-ref>
>>>...
>>>
>>>[Domain.xml]
>>>...
>>> <definition>
>>> <transaction-manager
>>>type="jndi">TransactionManager</transaction-manager>
>>> <store name="j2ee"
>>>classname="org.apache.slide.store.ExtendedStore">
>>> <nodestore
>>>classname="org.apache.slide.store.impl.rdbms.J2EEStore">
>>> <parameter name="datasource">jdbc/HRMDS</parameter>
>>> <parameter
>>>
>
> name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter</para
>
>>>meter>
>>> </nodestore>
>>> <securitystore>
>>> <reference store="nodestore"/>
>>> </securitystore>
>>> <lockstore>
>>> <reference store="nodestore"/>
>>> </lockstore>
>>> <revisiondescriptorsstore>
>>> <reference store="nodestore"/>
>>> </revisiondescriptorsstore>
>>> <revisiondescriptorstore>
>>> <reference store="nodestore"/>
>>> </revisiondescriptorstore>
>>> <contentstore>
>>> <reference store="nodestore"/>
>>> </contentstore>
>>> </store>
>>> <scope match="/" store="j2ee"/>
>>> </definition>
>>>...
>>>
>>>[hrm-ds.xml]
>>>...
>>> <xa-datasource>
>>> <jndi-name>XAHRMDS</jndi-name>
>>> <track-connection-by-tx>true</track-connection-by-tx>
>>>
>>>
> <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-d
>
>>>atasource-class>
>>> <xa-datasource-property
>
> name="ServerName">gnome</xa-datasource-property>
>
>>> <xa-datasource-property
>
> name="PortNumber">1433</xa-datasource-property>
>
>>> <xa-datasource-property
>
> name="DatabaseName">hrm</xa-datasource-property>
>
>>> <xa-datasource-property
>>>name="SelectMethod">cursor</xa-datasource-property>
>>> <xa-datasource-property
>>>name="SendStringParametersAsUnicode">true</xa-datasource-property>
>>> <user-name>sa</user-name>
>>> <password></password>
>>> <min-pool-size>10</min-pool-size>
>>> <max-pool-size>50</max-pool-size>
>>> <blocking-timeout-millis>5000</blocking-timeout-millis>
>>> <idle-timeout-minutes>15</idle-timeout-minutes>
>>> </xa-datasource>
>>>...
>>>
>>>Please, help me
>>>
>>>By
>>>
>>>Igor Nuzhnov, igor@malva.ua
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>
>
> ----------------------------------------------------------------------------
> ----
>
>
>
>>Index: AbstractRDBMSStore.java
>>===================================================================
>>RCS file:
>
> /home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/Abstrac
> tRDBMSStore.java,v
>
>>retrieving revision 1.1
>>diff -u -r1.1 AbstractRDBMSStore.java
>>--- AbstractRDBMSStore.java 3 Dec 2003 12:00:46 -0000 1.1
>>+++ AbstractRDBMSStore.java 8 Dec 2003 20:00:54 -0000
>>@@ -344,9 +344,9 @@
>> try {
>> if (id.rollbackOnly) {
>>
>>- conn.rollback();
>>+// conn.rollback();
>> } else {
>>- conn.commit();
>>+// conn.commit();
>> }
>> activeTransactionContext.set(null);
>>
>>@@ -389,12 +389,12 @@
>> throw new XAException(XAException.XAER_NOTA);
>> }
>>
>>- try {
>>- conn.rollback();
>>+// try {
>>+// conn.rollback();
>> activeTransactionContext.set(null);
>>- } catch (SQLException e) {
>>- throw new XAException(XAException.XA_HEURCOM);
>>- } finally {
>>+// } catch (SQLException e) {
>>+// throw new XAException(XAException.XA_HEURCOM);
>>+// } finally {
>> try {
>> conn.close();
>> /* We must always return connections to the pool,
>>@@ -402,7 +402,7 @@
>> } catch (SQLException e) {
>> getLogger().log(e, LOG_CHANNEL, Logger.ERROR);
>> }
>>- }
>>+// }
>> }
>>
>> /**
>>
>>
>
>
>
> ----------------------------------------------------------------------------
> ----
>
>
>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
Re: JBoss help
Posted by "Igor I. Nuzhnov" <ig...@malva.ua>.
Thank you for the help, Oliver
After your patch, all works just fine
Can you, please, make usage of commit and rollback in AbstractRDBMSStore
configurable (Domain.xml)
And another question
When I use new TxFileStore on slide start I get exception
...
08:13:58,078 INFO [STDOUT] 09 Dec 2003 08:13:58 -
org.apache.slide.common.Namespace - INFO - Content store:
org.apache.slide.store.txfile.TxFileContentStore
08:13:58,125 INFO [STDOUT] 09 Dec 2003 08:13:58 -
org.apache.slide.store.txfile.AbstractTxFileStoreService - INFO - File Store
configured to store/content, working directory work/content
...
08:13:58,203 INFO [STDOUT] 09 Dec 2003 08:13:58 -
org.apache.slide.store.txfile.rm.impl.FileResourceManager - INFO - Starting
RM at 'store/content' / 'work/content'
08:13:58,203 INFO [STDOUT] 09 Dec 2003 08:13:58 -
org.apache.slide.store.txfile.rm.impl.FileResourceManager - INFO -
Recovering dwarf
08:13:58,218 INFO [STDOUT] 09 Dec 2003 08:13:58 -
org.apache.slide.store.txfile.rm.impl.FileResourceManager - EMERGENCY -
Recovering status information from 'work/content/dwarf/transaction.log'
faile
d! Could not find file
08:13:58,218 INFO [STDOUT] 09 Dec 2003 08:13:58 -
org.apache.slide.store.txfile.rm.impl.FileResourceManager - EMERGENCY -
java.io.FileNotFoundException: work\content\dwarf\transaction.log
08:13:58,218 ERROR [STDERR] java.io.FileNotFoundException:
work\content\dwarf\transaction.log
08:13:58,218 ERROR [STDERR] at java.io.FileInputStream.open(Native
Method)
08:13:58,218 ERROR [STDERR] at
java.io.FileInputStream.<init>(FileInputStream.java:106)
08:13:58,218 ERROR [STDERR] at
org.apache.slide.store.txfile.rm.impl.FileResourceManager$TransactionContext
.recoverState(FileResourceManager.java:1517)
08:13:58,218 ERROR [STDERR] at
org.apache.slide.store.txfile.rm.impl.FileResourceManager.recoverContexts(Fi
leResourceManager.java:1243)
08:13:58,218 ERROR [STDERR] at
org.apache.slide.store.txfile.rm.impl.FileResourceManager.recover(FileResour
ceManager.java:480)
08:13:58,218 ERROR [STDERR] at
org.apache.slide.store.txfile.rm.impl.FileResourceManager.start(FileResource
Manager.java:433)
08:13:58,281 ERROR [STDERR] at
org.apache.slide.store.txfile.AbstractTxFileStoreService.connect(AbstractTxF
ileStoreService.java:160)
08:13:58,281 ERROR [STDERR] at
org.apache.slide.common.AbstractServiceBase.connect(AbstractServiceBase.java
:162)
08:13:58,281 ERROR [STDERR] at
org.apache.slide.store.AbstractStore.connect(AbstractStore.java:227)
08:13:58,281 ERROR [STDERR] at
org.apache.slide.common.AbstractServiceBase.connectIfNeeded(AbstractServiceB
ase.java:234)
08:13:58,281 ERROR [STDERR] at
org.apache.slide.common.Namespace.connectService(Namespace.java:534)
08:13:58,328 ERROR [STDERR] at
org.apache.slide.common.Namespace.retrieveStore(Namespace.java:633)
08:13:58,328 ERROR [STDERR] at
org.apache.slide.common.Uri.parseUri(Uri.java:379)
08:13:58,328 ERROR [STDERR] at
org.apache.slide.common.Uri.<init>(Uri.java:106)
08:13:58,328 ERROR [STDERR] at
org.apache.slide.common.Namespace.getUri(Namespace.java:681)
08:13:58,328 ERROR [STDERR] at
org.apache.slide.common.Namespace.getUri(Namespace.java:661)
...
As I understand, slide can't set correct txId:
public synchronized void recoverState() throws
ResourceManagerException {
String statePath = workDir + "/" + txId + "/" + CONTEXT_FILE;
'work\content\dwarf\transaction.log'
but transaction log in 'work\content\dwarf\65\transaction.log'
Thanks
Igor
----- Original Message -----
From: "Oliver Zeigermann" <ol...@zeigermann.de>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Monday, December 08, 2003 10:02 PM
Subject: Re: JBoss help
> Hi Igor,
>
> I suppose you use the patch provided by Grant that allows for external
> TMs, right? I have never tried it and did not check with JBoss as well,
> so I can only guess. When I was merging the stores I was really
> wondering if a commit on the XAResource should also commit the
> transaction as one implementation did and another did not. If I remember
> correctly the implementation that was in
> org.apache.slide.store.impl.rdbms before did not, but now does. Did you
> use this implementation before? Slide's TM does not commit the
> transaction, except over the XAResource, I guess JBoss is closer to the
> specification and actually does as it has a full transactional resource
> including the connection and the XAResource. Can any expert please check
> if I am correct here? At least the exceptions you present here perfectly
> match what I suspect...
>
> For now simply try to comment out the rollbacks and commit on the
> connection and see if it works. I suppose you know how to do this, if
> not use the attached patch. Please report back success or failure.
>
> Thanks,
>
> Oliver
>
>
> Igor I. Nuzhnov wrote:
> > Hello, all
> > I try to configure Slide from CVS HEAD for work with JBoss 3.2.3
> > I want to use new J2EEStore, but get many transaction errors, such as
> >
> > 15:55:36,750 INFO [STDOUT] 08 Dec 2003 15:55:36 -
> > org.apache.slide.common.Namespace - INFO - Loading namespace slide base
data
> > 15:55:36,843 WARN [TransactionImpl] XAException:
tx=TransactionImpl:XidImpl
> > [FormatId=257, GlobalId=dwarf//61, BranchQual=] errorCode=XA_HEURCOM
> > javax.transaction.xa.XAException
> > at
> >
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.rollback(AbstractRDBMSS
> > tore.java:396)
> > at
> >
org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
> > at
org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:458)
> > at org.jboss.tm.TxManager.rollback(TxManager.java:264)
> > at
> > org.apache.slide.common.Namespace.loadBaseData(Namespace.java:802)
> > at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
> > at org.apache.slide.common.Domain.init(Domain.java:476)
> > at org.apache.slide.common.Domain.init(Domain.java:410)
> > at org.apache.slide.common.Domain.init(Domain.java:373)
> > at
> > org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
> > at javax.servlet.GenericServlet.init(GenericServlet.java:256)
> > at
> > org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
> > ...
> > ...
> > 15:55:38,828 WARN [TransactionImpl] XAException:
tx=TransactionImpl:XidImpl
> > [FormatId=257, GlobalId=dwarf//65, BranchQual=] errorCode=XA_RBCOMMFAIL
> > javax.transaction.xa.XAException
> > at
> >
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.commit(AbstractRDBMSSto
> > re.java:354)
> > at
> > org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
> > at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
> > at org.jboss.tm.TxManager.commit(TxManager.java:141)
> > at
> >
org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessToken
> > Impl.java:452)
> > at
> > org.apache.slide.common.Namespace.loadBaseData(Namespace.java:825)
> > at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
> > at org.apache.slide.common.Domain.init(Domain.java:476)
> > at org.apache.slide.common.Domain.init(Domain.java:410)
> > at org.apache.slide.common.Domain.init(Domain.java:373)
> > at
> > org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
> > at javax.servlet.GenericServlet.init(GenericServlet.java:256)
> > at
> > org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
> > at
> >
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
> > 5)
> >
> >
> > Here is my configuration:
> >
> > [web.xml]
> > ...
> > <resource-ref>
> > <res-ref-name>jdbc/HRMDS</res-ref-name>
> > <res-type>javax.sql.DataSource</res-type>
> > <res-auth>Container</res-auth>
> > </resource-ref>
> > <resource-ref>
> > <res-ref-name>TransactionManager</res-ref-name>
> > <res-type>javax.transaction.TransactionManager</res-type>
> > <res-auth>Container</res-auth>
> > </resource-ref>
> > ...
> >
> > [jboss-web.xml]
> > ...
> > <resource-ref>
> > <res-ref-name>jdbc/HRMDS</res-ref-name>
> > <jndi-name>java:/XAHRMDS</jndi-name>
> > </resource-ref>
> > <resource-ref>
> > <res-ref-name>TransactionManager</res-ref-name>
> > <jndi-name>java:/TransactionManager</jndi-name>
> > </resource-ref>
> > ...
> >
> > [Domain.xml]
> > ...
> > <definition>
> > <transaction-manager
> > type="jndi">TransactionManager</transaction-manager>
> > <store name="j2ee"
> > classname="org.apache.slide.store.ExtendedStore">
> > <nodestore
> > classname="org.apache.slide.store.impl.rdbms.J2EEStore">
> > <parameter name="datasource">jdbc/HRMDS</parameter>
> > <parameter
> >
name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter</para
> > meter>
> > </nodestore>
> > <securitystore>
> > <reference store="nodestore"/>
> > </securitystore>
> > <lockstore>
> > <reference store="nodestore"/>
> > </lockstore>
> > <revisiondescriptorsstore>
> > <reference store="nodestore"/>
> > </revisiondescriptorsstore>
> > <revisiondescriptorstore>
> > <reference store="nodestore"/>
> > </revisiondescriptorstore>
> > <contentstore>
> > <reference store="nodestore"/>
> > </contentstore>
> > </store>
> > <scope match="/" store="j2ee"/>
> > </definition>
> > ...
> >
> > [hrm-ds.xml]
> > ...
> > <xa-datasource>
> > <jndi-name>XAHRMDS</jndi-name>
> > <track-connection-by-tx>true</track-connection-by-tx>
> >
> >
<xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-d
> > atasource-class>
> > <xa-datasource-property
name="ServerName">gnome</xa-datasource-property>
> > <xa-datasource-property
name="PortNumber">1433</xa-datasource-property>
> > <xa-datasource-property
name="DatabaseName">hrm</xa-datasource-property>
> > <xa-datasource-property
> > name="SelectMethod">cursor</xa-datasource-property>
> > <xa-datasource-property
> > name="SendStringParametersAsUnicode">true</xa-datasource-property>
> > <user-name>sa</user-name>
> > <password></password>
> > <min-pool-size>10</min-pool-size>
> > <max-pool-size>50</max-pool-size>
> > <blocking-timeout-millis>5000</blocking-timeout-millis>
> > <idle-timeout-minutes>15</idle-timeout-minutes>
> > </xa-datasource>
> > ...
> >
> > Please, help me
> >
> > By
> >
> > Igor Nuzhnov, igor@malva.ua
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >
> >
>
>
>
----------------------------------------------------------------------------
----
> Index: AbstractRDBMSStore.java
> ===================================================================
> RCS file:
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/Abstrac
tRDBMSStore.java,v
> retrieving revision 1.1
> diff -u -r1.1 AbstractRDBMSStore.java
> --- AbstractRDBMSStore.java 3 Dec 2003 12:00:46 -0000 1.1
> +++ AbstractRDBMSStore.java 8 Dec 2003 20:00:54 -0000
> @@ -344,9 +344,9 @@
> try {
> if (id.rollbackOnly) {
>
> - conn.rollback();
> +// conn.rollback();
> } else {
> - conn.commit();
> +// conn.commit();
> }
> activeTransactionContext.set(null);
>
> @@ -389,12 +389,12 @@
> throw new XAException(XAException.XAER_NOTA);
> }
>
> - try {
> - conn.rollback();
> +// try {
> +// conn.rollback();
> activeTransactionContext.set(null);
> - } catch (SQLException e) {
> - throw new XAException(XAException.XA_HEURCOM);
> - } finally {
> +// } catch (SQLException e) {
> +// throw new XAException(XAException.XA_HEURCOM);
> +// } finally {
> try {
> conn.close();
> /* We must always return connections to the pool,
> @@ -402,7 +402,7 @@
> } catch (SQLException e) {
> getLogger().log(e, LOG_CHANNEL, Logger.ERROR);
> }
> - }
> +// }
> }
>
> /**
>
>
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: JBoss help
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Hi Grant!
Ahhhh, that's what I thought :) This is good news for me, I will add a
switch to the J2EE store that controls whether the store shall commit or
the TM does.
By the way, there is no globalConnection in the merged J2EE store any
more. I experienced problems with the globalConnection as well. What I
do for requests outside transactions is to get a connection from the
pool, do all stuff and close the connection afterwards. No need for
rollback / commits as I only have read access. The code looks like
Connection connection = null;
try {
connection = getNewConnection();
return adapter.retrieveObject(connection, uri);
} catch (SQLException e) {
throw new ServiceAccessException(this, e);
} finally {
if (connection != null) {
try {
connection.close();
} catch (SQLException e) {
getLogger().log(e, LOG_CHANNEL, Logger.WARNING);
}
}
}
OT: Hmm, as I write this I notice I could well set this connection to
setReadOnly(), right???
Anyway, does this cause any trouble with JBoss or any other J2EE servers?
I am sorry I had no chance to test all this in a real J2EE environment,
yet. All tests I have done were using Tomcat. I promise to spend a
reasonable amount of time in January to see to this.
Thanks Grant for helping out, I really appreciate this :)
Oliver
Grant Gongaware wrote:
> Hi Igor and Oliver,
>
> My external TM patch still has some problems... I believe my problems
> have something to do with the "globalConnection" for calls outside a
> transaction.
>
> As for calling commits and rollback on the connection, Jboss has direct
> control over a connection returned from a javax.sql.DataSource, and
> manages commits and rollbacks since the same connection maybe used in
> other parts of the same J2EE transaction.
>
> -Grant
>
>
> Oliver Zeigermann wrote:
>
>> Hi Igor,
>>
>> I suppose you use the patch provided by Grant that allows for external
>> TMs, right? I have never tried it and did not check with JBoss as
>> well, so I can only guess. When I was merging the stores I was really
>> wondering if a commit on the XAResource should also commit the
>> transaction as one implementation did and another did not. If I
>> remember correctly the implementation that was in
>> org.apache.slide.store.impl.rdbms before did not, but now does. Did
>> you use this implementation before? Slide's TM does not commit the
>> transaction, except over the XAResource, I guess JBoss is closer to
>> the specification and actually does as it has a full transactional
>> resource including the connection and the XAResource. Can any expert
>> please check if I am correct here? At least the exceptions you present
>> here perfectly match what I suspect...
>>
>> For now simply try to comment out the rollbacks and commit on the
>> connection and see if it works. I suppose you know how to do this, if
>> not use the attached patch. Please report back success or failure.
>>
>> Thanks,
>>
>> Oliver
>>
>>
>> Igor I. Nuzhnov wrote:
>>
>>> Hello, all
>>> I try to configure Slide from CVS HEAD for work with JBoss 3.2.3
>>> I want to use new J2EEStore, but get many transaction errors, such as
>>>
>>> 15:55:36,750 INFO [STDOUT] 08 Dec 2003 15:55:36 -
>>> org.apache.slide.common.Namespace - INFO - Loading namespace slide
>>> base data
>>> 15:55:36,843 WARN [TransactionImpl] XAException:
>>> tx=TransactionImpl:XidImpl
>>> [FormatId=257, GlobalId=dwarf//61, BranchQual=] errorCode=XA_HEURCOM
>>> javax.transaction.xa.XAException
>>> at
>>> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.rollback(AbstractRDBMSS
>>>
>>> tore.java:396)
>>> at
>>> org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
>>>
>>> at
>>> org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:458)
>>> at org.jboss.tm.TxManager.rollback(TxManager.java:264)
>>> at
>>> org.apache.slide.common.Namespace.loadBaseData(Namespace.java:802)
>>> at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
>>> at org.apache.slide.common.Domain.init(Domain.java:476)
>>> at org.apache.slide.common.Domain.init(Domain.java:410)
>>> at org.apache.slide.common.Domain.init(Domain.java:373)
>>> at
>>> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
>>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>>> at
>>> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
>>> ...
>>> ...
>>> 15:55:38,828 WARN [TransactionImpl] XAException:
>>> tx=TransactionImpl:XidImpl
>>> [FormatId=257, GlobalId=dwarf//65, BranchQual=] errorCode=XA_RBCOMMFAIL
>>> javax.transaction.xa.XAException
>>> at
>>> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.commit(AbstractRDBMSSto
>>>
>>> re.java:354)
>>> at
>>> org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
>>> at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
>>> at org.jboss.tm.TxManager.commit(TxManager.java:141)
>>> at
>>> org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessToken
>>>
>>> Impl.java:452)
>>> at
>>> org.apache.slide.common.Namespace.loadBaseData(Namespace.java:825)
>>> at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
>>> at org.apache.slide.common.Domain.init(Domain.java:476)
>>> at org.apache.slide.common.Domain.init(Domain.java:410)
>>> at org.apache.slide.common.Domain.init(Domain.java:373)
>>> at
>>> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
>>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>>> at
>>> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
>>> at
>>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
>>>
>>> 5)
>>>
>>>
>>> Here is my configuration:
>>>
>>> [web.xml]
>>> ...
>>> <resource-ref>
>>> <res-ref-name>jdbc/HRMDS</res-ref-name>
>>> <res-type>javax.sql.DataSource</res-type>
>>> <res-auth>Container</res-auth>
>>> </resource-ref>
>>> <resource-ref>
>>> <res-ref-name>TransactionManager</res-ref-name>
>>> <res-type>javax.transaction.TransactionManager</res-type>
>>> <res-auth>Container</res-auth>
>>> </resource-ref>
>>> ...
>>>
>>> [jboss-web.xml]
>>> ...
>>> <resource-ref>
>>> <res-ref-name>jdbc/HRMDS</res-ref-name>
>>> <jndi-name>java:/XAHRMDS</jndi-name>
>>> </resource-ref>
>>> <resource-ref>
>>> <res-ref-name>TransactionManager</res-ref-name>
>>> <jndi-name>java:/TransactionManager</jndi-name>
>>> </resource-ref>
>>> ...
>>>
>>> [Domain.xml]
>>> ...
>>> <definition>
>>> <transaction-manager
>>> type="jndi">TransactionManager</transaction-manager>
>>> <store name="j2ee"
>>> classname="org.apache.slide.store.ExtendedStore">
>>> <nodestore
>>> classname="org.apache.slide.store.impl.rdbms.J2EEStore">
>>> <parameter name="datasource">jdbc/HRMDS</parameter>
>>> <parameter
>>> name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter</para
>>>
>>> meter>
>>> </nodestore>
>>> <securitystore>
>>> <reference store="nodestore"/>
>>> </securitystore>
>>> <lockstore>
>>> <reference store="nodestore"/>
>>> </lockstore>
>>> <revisiondescriptorsstore>
>>> <reference store="nodestore"/>
>>> </revisiondescriptorsstore>
>>> <revisiondescriptorstore>
>>> <reference store="nodestore"/>
>>> </revisiondescriptorstore>
>>> <contentstore>
>>> <reference store="nodestore"/>
>>> </contentstore>
>>> </store>
>>> <scope match="/" store="j2ee"/>
>>> </definition>
>>> ...
>>>
>>> [hrm-ds.xml]
>>> ...
>>> <xa-datasource>
>>> <jndi-name>XAHRMDS</jndi-name>
>>> <track-connection-by-tx>true</track-connection-by-tx>
>>>
>>> <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-d
>>>
>>> atasource-class>
>>> <xa-datasource-property
>>> name="ServerName">gnome</xa-datasource-property>
>>> <xa-datasource-property
>>> name="PortNumber">1433</xa-datasource-property>
>>> <xa-datasource-property
>>> name="DatabaseName">hrm</xa-datasource-property>
>>> <xa-datasource-property
>>> name="SelectMethod">cursor</xa-datasource-property>
>>> <xa-datasource-property
>>> name="SendStringParametersAsUnicode">true</xa-datasource-property>
>>> <user-name>sa</user-name>
>>> <password></password>
>>> <min-pool-size>10</min-pool-size>
>>> <max-pool-size>50</max-pool-size>
>>> <blocking-timeout-millis>5000</blocking-timeout-millis>
>>> <idle-timeout-minutes>15</idle-timeout-minutes>
>>> </xa-datasource>
>>> ...
>>>
>>> Please, help me
>>>
>>> By
>>>
>>> Igor Nuzhnov, igor@malva.ua
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>
>>>
>>
>> ------------------------------------------------------------------------
>>
>> Index: AbstractRDBMSStore.java
>> ===================================================================
>> RCS file:
>> /home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/AbstractRDBMSStore.java,v
>>
>> retrieving revision 1.1
>> diff -u -r1.1 AbstractRDBMSStore.java
>> --- AbstractRDBMSStore.java 3 Dec 2003 12:00:46 -0000 1.1
>> +++ AbstractRDBMSStore.java 8 Dec 2003 20:00:54 -0000
>> @@ -344,9 +344,9 @@
>> try {
>> if (id.rollbackOnly) {
>>
>> - conn.rollback();
>> +// conn.rollback();
>> } else {
>> - conn.commit();
>> +// conn.commit();
>> }
>> activeTransactionContext.set(null);
>>
>> @@ -389,12 +389,12 @@
>> throw new XAException(XAException.XAER_NOTA);
>> }
>>
>> - try {
>> - conn.rollback();
>> +// try {
>> +// conn.rollback();
>> activeTransactionContext.set(null);
>> - } catch (SQLException e) {
>> - throw new XAException(XAException.XA_HEURCOM);
>> - } finally {
>> +// } catch (SQLException e) {
>> +// throw new XAException(XAException.XA_HEURCOM);
>> +// } finally {
>> try {
>> conn.close();
>> /* We must always return connections to the pool,
>> @@ -402,7 +402,7 @@
>> } catch (SQLException e) {
>> getLogger().log(e, LOG_CHANNEL, Logger.ERROR);
>> }
>> - }
>> +// }
>> }
>>
>> /**
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: JBoss help
Posted by Grant Gongaware <gg...@itensil.com>.
Hi Igor and Oliver,
My external TM patch still has some problems... I believe my problems
have something to do with the "globalConnection" for calls outside a
transaction.
As for calling commits and rollback on the connection, Jboss has direct
control over a connection returned from a javax.sql.DataSource, and
manages commits and rollbacks since the same connection maybe used in
other parts of the same J2EE transaction.
-Grant
Oliver Zeigermann wrote:
> Hi Igor,
>
> I suppose you use the patch provided by Grant that allows for external
> TMs, right? I have never tried it and did not check with JBoss as
> well, so I can only guess. When I was merging the stores I was really
> wondering if a commit on the XAResource should also commit the
> transaction as one implementation did and another did not. If I
> remember correctly the implementation that was in
> org.apache.slide.store.impl.rdbms before did not, but now does. Did
> you use this implementation before? Slide's TM does not commit the
> transaction, except over the XAResource, I guess JBoss is closer to
> the specification and actually does as it has a full transactional
> resource including the connection and the XAResource. Can any expert
> please check if I am correct here? At least the exceptions you present
> here perfectly match what I suspect...
>
> For now simply try to comment out the rollbacks and commit on the
> connection and see if it works. I suppose you know how to do this, if
> not use the attached patch. Please report back success or failure.
>
> Thanks,
>
> Oliver
>
>
> Igor I. Nuzhnov wrote:
>
>> Hello, all
>> I try to configure Slide from CVS HEAD for work with JBoss 3.2.3
>> I want to use new J2EEStore, but get many transaction errors, such as
>>
>> 15:55:36,750 INFO [STDOUT] 08 Dec 2003 15:55:36 -
>> org.apache.slide.common.Namespace - INFO - Loading namespace slide
>> base data
>> 15:55:36,843 WARN [TransactionImpl] XAException:
>> tx=TransactionImpl:XidImpl
>> [FormatId=257, GlobalId=dwarf//61, BranchQual=] errorCode=XA_HEURCOM
>> javax.transaction.xa.XAException
>> at
>> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.rollback(AbstractRDBMSS
>>
>> tore.java:396)
>> at
>> org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
>>
>> at
>> org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:458)
>> at org.jboss.tm.TxManager.rollback(TxManager.java:264)
>> at
>> org.apache.slide.common.Namespace.loadBaseData(Namespace.java:802)
>> at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
>> at org.apache.slide.common.Domain.init(Domain.java:476)
>> at org.apache.slide.common.Domain.init(Domain.java:410)
>> at org.apache.slide.common.Domain.init(Domain.java:373)
>> at
>> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>> at
>> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
>> ...
>> ...
>> 15:55:38,828 WARN [TransactionImpl] XAException:
>> tx=TransactionImpl:XidImpl
>> [FormatId=257, GlobalId=dwarf//65, BranchQual=] errorCode=XA_RBCOMMFAIL
>> javax.transaction.xa.XAException
>> at
>> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.commit(AbstractRDBMSSto
>>
>> re.java:354)
>> at
>> org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
>> at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
>> at org.jboss.tm.TxManager.commit(TxManager.java:141)
>> at
>> org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessToken
>>
>> Impl.java:452)
>> at
>> org.apache.slide.common.Namespace.loadBaseData(Namespace.java:825)
>> at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
>> at org.apache.slide.common.Domain.init(Domain.java:476)
>> at org.apache.slide.common.Domain.init(Domain.java:410)
>> at org.apache.slide.common.Domain.init(Domain.java:373)
>> at
>> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
>> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>> at
>> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
>> at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
>>
>> 5)
>>
>>
>> Here is my configuration:
>>
>> [web.xml]
>> ...
>> <resource-ref>
>> <res-ref-name>jdbc/HRMDS</res-ref-name>
>> <res-type>javax.sql.DataSource</res-type>
>> <res-auth>Container</res-auth>
>> </resource-ref>
>> <resource-ref>
>> <res-ref-name>TransactionManager</res-ref-name>
>> <res-type>javax.transaction.TransactionManager</res-type>
>> <res-auth>Container</res-auth>
>> </resource-ref>
>> ...
>>
>> [jboss-web.xml]
>> ...
>> <resource-ref>
>> <res-ref-name>jdbc/HRMDS</res-ref-name>
>> <jndi-name>java:/XAHRMDS</jndi-name>
>> </resource-ref>
>> <resource-ref>
>> <res-ref-name>TransactionManager</res-ref-name>
>> <jndi-name>java:/TransactionManager</jndi-name>
>> </resource-ref>
>> ...
>>
>> [Domain.xml]
>> ...
>> <definition>
>> <transaction-manager
>> type="jndi">TransactionManager</transaction-manager>
>> <store name="j2ee"
>> classname="org.apache.slide.store.ExtendedStore">
>> <nodestore
>> classname="org.apache.slide.store.impl.rdbms.J2EEStore">
>> <parameter name="datasource">jdbc/HRMDS</parameter>
>> <parameter
>> name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter</para
>>
>> meter>
>> </nodestore>
>> <securitystore>
>> <reference store="nodestore"/>
>> </securitystore>
>> <lockstore>
>> <reference store="nodestore"/>
>> </lockstore>
>> <revisiondescriptorsstore>
>> <reference store="nodestore"/>
>> </revisiondescriptorsstore>
>> <revisiondescriptorstore>
>> <reference store="nodestore"/>
>> </revisiondescriptorstore>
>> <contentstore>
>> <reference store="nodestore"/>
>> </contentstore>
>> </store>
>> <scope match="/" store="j2ee"/>
>> </definition>
>> ...
>>
>> [hrm-ds.xml]
>> ...
>> <xa-datasource>
>> <jndi-name>XAHRMDS</jndi-name>
>> <track-connection-by-tx>true</track-connection-by-tx>
>>
>> <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-d
>>
>> atasource-class>
>> <xa-datasource-property
>> name="ServerName">gnome</xa-datasource-property>
>> <xa-datasource-property
>> name="PortNumber">1433</xa-datasource-property>
>> <xa-datasource-property
>> name="DatabaseName">hrm</xa-datasource-property>
>> <xa-datasource-property
>> name="SelectMethod">cursor</xa-datasource-property>
>> <xa-datasource-property
>> name="SendStringParametersAsUnicode">true</xa-datasource-property>
>> <user-name>sa</user-name>
>> <password></password>
>> <min-pool-size>10</min-pool-size>
>> <max-pool-size>50</max-pool-size>
>> <blocking-timeout-millis>5000</blocking-timeout-millis>
>> <idle-timeout-minutes>15</idle-timeout-minutes>
>> </xa-datasource>
>> ...
>>
>> Please, help me
>>
>> By
>>
>> Igor Nuzhnov, igor@malva.ua
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>>
>
>------------------------------------------------------------------------
>
>Index: AbstractRDBMSStore.java
>===================================================================
>RCS file: /home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/AbstractRDBMSStore.java,v
>retrieving revision 1.1
>diff -u -r1.1 AbstractRDBMSStore.java
>--- AbstractRDBMSStore.java 3 Dec 2003 12:00:46 -0000 1.1
>+++ AbstractRDBMSStore.java 8 Dec 2003 20:00:54 -0000
>@@ -344,9 +344,9 @@
> try {
> if (id.rollbackOnly) {
>
>- conn.rollback();
>+// conn.rollback();
> } else {
>- conn.commit();
>+// conn.commit();
> }
> activeTransactionContext.set(null);
>
>@@ -389,12 +389,12 @@
> throw new XAException(XAException.XAER_NOTA);
> }
>
>- try {
>- conn.rollback();
>+// try {
>+// conn.rollback();
> activeTransactionContext.set(null);
>- } catch (SQLException e) {
>- throw new XAException(XAException.XA_HEURCOM);
>- } finally {
>+// } catch (SQLException e) {
>+// throw new XAException(XAException.XA_HEURCOM);
>+// } finally {
> try {
> conn.close();
> /* We must always return connections to the pool,
>@@ -402,7 +402,7 @@
> } catch (SQLException e) {
> getLogger().log(e, LOG_CHANNEL, Logger.ERROR);
> }
>- }
>+// }
> }
>
> /**
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
Re: JBoss help
Posted by Oliver Zeigermann <ol...@zeigermann.de>.
Hi Igor,
I suppose you use the patch provided by Grant that allows for external
TMs, right? I have never tried it and did not check with JBoss as well,
so I can only guess. When I was merging the stores I was really
wondering if a commit on the XAResource should also commit the
transaction as one implementation did and another did not. If I remember
correctly the implementation that was in
org.apache.slide.store.impl.rdbms before did not, but now does. Did you
use this implementation before? Slide's TM does not commit the
transaction, except over the XAResource, I guess JBoss is closer to the
specification and actually does as it has a full transactional resource
including the connection and the XAResource. Can any expert please check
if I am correct here? At least the exceptions you present here perfectly
match what I suspect...
For now simply try to comment out the rollbacks and commit on the
connection and see if it works. I suppose you know how to do this, if
not use the attached patch. Please report back success or failure.
Thanks,
Oliver
Igor I. Nuzhnov wrote:
> Hello, all
> I try to configure Slide from CVS HEAD for work with JBoss 3.2.3
> I want to use new J2EEStore, but get many transaction errors, such as
>
> 15:55:36,750 INFO [STDOUT] 08 Dec 2003 15:55:36 -
> org.apache.slide.common.Namespace - INFO - Loading namespace slide base data
> 15:55:36,843 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl
> [FormatId=257, GlobalId=dwarf//61, BranchQual=] errorCode=XA_HEURCOM
> javax.transaction.xa.XAException
> at
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.rollback(AbstractRDBMSS
> tore.java:396)
> at
> org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1664)
> at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:458)
> at org.jboss.tm.TxManager.rollback(TxManager.java:264)
> at
> org.apache.slide.common.Namespace.loadBaseData(Namespace.java:802)
> at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
> at org.apache.slide.common.Domain.init(Domain.java:476)
> at org.apache.slide.common.Domain.init(Domain.java:410)
> at org.apache.slide.common.Domain.init(Domain.java:373)
> at
> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
> at
> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
> ...
> ...
> 15:55:38,828 WARN [TransactionImpl] XAException: tx=TransactionImpl:XidImpl
> [FormatId=257, GlobalId=dwarf//65, BranchQual=] errorCode=XA_RBCOMMFAIL
> javax.transaction.xa.XAException
> at
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.commit(AbstractRDBMSSto
> re.java:354)
> at
> org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1593)
> at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
> at org.jboss.tm.TxManager.commit(TxManager.java:141)
> at
> org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessToken
> Impl.java:452)
> at
> org.apache.slide.common.Namespace.loadBaseData(Namespace.java:825)
> at org.apache.slide.common.Domain.initNamespace(Domain.java:857)
> at org.apache.slide.common.Domain.init(Domain.java:476)
> at org.apache.slide.common.Domain.init(Domain.java:410)
> at org.apache.slide.common.Domain.init(Domain.java:373)
> at
> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:294)
> at javax.servlet.GenericServlet.init(GenericServlet.java:256)
> at
> org.apache.slide.webdav.WebdavServlet.init(WebdavServlet.java:236)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
> 5)
>
>
> Here is my configuration:
>
> [web.xml]
> ...
> <resource-ref>
> <res-ref-name>jdbc/HRMDS</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> <resource-ref>
> <res-ref-name>TransactionManager</res-ref-name>
> <res-type>javax.transaction.TransactionManager</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> ...
>
> [jboss-web.xml]
> ...
> <resource-ref>
> <res-ref-name>jdbc/HRMDS</res-ref-name>
> <jndi-name>java:/XAHRMDS</jndi-name>
> </resource-ref>
> <resource-ref>
> <res-ref-name>TransactionManager</res-ref-name>
> <jndi-name>java:/TransactionManager</jndi-name>
> </resource-ref>
> ...
>
> [Domain.xml]
> ...
> <definition>
> <transaction-manager
> type="jndi">TransactionManager</transaction-manager>
> <store name="j2ee"
> classname="org.apache.slide.store.ExtendedStore">
> <nodestore
> classname="org.apache.slide.store.impl.rdbms.J2EEStore">
> <parameter name="datasource">jdbc/HRMDS</parameter>
> <parameter
> name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter</para
> meter>
> </nodestore>
> <securitystore>
> <reference store="nodestore"/>
> </securitystore>
> <lockstore>
> <reference store="nodestore"/>
> </lockstore>
> <revisiondescriptorsstore>
> <reference store="nodestore"/>
> </revisiondescriptorsstore>
> <revisiondescriptorstore>
> <reference store="nodestore"/>
> </revisiondescriptorstore>
> <contentstore>
> <reference store="nodestore"/>
> </contentstore>
> </store>
> <scope match="/" store="j2ee"/>
> </definition>
> ...
>
> [hrm-ds.xml]
> ...
> <xa-datasource>
> <jndi-name>XAHRMDS</jndi-name>
> <track-connection-by-tx>true</track-connection-by-tx>
>
> <xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-d
> atasource-class>
> <xa-datasource-property name="ServerName">gnome</xa-datasource-property>
> <xa-datasource-property name="PortNumber">1433</xa-datasource-property>
> <xa-datasource-property name="DatabaseName">hrm</xa-datasource-property>
> <xa-datasource-property
> name="SelectMethod">cursor</xa-datasource-property>
> <xa-datasource-property
> name="SendStringParametersAsUnicode">true</xa-datasource-property>
> <user-name>sa</user-name>
> <password></password>
> <min-pool-size>10</min-pool-size>
> <max-pool-size>50</max-pool-size>
> <blocking-timeout-millis>5000</blocking-timeout-millis>
> <idle-timeout-minutes>15</idle-timeout-minutes>
> </xa-datasource>
> ...
>
> Please, help me
>
> By
>
> Igor Nuzhnov, igor@malva.ua
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>