You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(22) |
Jul
(4) |
Aug
(9) |
Sep
(6) |
Oct
(5) |
Nov
(15) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(4) |
Feb
(10) |
Mar
(12) |
Apr
(16) |
May
(2) |
Jun
(7) |
Jul
(10) |
Aug
(9) |
Sep
(3) |
Oct
(17) |
Nov
(17) |
Dec
(6) |
2003 |
Jan
(12) |
Feb
(15) |
Mar
(25) |
Apr
(20) |
May
(8) |
Jun
(3) |
Jul
(21) |
Aug
(10) |
Sep
(7) |
Oct
(1) |
Nov
(3) |
Dec
(6) |
2004 |
Jan
(5) |
Feb
(16) |
Mar
(34) |
Apr
(26) |
May
(20) |
Jun
(58) |
Jul
(76) |
Aug
(51) |
Sep
(40) |
Oct
(16) |
Nov
(7) |
Dec
(6) |
2005 |
Jan
(10) |
Feb
(1) |
Mar
(17) |
Apr
(8) |
May
(11) |
Jun
(15) |
Jul
(1) |
Aug
(7) |
Sep
(6) |
Oct
(10) |
Nov
(14) |
Dec
(9) |
2006 |
Jan
(11) |
Feb
(22) |
Mar
(17) |
Apr
(1) |
May
(15) |
Jun
(9) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(10) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2008 |
Jan
(2) |
Feb
(1) |
Mar
(8) |
Apr
(8) |
May
(12) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thomas M. <th...@sn...> - 2006-02-07 22:54:56
|
am 07.02.2006 13:41 Uhr schrieb Lars Heuer unter he...@se...: > I suspect that this is a valid example. s"something" refers to a > topic map construct and this shouldn't be a valid input for the > source-locator predicate. You're right, I substituted the string argument for a locator argument because Tolog would not acccept the string. > In short: There is no way to fecth an object by its item identifier, > subject identifier, or subject locator until the parser and predicates > are fixed. > I'll provide some patches in the next few days. Well, that'd be the perfect solution :-). Thanks a lot! bye, Thomas |
From: Lars H. <he...@se...> - 2006-02-07 12:36:58
|
Hi Thomas, [...] > I tried another example from Ontopia's predicate reference, which should do > exactly what I want: > select $T from topic($T),source-locator($T,s"mybase#myid")? I suspect that this is a valid example. s"something" refers to a topic map construct and this shouldn't be a valid input for the source-locator predicate. [...] > But again I get 0 results with TM4J-Tolog... Is there any other way of > finding a topic by a given id or source locator? (It works if I use the Java > API, but I need to use Tolog in this case.) I identified the problem: All predicates that are able to handle URIs (such as baselocator, subject-identifier, subject-locator, source-locator) check if the URI part is a Locator instance. But this condition never evaluates to true because the TologParser never creates Locator instances as input for predicates. They should check for a String instance instead of a Locator instance. And all results they produce should also be String instances (Locator.getAddress()) instead of the Locator object instances. But that does not solve the whole problem, because the TologParser does not handle URIs / Strings as input very well. This needs also be fixed. In short: There is no way to fecth an object by its item identifier, subject identifier, or subject locator until the parser and predicates are fixed. I'll provide some patches in the next few days. Best regards, Lars -- http://semagia.com |
From: Thomas M. <th...@sn...> - 2006-02-06 11:17:04
|
Hi Lars, >> select $T from source-locator($T,s"mybase#myid") ? > Just a guess (did not tried it): is the 's' prefix necessary? Yes - if I omit it, I'll get a TologParserException. I tried another example from Ontopia's predicate reference, which should do exactly what I want: select $T from topic($T),source-locator($T,s"mybase#myid")? or simpler select $T from topic($T),source-locator($T,myid)? But again I get 0 results with TM4J-Tolog... Is there any other way of finding a topic by a given id or source locator? (It works if I use the Java API, but I need to use Tolog in this case.) bye, Thomas |
From: Lars H. <he...@se...> - 2006-02-05 18:31:11
|
Hi Thomas, [...] > is it possible with Tolog (from TM4J 0.9.7) to construct a query string that > finds exactly one topic with a given id or source locator? > select $T from source-locator($T,s"mybase#myid") ? [...] Just a guess (did not tried it): is the 's' prefix necessary? If you're calling the source-locator predicate tolog should already know that you're searching for a source locator. I believe that the tolog processor interprets the 's"mybase#myid" as the pattern it should match and since there is no source locator that matches the result is empty. Best regards, Lars -- http://semagia.com |
From: Thomas M. <th...@sn...> - 2006-01-31 18:45:54
|
Hi, is it possible with Tolog (from TM4J 0.9.7) to construct a query string that finds exactly one topic with a given id or source locator? I tried select $T from source-locator($T,s"mybase#myid") ? but it returns 0 matches. The source locator definitely exists, because if I use a non-existing locator, an exception is thrown. select $T,$LOC from source-locator($T,$LOC) ? works without problems and lists all topics and their locators. Any ideas? Thanks & bye, Thomas |
From: Lars H. <he...@se...> - 2006-01-31 15:43:16
|
Hi Magnus, [...] > I'm off to re-implement a large topicmap application based on Python, > using TM4J. Huess you'll be hearing a lot from me the next couple of > months ;) Another possibility is to use the TMAPI interfaces, so you're independent of the TM4J API and you can port the application to other topic map engines. Have a look at http://tmapi.org/ Best regards, Lars -- http://semagia.com |
From: <mag...@st...> - 2006-01-30 22:02:26
|
thanks guys! I see now that I obviously should have been able to get that out of the javadocs.. oh well. I'm off to re-implement a large topicmap application based on Python, using TM4J. Huess you'll be hearing a lot from me the next couple of months ;) Kal Ahmed wrote: > Hi Magnus > > Your import is wrong. The Topic interface is actually defined in the package > org.tm4j.topicmap. Change your import to: > > import org.tm4j.topicmap.*; > > (or better: import org.tm4j.topicmap.Topic; ) > > Cheers > > Kal > > >>-----Original Message----- >>From: tm4...@li... [mailto:tm4j-users- >>ad...@li...] On Behalf Of Magnus Folgerø >>Sent: 30 January 2006 19:35 >>To: Lars Heuer >>Cc: tm4...@li... >>Subject: Re: [TM4J-users] Need help getting started using TM4J >> >>it's as simple as this, but "Topic cannot be resolved to a type" >> >> >>/*****************************************/ >>import org.tm4j.*; >> >>public class MyClass { >> >> Topic tp; >> /** >> * @param args >> */ >> public static void main(String[] args) { >> // TODO Auto-generated method stub >> >> }//main >> >>}//class >>/*****************************************/ >> >>Lars Heuer wrote: >> >>>Hi Magnus, >>> >>> >>> >>>>thx for the reply! alas, I still don't get it rigth: >>> >>> >>>>I'm not quite sure which .jar to add in the build-path, so I just added >>>>the lot. But I'm not able to use classes like TopicMap [TopicMap cannot >>>>be resolved to a type] >>> >>>[...] >>> >>> >>>>$ cat tm4j_test/.classpath >>> >>>[...] >>> >>>Cannot see a failure here. >>> >>>Are you trying to work with TMAPI? >>> >>>What kind of imports do you have in "MyClass.java"? >>> >>>Can you post an excerpt of your class? >>> >>>Best regards, >>>Lars >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: Splunk Inc. Do you grep through log >>files >>for problems? Stop! Download the new AJAX search engine that makes >>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 >>_______________________________________________ >>Tm4j-users mailing list >>Tm4...@li... >>https://lists.sourceforge.net/lists/listinfo/tm4j-users >> > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642 > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users |
From: Kal A. <ka...@te...> - 2006-01-30 21:49:16
|
Hi Magnus Your import is wrong. The Topic interface is actually defined in the = package org.tm4j.topicmap. Change your import to: import org.tm4j.topicmap.*; (or better: import org.tm4j.topicmap.Topic; ) Cheers Kal > -----Original Message----- > From: tm4...@li... [mailto:tm4j-users- > ad...@li...] On Behalf Of Magnus Folger=F8 > Sent: 30 January 2006 19:35 > To: Lars Heuer > Cc: tm4...@li... > Subject: Re: [TM4J-users] Need help getting started using TM4J >=20 > it's as simple as this, but "Topic cannot be resolved to a type" >=20 >=20 > /*****************************************/ > import org.tm4j.*; >=20 > public class MyClass { >=20 > Topic tp; > /** > * @param args > */ > public static void main(String[] args) { > // TODO Auto-generated method stub >=20 > }//main >=20 > }//class > /*****************************************/ >=20 > Lars Heuer wrote: > > Hi Magnus, > > > > > >>thx for the reply! alas, I still don't get it rigth: > > > > > >>I'm not quite sure which .jar to add in the build-path, so I just = added > >>the lot. But I'm not able to use classes like TopicMap [TopicMap = cannot > >>be resolved to a type] > > > > [...] > > > >>$ cat tm4j_test/.classpath > > > > [...] > > > > Cannot see a failure here. > > > > Are you trying to work with TMAPI? > > > > What kind of imports do you have in "MyClass.java"? > > > > Can you post an excerpt of your class? > > > > Best regards, > > Lars >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD = SPLUNK! > = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D= 121642 > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users >=20 |
From: <mag...@st...> - 2006-01-30 19:35:40
|
it's as simple as this, but "Topic cannot be resolved to a type" /*****************************************/ import org.tm4j.*; public class MyClass { Topic tp; /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub }//main }//class /*****************************************/ Lars Heuer wrote: > Hi Magnus, > > >>thx for the reply! alas, I still don't get it rigth: > > >>I'm not quite sure which .jar to add in the build-path, so I just added >>the lot. But I'm not able to use classes like TopicMap [TopicMap cannot >>be resolved to a type] > > [...] > >>$ cat tm4j_test/.classpath > > [...] > > Cannot see a failure here. > > Are you trying to work with TMAPI? > > What kind of imports do you have in "MyClass.java"? > > Can you post an excerpt of your class? > > Best regards, > Lars |
From: Kal A. <ka...@te...> - 2006-01-30 09:21:47
|
Hi Sri, The documentation you need is in the Developer's Guide: http://tm4j.org/tm4j/docs/devguide/ch03s05.html Check out example 3.5 for an example of the configuration you need to connect to a MySQL database. If you are still having problems, it would be useful if you can tell us what messages / exception stack traces you are getting from your application and provide some code that shows how you are trying to open the Hibernate TopicMapProvider. Cheers Kal > -----Original Message----- > From: tm4...@li... [mailto:tm4j-users- > ad...@li...] On Behalf Of Sri Kompella > Sent: 23 January 2006 15:36 > To: tm4...@li... > Cc: dic...@ws... > Subject: [TM4J-users] How to open a topicmap using hibernate RDBMS > > Hello, > > > > > > My name is Sri. I'm very new to the TopicMaps and > > a first > > > time user of this mailing list. > > > So far we have been using in-memory topicmaps. But > > since the > > > number of topics are increasing day by day we are > > in need of > > > using Hibernate MySql. > > > So far, I was able to save the TopicMap in MySql > > database > > > using hibernate backend. But the problem is, I am > > trying to > > > open the TopicMap from the hibernate and do not > > know how to > > > do it. I looked at the TM4J documentation but > > could not find > > > any. I was wondering if anyone has ever done this > > before or > > > has any idea on how to work on this. > > > I would really appreciate if anyone of you could > > throw me > > > some light into this. > > > > > > Regards, > > > Sri Kompella > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users > |
From: Lars H. <he...@se...> - 2006-01-29 21:40:28
|
Hi Magnus, > thx for the reply! alas, I still don't get it rigth: > I'm not quite sure which .jar to add in the build-path, so I just added > the lot. But I'm not able to use classes like TopicMap [TopicMap cannot > be resolved to a type] [...] > $ cat tm4j_test/.classpath [...] Cannot see a failure here. Are you trying to work with TMAPI? What kind of imports do you have in "MyClass.java"? Can you post an excerpt of your class? Best regards, Lars -- http://semagia.com |
From: <mag...@st...> - 2006-01-25 14:02:10
|
thx for the reply! alas, I still don't get it rigth: I'm not quite sure which .jar to add in the build-path, so I just added the lot. But I'm not able to use classes like TopicMap [TopicMap cannot be resolved to a type] my sourcetree looks like this: $ tree -a tm4j_test/ tm4j_test/ |-- .classpath |-- .project |-- bin | `-- MyClass.class |-- libs | |-- ant.jar | |-- antlr.jar | |-- commons-beanutils.jar | |-- commons-collections.jar | |-- commons-digester.jar | |-- commons-logging.jar | |-- hibernate | | |-- ************* | |-- jakarta-regexp.jar | |-- jargs.jar | |-- junit.jar | |-- log4j-1.2.8.jar | |-- lucene-1.3-final.jar | |-- mango.jar | |-- optional.jar | |-- ozone | | |-- log4j-1.2.jar | | `-- ozone-1.1.jar | |-- resolver.jar | |-- tm4j-0.9.7.jar | |-- tm4j-tmapi-0.9.7.jar | |-- tm4j-tologx-0.9.7.jar | |-- tm4jadmintool-0.9.7.jar | |-- tm4jdbc-0.9.7.jar | |-- tm4ozone-0.9.7.jar | |-- tmapi-1_0.jar | |-- tmapi-test-1_0.jar | |-- xercesImpl.jar | `-- xmlParserAPIs.jar `-- src `-- MyClass.java ...and my .classpath: $ cat tm4j_test/.classpath <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="lib" path="libs/ant.jar"/> <classpathentry kind="lib" path="libs/antlr.jar"/> <classpathentry kind="lib" path="libs/commons-beanutils.jar"/> <classpathentry kind="lib" path="libs/commons-collections.jar"/> <classpathentry kind="lib" path="libs/commons-digester.jar"/> <classpathentry kind="lib" path="libs/commons-logging.jar"/> <classpathentry kind="lib" path="libs/jakarta-regexp.jar"/> <classpathentry kind="lib" path="libs/jargs.jar"/> <classpathentry kind="lib" path="libs/junit.jar"/> <classpathentry kind="lib" path="libs/log4j-1.2.8.jar"/> <classpathentry kind="lib" path="libs/lucene-1.3-final.jar"/> <classpathentry kind="lib" path="libs/mango.jar"/> <classpathentry kind="lib" path="libs/optional.jar"/> <classpathentry kind="lib" path="libs/resolver.jar"/> <classpathentry kind="lib" path="libs/tm4j-0.9.7.jar"/> <classpathentry kind="lib" path="libs/tm4jadmintool-0.9.7.jar"/> <classpathentry kind="lib" path="libs/tm4jdbc-0.9.7.jar"/> <classpathentry kind="lib" path="libs/tm4j-tmapi-0.9.7.jar"/> <classpathentry kind="lib" path="libs/tm4j-tologx-0.9.7.jar"/> <classpathentry kind="lib" path="libs/tm4ozone-0.9.7.jar"/> <classpathentry kind="lib" path="libs/tmapi-1_0.jar"/> <classpathentry kind="lib" path="libs/tmapi-test-1_0.jar"/> <classpathentry kind="lib" path="libs/xercesImpl.jar"/> <classpathentry kind="lib" path="libs/xmlParserAPIs.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Lars Heuer wrote: > Hi Magnus, > > [Eclipse] > >>Problem is that I can't even remember how to use imported libs like tm4j :/ > > > File -> New -> Project -> Java Project > > I prefer to create a folder "libs" where I copy the needed .jars and > then you can do a right click on the .jars and add them via Build > Path -> Add to Build Path. > > An alternative might be to have the TM4J in its own project and create > a dependency between your project and the TM4J project. > I.e. via: > <https://sourceforge.net/mailarchive/message.php?msg_id=13951686> > > HTH and best regards, > Lars |
From: Sri K. <rav...@ro...> - 2006-01-23 15:36:30
|
Hello, > > > > My name is Sri. I'm very new to the TopicMaps and > a first > > time user of this mailing list. > > So far we have been using in-memory topicmaps. But > since the > > number of topics are increasing day by day we are > in need of > > using Hibernate MySql. > > So far, I was able to save the TopicMap in MySql > database > > using hibernate backend. But the problem is, I am > trying to > > open the TopicMap from the hibernate and do not > know how to > > do it. I looked at the TM4J documentation but > could not find > > any. I was wondering if anyone has ever done this > before or > > has any idea on how to work on this. > > I would really appreciate if anyone of you could > throw me > > some light into this. > > > > Regards, > > Sri Kompella __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Lars H. <he...@se...> - 2006-01-18 13:05:12
|
Hi Magnus, [Eclipse] > Problem is that I can't even remember how to use imported libs like tm4j :/ File -> New -> Project -> Java Project I prefer to create a folder "libs" where I copy the needed .jars and then you can do a right click on the .jars and add them via Build Path -> Add to Build Path. An alternative might be to have the TM4J in its own project and create a dependency between your project and the TM4J project. I.e. via: <https://sourceforge.net/mailarchive/message.php?msg_id=13951686> HTH and best regards, Lars -- http://semagia.com |
From: <mag...@st...> - 2006-01-18 12:40:59
|
hi guys I need help setting up TM4J on my Linux system. I want to start using TM4J with Eclipse, but it's been a while since the last time I did anything with Java, so I'm kinda rusty... Problem is that I can't even remember how to use imported libs like tm4j :/ how do I install tm4j on my system, and how do I create a project in eclipse that finds tm4j? I found the docs on the web kinda short and incomplete... -- best regards Magnus |
From: George T. <geo...@fr...> - 2005-12-28 19:20:47
|
Hi Kal That was it, it works OK now Thank you ----- Original Message -----=20 From: "Kal Ahmed" <ka...@te...> To: "'George Tryfon'" <geo...@fr...>; <tm4...@li...> Sent: Wednesday, December 28, 2005 8:16 PM Subject: RE: [TM4J-users] Hibernate Transactions question Hi George, You need to keep a flag that tracks if your getRemoteTologTmos operation opened the transaction, and then if it did, simply close the transaction using providerTransaction.abort(); - this drops the transaction completel= y without committing any changes and because your method only does a query, its OK to close with an abort() rather than a commit(). Cheers, Kal > -----Original Message----- > From: George Tryfon [mailto:geo...@fr...] > Sent: 27 December 2005 21:58 > To: tm4...@li...; ka...@te... > Subject: Re: [TM4J-users] Hibernate Transactions question > > I found this for the Hibernate Transaction. > > The transaction remain open after I call a Tolog query > (bypassing the TMAPI) > > public String[] getRemoteTologTmos (String tmName, String query, Stri= ng > colonName) throws RemoteException > { > try > { > TopicMap _tm =3D TMHelper.getDefault().getTopicMap(tmName); > > org.tm4j.topicmap.TopicMap tm =3D Wrapper.unwrap(_tm); > //_tm.getWrapped()); > QueryEvaluator qe =3D QueryEvaluatorFactory.newQueryEvaluator (tm= ); > > //TODO: add rules here... > //qe.addRule ("t($T) :- topic($T)."); > > org.tm4j.topicmap.TopicMapProvider provider =3D tm.getProvider ()= ; > > ProviderTransaction providerTransaction =3D > provider.getOpenTransaction(); > if (providerTransaction =3D=3D null) > providerTransaction =3D provider.openTransaction(); > System.out.println (query); //<> > > TologResultsSet rSet =3D qe.execute (query); > > System.out.println ("execution done."); //<> > int colonIndex =3D -1; > for (int c=3D0; c<rSet.getNumCols(); c++) > { > if (rSet.getVar(c).equals(colonName)) > colonIndex =3D c; > } > > Vector<String> v =3D new Vector<String> (); > for (int i=3D0; i<rSet.getNumRows(); i++) > { > List list =3D rSet.getRow (i); > org.tm4j.topicmap.TopicMapObject tmo =3D > (org.tm4j.topicmap.TopicMapObject)list.get (colonIndex); > v.add (tmo.getID()); > } > > return v.toArray(new String[0]); > } > catch (Exception ex) > { > throw new RemoteException (ex.getMessage(), ex); > } > } > > > what is your suggestion in order to close the transaction? > Cheers, > > George > > > ----- Original Message ----- > From: "Kal Ahmed" <ka...@te...> > To: "'George Tryfon'" <geo...@fr...>; > <tm4...@li...> > Sent: Tuesday, December 27, 2005 5:30 PM > Subject: RE: [TM4J-users] Hibernate Transactions question > > > Hi George, > > That sounds strange - the save code by itself should always be doing it= s > work in its own transaction, if the provider has no open transaction, a= s > you > can see in the code you copied in your message. I wonder if there is so= me > other call which is starting a transaction and failing to close it (it > might > be in your code, or in the TM4J persistence layer). To track this down, > perhaps you can insert logging statements in various places in your cod= e - > especially at request start and end - to see if the provider has an ope= n > transaction or not. I'm guessing that you are holding the TopicMap obje= ct > between requests ? > > The work-around for this might be to wrap all of your operations for a > single request in one or more transactions (i.e. use the openTransactio= n() > and commit() methods explicitly). > > Cheers, > > Kal > > > -----Original Message----- > > From: tm4...@li... [mailto:tm4j-users- > > ad...@li...] On Behalf Of George Tryfon > > Sent: 26 December 2005 13:59 > > To: tm4...@li... > > Subject: [TM4J-users] Hibernate Transactions question > > > > Hello, > > I am developing a TMAPI server using SOAP web services > > the server uses Hibernate and MySQL. > > > > When I create a new TopicMap, the save function inside the > > "org.tm4j.topicmap.hibernate.TopicMapFactoryImpl" > > finds that the transaction is closed, opens a new one and saves the > > changes > > in the database. > > > > the next time I open the TopicMap, again the transaction is closed, a= nd > > the > > function does the > > same thing, and saves the changes. > > > > The third time? > > Something strange is happening here from the third time and after. > > the transaction found open, the change happens but not saved inside t= he > > database. > > I suppose because there is no commit() > > When I close the server and I start it again, all the changes without > the > > commit() are gone! > > I didn't have this problem when I tried to do the same thing using RM= I > > server and Hibernate > > (I am using SOAP now) > > > > There is more than a week now where I am puzled with this and any hin= t, > > idea, anything, would be highly appreciated > > > > could be a good idea to force closing the transaction, or commit? > > > > Thank you in advance. > > Cheers > > > > > > protected void save(PersistenceWrapper tmobject, String id) throws > > DuplicateObjectIDException > > { > > if (id =3D=3D null) > > { > > id =3D m_idgen.getID(); > > } > > > > try > > { > > TopicMapObjectDataObject dataObject =3D ((TopicMapObjectDataOb= ject) > > tmobject.m_dataObject); > > > > if (m_provider.isTransactionOpen()) > > { > > System.out.println ("transaction is open"); > > checkID(m_provider.getOpenTransaction(), id); > > dataObject.setObjectId(id); > > > > TopicMapDataObject tmdo =3D (TopicMapDataObject) > > PersistenceWrapper.load(m_provider.getOpenTransaction(),m_topicMap); > > dataObject.setTopicMap(tmdo); > > PersistenceWrapper.persist(m_provider.getOpenTransaction()= , > > tmobject); > > } > > else > > { > > System.out.println ("transaction is closed"); > > ProviderTransaction txn =3D m_provider.openTransaction(); > > > > try > > { > > checkID(m_provider.getOpenTransaction(), id); > > dataObject.setObjectId(id); > > > > TopicMapDataObject tmdo =3D (TopicMapDataObject) > > PersistenceWrapper.load(txn,m_topicMap); > > dataObject.setTopicMap(tmdo); > > PersistenceWrapper.persist(txn, tmobject); > > txn.commit(); > > } > > catch (Exception ex) > > { > > txn.rollback(); > > throw ex; > > } > > } > > > > if (tmobject instanceof TopicImpl) > > { > > > > m_provider.registerTopic(tmobject.getPersistenceId(),(TopicImpl) > > tmobject); > > } > > } > > catch (DuplicateObjectIDException ex) > > { > > throw ex; > > } > > catch (Exception ex) > > { > > throw new TopicMapRuntimeException("Storage Exception.", ex); > > } > > } > > > > > > ____________________________________________________________________ > > http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 = =E7=EB=E5=EA=F4=F1=EF=ED=E9=EA=EF=FD =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5= . > > http://www.freemail.gr - free email service for the Greek-speaking. > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through lo= g > > files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUN= K! > > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > > _______________________________________________ > > Tm4j-users mailing list > > Tm4...@li... > > https://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dick > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users > > > ____________________________________________________________________ > http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 =E7= =EB=E5=EA=F4=F1=EF=ED=E9=EA=EF=FD =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. > http://www.freemail.gr - free email service for the Greek-speaking. > ____________________________________________________________________ http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 =E7=EB= =E5=EA=F4=F1=EF=ED=E9=EA=EF=FD =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. http://www.freemail.gr - free email service for the Greek-speaking. |
From: Kal A. <ka...@te...> - 2005-12-28 18:57:16
|
Hi George, You need to keep a flag that tracks if your getRemoteTologTmos operation opened the transaction, and then if it did, simply close the transaction using providerTransaction.abort(); - this drops the transaction = completely without committing any changes and because your method only does a = query, its OK to close with an abort() rather than a commit(). Cheers, Kal > -----Original Message----- > From: George Tryfon [mailto:geo...@fr...] > Sent: 27 December 2005 21:58 > To: tm4...@li...; ka...@te... > Subject: Re: [TM4J-users] Hibernate Transactions question >=20 > I found this for the Hibernate Transaction. >=20 > The transaction remain open after I call a Tolog query > (bypassing the TMAPI) >=20 > public String[] getRemoteTologTmos (String tmName, String query, = String > colonName) throws RemoteException > { > try > { > TopicMap _tm =3D TMHelper.getDefault().getTopicMap(tmName); >=20 > org.tm4j.topicmap.TopicMap tm =3D Wrapper.unwrap(_tm); > //_tm.getWrapped()); > QueryEvaluator qe =3D QueryEvaluatorFactory.newQueryEvaluator = (tm); >=20 > //TODO: add rules here... > //qe.addRule ("t($T) :- topic($T)."); >=20 > org.tm4j.topicmap.TopicMapProvider provider =3D tm.getProvider = (); >=20 > ProviderTransaction providerTransaction =3D > provider.getOpenTransaction(); > if (providerTransaction =3D=3D null) > providerTransaction =3D provider.openTransaction(); > System.out.println (query); //<> >=20 > TologResultsSet rSet =3D qe.execute (query); >=20 > System.out.println ("execution done."); //<> > int colonIndex =3D -1; > for (int c=3D0; c<rSet.getNumCols(); c++) > { > if (rSet.getVar(c).equals(colonName)) > colonIndex =3D c; > } >=20 > Vector<String> v =3D new Vector<String> (); > for (int i=3D0; i<rSet.getNumRows(); i++) > { > List list =3D rSet.getRow (i); > org.tm4j.topicmap.TopicMapObject tmo =3D > (org.tm4j.topicmap.TopicMapObject)list.get (colonIndex); > v.add (tmo.getID()); > } >=20 > return v.toArray(new String[0]); > } > catch (Exception ex) > { > throw new RemoteException (ex.getMessage(), ex); > } > } >=20 >=20 > what is your suggestion in order to close the transaction? > Cheers, >=20 > George >=20 >=20 > ----- Original Message ----- > From: "Kal Ahmed" <ka...@te...> > To: "'George Tryfon'" <geo...@fr...>; > <tm4...@li...> > Sent: Tuesday, December 27, 2005 5:30 PM > Subject: RE: [TM4J-users] Hibernate Transactions question >=20 >=20 > Hi George, >=20 > That sounds strange - the save code by itself should always be doing = its > work in its own transaction, if the provider has no open transaction, = as > you > can see in the code you copied in your message. I wonder if there is = some > other call which is starting a transaction and failing to close it (it > might > be in your code, or in the TM4J persistence layer). To track this = down, > perhaps you can insert logging statements in various places in your = code - > especially at request start and end - to see if the provider has an = open > transaction or not. I'm guessing that you are holding the TopicMap = object > between requests ? >=20 > The work-around for this might be to wrap all of your operations for a > single request in one or more transactions (i.e. use the = openTransaction() > and commit() methods explicitly). >=20 > Cheers, >=20 > Kal >=20 > > -----Original Message----- > > From: tm4...@li... [mailto:tm4j-users- > > ad...@li...] On Behalf Of George Tryfon > > Sent: 26 December 2005 13:59 > > To: tm4...@li... > > Subject: [TM4J-users] Hibernate Transactions question > > > > Hello, > > I am developing a TMAPI server using SOAP web services > > the server uses Hibernate and MySQL. > > > > When I create a new TopicMap, the save function inside the > > "org.tm4j.topicmap.hibernate.TopicMapFactoryImpl" > > finds that the transaction is closed, opens a new one and saves the > > changes > > in the database. > > > > the next time I open the TopicMap, again the transaction is closed, = and > > the > > function does the > > same thing, and saves the changes. > > > > The third time? > > Something strange is happening here from the third time and after. > > the transaction found open, the change happens but not saved inside = the > > database. > > I suppose because there is no commit() > > When I close the server and I start it again, all the changes = without > the > > commit() are gone! > > I didn't have this problem when I tried to do the same thing using = RMI > > server and Hibernate > > (I am using SOAP now) > > > > There is more than a week now where I am puzled with this and any = hint, > > idea, anything, would be highly appreciated > > > > could be a good idea to force closing the transaction, or commit? > > > > Thank you in advance. > > Cheers > > > > > > protected void save(PersistenceWrapper tmobject, String id) throws > > DuplicateObjectIDException > > { > > if (id =3D=3D null) > > { > > id =3D m_idgen.getID(); > > } > > > > try > > { > > TopicMapObjectDataObject dataObject =3D = ((TopicMapObjectDataObject) > > tmobject.m_dataObject); > > > > if (m_provider.isTransactionOpen()) > > { > > System.out.println ("transaction is open"); > > checkID(m_provider.getOpenTransaction(), id); > > dataObject.setObjectId(id); > > > > TopicMapDataObject tmdo =3D (TopicMapDataObject) > > PersistenceWrapper.load(m_provider.getOpenTransaction(),m_topicMap); > > dataObject.setTopicMap(tmdo); > > = PersistenceWrapper.persist(m_provider.getOpenTransaction(), > > tmobject); > > } > > else > > { > > System.out.println ("transaction is closed"); > > ProviderTransaction txn =3D m_provider.openTransaction(); > > > > try > > { > > checkID(m_provider.getOpenTransaction(), id); > > dataObject.setObjectId(id); > > > > TopicMapDataObject tmdo =3D (TopicMapDataObject) > > PersistenceWrapper.load(txn,m_topicMap); > > dataObject.setTopicMap(tmdo); > > PersistenceWrapper.persist(txn, tmobject); > > txn.commit(); > > } > > catch (Exception ex) > > { > > txn.rollback(); > > throw ex; > > } > > } > > > > if (tmobject instanceof TopicImpl) > > { > > > > m_provider.registerTopic(tmobject.getPersistenceId(),(TopicImpl) > > tmobject); > > } > > } > > catch (DuplicateObjectIDException ex) > > { > > throw ex; > > } > > catch (Exception ex) > > { > > throw new TopicMapRuntimeException("Storage Exception.", ex); > > } > > } > > > > > > ____________________________________________________________________ > > http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 = =E7=EB=E5=EA=F4=F1=EF=ED=E9=EA=EF=FD = =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. > > http://www.freemail.gr - free email service for the Greek-speaking. > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through = log > > files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD = SPLUNK! > > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > > _______________________________________________ > > Tm4j-users mailing list > > Tm4...@li... > > https://lists.sourceforge.net/lists/listinfo/tm4j-users > > >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD = SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dick > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users >=20 >=20 > ____________________________________________________________________ > http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 = =E7=EB=E5=EA=F4=F1=EF=ED=E9=EA=EF=FD = =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. > http://www.freemail.gr - free email service for the Greek-speaking. >=20 |
From: George T. <geo...@fr...> - 2005-12-27 21:59:03
|
I found this for the Hibernate Transaction. The transaction remain open after I call a Tolog query (bypassing the TMAPI) public String[] getRemoteTologTmos (String tmName, String query, String= =20 colonName) throws RemoteException { try { TopicMap _tm =3D TMHelper.getDefault().getTopicMap(tmName); org.tm4j.topicmap.TopicMap tm =3D Wrapper.unwrap(_tm);=20 //_tm.getWrapped()); QueryEvaluator qe =3D QueryEvaluatorFactory.newQueryEvaluator (tm); //TODO: add rules here... //qe.addRule ("t($T) :- topic($T)."); org.tm4j.topicmap.TopicMapProvider provider =3D tm.getProvider (); ProviderTransaction providerTransaction =3D=20 provider.getOpenTransaction(); if (providerTransaction =3D=3D null) providerTransaction =3D provider.openTransaction(); System.out.println (query); //<> TologResultsSet rSet =3D qe.execute (query); System.out.println ("execution done."); //<> int colonIndex =3D -1; for (int c=3D0; c<rSet.getNumCols(); c++) { if (rSet.getVar(c).equals(colonName)) colonIndex =3D c; } Vector<String> v =3D new Vector<String> (); for (int i=3D0; i<rSet.getNumRows(); i++) { List list =3D rSet.getRow (i); org.tm4j.topicmap.TopicMapObject tmo =3D=20 (org.tm4j.topicmap.TopicMapObject)list.get (colonIndex); v.add (tmo.getID()); } return v.toArray(new String[0]); } catch (Exception ex) { throw new RemoteException (ex.getMessage(), ex); } } what is your suggestion in order to close the transaction? Cheers, George ----- Original Message -----=20 From: "Kal Ahmed" <ka...@te...> To: "'George Tryfon'" <geo...@fr...>;=20 <tm4...@li...> Sent: Tuesday, December 27, 2005 5:30 PM Subject: RE: [TM4J-users] Hibernate Transactions question Hi George, That sounds strange - the save code by itself should always be doing its work in its own transaction, if the provider has no open transaction, as = you can see in the code you copied in your message. I wonder if there is some other call which is starting a transaction and failing to close it (it mi= ght be in your code, or in the TM4J persistence layer). To track this down, perhaps you can insert logging statements in various places in your code = - especially at request start and end - to see if the provider has an open transaction or not. I'm guessing that you are holding the TopicMap object between requests ? The work-around for this might be to wrap all of your operations for a single request in one or more transactions (i.e. use the openTransaction(= ) and commit() methods explicitly). Cheers, Kal > -----Original Message----- > From: tm4...@li... [mailto:tm4j-users- > ad...@li...] On Behalf Of George Tryfon > Sent: 26 December 2005 13:59 > To: tm4...@li... > Subject: [TM4J-users] Hibernate Transactions question > > Hello, > I am developing a TMAPI server using SOAP web services > the server uses Hibernate and MySQL. > > When I create a new TopicMap, the save function inside the > "org.tm4j.topicmap.hibernate.TopicMapFactoryImpl" > finds that the transaction is closed, opens a new one and saves the > changes > in the database. > > the next time I open the TopicMap, again the transaction is closed, and > the > function does the > same thing, and saves the changes. > > The third time? > Something strange is happening here from the third time and after. > the transaction found open, the change happens but not saved inside the > database. > I suppose because there is no commit() > When I close the server and I start it again, all the changes without t= he > commit() are gone! > I didn't have this problem when I tried to do the same thing using RMI > server and Hibernate > (I am using SOAP now) > > There is more than a week now where I am puzled with this and any hint, > idea, anything, would be highly appreciated > > could be a good idea to force closing the transaction, or commit? > > Thank you in advance. > Cheers > > > protected void save(PersistenceWrapper tmobject, String id) throws > DuplicateObjectIDException > { > if (id =3D=3D null) > { > id =3D m_idgen.getID(); > } > > try > { > TopicMapObjectDataObject dataObject =3D ((TopicMapObjectDataObje= ct) > tmobject.m_dataObject); > > if (m_provider.isTransactionOpen()) > { > System.out.println ("transaction is open"); > checkID(m_provider.getOpenTransaction(), id); > dataObject.setObjectId(id); > > TopicMapDataObject tmdo =3D (TopicMapDataObject) > PersistenceWrapper.load(m_provider.getOpenTransaction(),m_topicMap); > dataObject.setTopicMap(tmdo); > PersistenceWrapper.persist(m_provider.getOpenTransaction(), > tmobject); > } > else > { > System.out.println ("transaction is closed"); > ProviderTransaction txn =3D m_provider.openTransaction(); > > try > { > checkID(m_provider.getOpenTransaction(), id); > dataObject.setObjectId(id); > > TopicMapDataObject tmdo =3D (TopicMapDataObject) > PersistenceWrapper.load(txn,m_topicMap); > dataObject.setTopicMap(tmdo); > PersistenceWrapper.persist(txn, tmobject); > txn.commit(); > } > catch (Exception ex) > { > txn.rollback(); > throw ex; > } > } > > if (tmobject instanceof TopicImpl) > { > > m_provider.registerTopic(tmobject.getPersistenceId(),(TopicImpl) > tmobject); > } > } > catch (DuplicateObjectIDException ex) > { > throw ex; > } > catch (Exception ex) > { > throw new TopicMapRuntimeException("Storage Exception.", ex); > } > } > > > ____________________________________________________________________ > http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 =E7= =EB=E5=EA=F4=F1=EF=ED=E9=EA=EF=FD =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. > http://www.freemail.gr - free email service for the Greek-speaking. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dick _______________________________________________ Tm4j-users mailing list Tm4...@li... https://lists.sourceforge.net/lists/listinfo/tm4j-users=20 ____________________________________________________________________ http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 =E7=EB= =E5=EA=F4=F1=EF=ED=E9=EA=EF=FD =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. http://www.freemail.gr - free email service for the Greek-speaking. |
From: Kal A. <ka...@te...> - 2005-12-27 16:04:03
|
Hi George, That sounds strange - the save code by itself should always be doing its work in its own transaction, if the provider has no open transaction, as = you can see in the code you copied in your message. I wonder if there is = some other call which is starting a transaction and failing to close it (it = might be in your code, or in the TM4J persistence layer). To track this down, perhaps you can insert logging statements in various places in your code = - especially at request start and end - to see if the provider has an open transaction or not. I'm guessing that you are holding the TopicMap = object between requests ? The work-around for this might be to wrap all of your operations for a single request in one or more transactions (i.e. use the = openTransaction() and commit() methods explicitly). Cheers, Kal > -----Original Message----- > From: tm4...@li... [mailto:tm4j-users- > ad...@li...] On Behalf Of George Tryfon > Sent: 26 December 2005 13:59 > To: tm4...@li... > Subject: [TM4J-users] Hibernate Transactions question >=20 > Hello, > I am developing a TMAPI server using SOAP web services > the server uses Hibernate and MySQL. >=20 > When I create a new TopicMap, the save function inside the > "org.tm4j.topicmap.hibernate.TopicMapFactoryImpl" > finds that the transaction is closed, opens a new one and saves the > changes > in the database. >=20 > the next time I open the TopicMap, again the transaction is closed, = and > the > function does the > same thing, and saves the changes. >=20 > The third time? > Something strange is happening here from the third time and after. > the transaction found open, the change happens but not saved inside = the > database. > I suppose because there is no commit() > When I close the server and I start it again, all the changes without = the > commit() are gone! > I didn't have this problem when I tried to do the same thing using RMI > server and Hibernate > (I am using SOAP now) >=20 > There is more than a week now where I am puzled with this and any = hint, > idea, anything, would be highly appreciated >=20 > could be a good idea to force closing the transaction, or commit? >=20 > Thank you in advance. > Cheers >=20 >=20 > protected void save(PersistenceWrapper tmobject, String id) throws > DuplicateObjectIDException > { > if (id =3D=3D null) > { > id =3D m_idgen.getID(); > } >=20 > try > { > TopicMapObjectDataObject dataObject =3D = ((TopicMapObjectDataObject) > tmobject.m_dataObject); >=20 > if (m_provider.isTransactionOpen()) > { > System.out.println ("transaction is open"); > checkID(m_provider.getOpenTransaction(), id); > dataObject.setObjectId(id); >=20 > TopicMapDataObject tmdo =3D (TopicMapDataObject) > PersistenceWrapper.load(m_provider.getOpenTransaction(),m_topicMap); > dataObject.setTopicMap(tmdo); > PersistenceWrapper.persist(m_provider.getOpenTransaction(), > tmobject); > } > else > { > System.out.println ("transaction is closed"); > ProviderTransaction txn =3D m_provider.openTransaction(); >=20 > try > { > checkID(m_provider.getOpenTransaction(), id); > dataObject.setObjectId(id); >=20 > TopicMapDataObject tmdo =3D (TopicMapDataObject) > PersistenceWrapper.load(txn,m_topicMap); > dataObject.setTopicMap(tmdo); > PersistenceWrapper.persist(txn, tmobject); > txn.commit(); > } > catch (Exception ex) > { > txn.rollback(); > throw ex; > } > } >=20 > if (tmobject instanceof TopicImpl) > { >=20 > m_provider.registerTopic(tmobject.getPersistenceId(),(TopicImpl) > tmobject); > } > } > catch (DuplicateObjectIDException ex) > { > throw ex; > } > catch (Exception ex) > { > throw new TopicMapRuntimeException("Storage Exception.", ex); > } > } >=20 >=20 > ____________________________________________________________________ > http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 = =E7=EB=E5=EA=F4=F1=EF=ED=E9=EA=EF=FD = =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. > http://www.freemail.gr - free email service for the Greek-speaking. >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD = SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users >=20 |
From: George T. <geo...@fr...> - 2005-12-26 13:59:50
|
Hello, I am developing a TMAPI server using SOAP web services the server uses Hibernate and MySQL. When I create a new TopicMap, the save function inside the "org.tm4j.topicmap.hibernate.TopicMapFactoryImpl" finds that the transaction is closed, opens a new one and saves the changes in the database. the next time I open the TopicMap, again the transaction is closed, and the function does the same thing, and saves the changes. The third time? Something strange is happening here from the third time and after. the transaction found open, the change happens but not saved inside the database. I suppose because there is no commit() When I close the server and I start it again, all the changes without the commit() are gone! I didn't have this problem when I tried to do the same thing using RMI server and Hibernate (I am using SOAP now) There is more than a week now where I am puzled with this and any hint, idea, anything, would be highly appreciated could be a good idea to force closing the transaction, or commit? Thank you in advance. Cheers protected void save(PersistenceWrapper tmobject, String id) throws DuplicateObjectIDException { if (id == null) { id = m_idgen.getID(); } try { TopicMapObjectDataObject dataObject = ((TopicMapObjectDataObject) tmobject.m_dataObject); if (m_provider.isTransactionOpen()) { System.out.println ("transaction is open"); checkID(m_provider.getOpenTransaction(), id); dataObject.setObjectId(id); TopicMapDataObject tmdo = (TopicMapDataObject) PersistenceWrapper.load(m_provider.getOpenTransaction(),m_topicMap); dataObject.setTopicMap(tmdo); PersistenceWrapper.persist(m_provider.getOpenTransaction(), tmobject); } else { System.out.println ("transaction is closed"); ProviderTransaction txn = m_provider.openTransaction(); try { checkID(m_provider.getOpenTransaction(), id); dataObject.setObjectId(id); TopicMapDataObject tmdo = (TopicMapDataObject) PersistenceWrapper.load(txn,m_topicMap); dataObject.setTopicMap(tmdo); PersistenceWrapper.persist(txn, tmobject); txn.commit(); } catch (Exception ex) { txn.rollback(); throw ex; } } if (tmobject instanceof TopicImpl) { m_provider.registerTopic(tmobject.getPersistenceId(),(TopicImpl) tmobject); } } catch (DuplicateObjectIDException ex) { throw ex; } catch (Exception ex) { throw new TopicMapRuntimeException("Storage Exception.", ex); } } ____________________________________________________________________ http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου. http://www.freemail.gr - free email service for the Greek-speaking. |
From: George T. <geo...@fr...> - 2005-12-25 23:15:38
|
Hello Lars I build using build.xml and it works OK. Best regards, > Hi George, > > [...] >> up to now I was using TM4J binary release, >> in order to use your patch, I removed the jars > [...] > >> and I included the sources into my project. > [...] > > Did you use the build.xml of TM4J? > > If I use it everything works fine. > > Just do a > ant all > or > ant distrib-all > > and you get the libs with the current date as suffix. > > An alternative might be to modify or create your tmapi.properties file > (see > http://tmapi.org/guide/ar01s05s01.html#topicmapsystemfactory-lookup) > > If you've further problems, please provide more information what > you've done to build TM4J from source. > > Best regards, > Lars > -- > http://semagia.com > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users ____________________________________________________________________ http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ. http://www.freemail.gr - free email service for the Greek-speaking. |
From: Lars H. <he...@se...> - 2005-12-25 12:16:05
|
Hi George, [...] > up to now I was using TM4J binary release, > in order to use your patch, I removed the jars [...] > and I included the sources into my project. [...] Did you use the build.xml of TM4J? If I use it everything works fine. Just do a ant all or ant distrib-all and you get the libs with the current date as suffix. An alternative might be to modify or create your tmapi.properties file (see http://tmapi.org/guide/ar01s05s01.html#topicmapsystemfactory-lookup) If you've further problems, please provide more information what you've done to build TM4J from source. Best regards, Lars -- http://semagia.com |
From: George T. <geo...@fr...> - 2005-12-23 14:27:12
|
> Hi, > > [...] >>> org.tmapi.core.TopicMap tm; >>> AssociationRole ar = (AssociationRole)tm.getObjectById(idAssocRole); > >>> java.lang.StackOverflowError >> [...] >>> if the idAssocRole is not correct, the call gives null, >>> but if the idAssocRole is correct, StackOverflowError > > I think I've found the failure. > The method > Object wrap(Object obj, TMAPITopicMapImpl tm) > > forgets an argument (the player) if the "obj" is a Member instance and > calls itself again and again. It should call > AssociationRole wrap(org.tm4j.topicmap.Member obj, > org.tm4j.topicmap.Topic player, > TMAPITopicMapImpl tm) > > Maybe the attached patch helps. > Note, that the patch is only a hack (see the TODO annotation) and is > not tested. > > Best regards, > Lars > -- > http://semagia.com Hello, up to now I was using TM4J binary release, in order to use your patch, I removed the jars tm4j-0.9.8.jar tm4jadmintool-0.9.8.jar tm4jdbc-0.9.8.jar tm4j-tmapi-0.9.8.jar tm4j-tologx-0.9.8.jar tm4ozone-0.9.8.jar and I included the sources into my project. (I have a Hibernate database) I suppose there is something I am not doing it in the right way and when the TMAPITopicMapImpl.getHelperObject (Class interfaceClass) calls HelperObjectMap.getHelperObjectClassName(interfaceClass.getName()); here are my results... public static String getHelperObjectClassName(String interfaceName) { System.out.println (interfaceName); //prints: org.tmapi.index.core.TopicsIndex if (instance == null) instance = new HelperObjectMap(); if (instance.m_cache.containsKey(interfaceName)) { return (String)instance.m_cache.get(interfaceName); } // Step 1: Look up mapping in system properties String implClassName = System.getProperty(interfaceName); System.out.println ("implClassName"); System.out.println (implClassName!=null); //prints: false <<<<<<<<<<<<<<<< // Step 2: Lookup the mapping in JRE_DIR/lib/tmapi.properties if (implClassName == null) { implClassName = instance.m_props.getProperty(interfaceName); System.out.println (implClassName!=null); //prints: false <<<<<<<<<<<<<<<< } // Step 3: Look up the mapping in META-INF/services resource directory if (implClassName == null) { URL u = instance.getClass().getResource("/META-INF/services/" + interfaceName); System.out.println (u!=null); //prints: false <<<<<<<<<<<<<<<< if (u != null) { System.out.println (u.toString()); BufferedReader rdr = null; try { rdr = new BufferedReader(new InputStreamReader(u.openStream())); implClassName = rdr.readLine(); } catch (IOException e) { m_log.error("Unable to read JAR services entry " + interfaceName + ". ", e); } finally { try { if (rdr != null) rdr.close(); } catch (IOException ex) { // Ignore failure to close the stream. } } } } System.out.println (implClassName!=null); //prints: false <<<<<<<<<<<<<<<< if (implClassName != null) instance.m_cache.put(interfaceName, implClassName); return implClassName; //returns null <<<<<<<<<<<<<<<< } I have also included the META-INF/services in my .jar file what could be the problem? Thank you in advance. Cheers ____________________________________________________________________ http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ. http://www.freemail.gr - free email service for the Greek-speaking. |
From: George T. <geo...@fr...> - 2005-12-21 16:09:31
|
Thank you, I will test it and I will reply to you about the results Cheers ----- Original Message ----- From: "Lars Heuer" <he...@se...> To: "George Tryfon" <geo...@fr...> Cc: <tm4...@li...> Sent: Wednesday, December 21, 2005 11:55 AM Subject: Re: [Tm4j-developers] TMAPI tm.getObjectById (id_association_role) -> StackOverflowError > Hi, > > [...] >>> org.tmapi.core.TopicMap tm; >>> AssociationRole ar = (AssociationRole)tm.getObjectById(idAssocRole); > >>> java.lang.StackOverflowError >> [...] >>> if the idAssocRole is not correct, the call gives null, >>> but if the idAssocRole is correct, StackOverflowError > > I think I've found the failure. > The method > Object wrap(Object obj, TMAPITopicMapImpl tm) > > forgets an argument (the player) if the "obj" is a Member instance and > calls itself again and again. It should call > AssociationRole wrap(org.tm4j.topicmap.Member obj, > org.tm4j.topicmap.Topic player, > TMAPITopicMapImpl tm) > > Maybe the attached patch helps. > Note, that the patch is only a hack (see the TODO annotation) and is > not tested. > > Best regards, > Lars > -- > http://semagia.com ____________________________________________________________________ http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ. http://www.freemail.gr - free email service for the Greek-speaking. |
From: Kal A. <ka...@te...> - 2005-11-19 11:01:29
|
Hi Dandan, Looking at the query, I think the problem might be that $ROLE2 is not a bound variable. The /= predicate requires that both variables are bound to an object when it is evaluated. I think that you might actually have intended $ROLE1 /= $ROLE. Also I don't think the parser will allow a space between the $ an the variable name - so you must write $ROLE1 and not $ ROLE1 (though that might just be an email formatting error!) Cheers, Kal > -----Original Message----- > From: tm4...@li... [mailto:tm4j-users- > ad...@li...] On Behalf Of Wang, Dandan > Sent: 18 November 2005 17:39 > To: tm4...@li... > Cc: c_f...@us... > Subject: [TM4J-users] About Tolog Query > > Hi Everyone, > > I'm trying to run the following Tolog Query in the TMNav Window, But it > got some exceptions. > > select $T1,$T2 from > > role-player($ROLE,$T1), > > association-role($ASSOC,$ROLE1), association- > role($ASSOC,$ROLE1), > > role-player($ROLE,$T2), type($ASSOC, x1122ljt3i-2bd), > > $ ROLE1 /= $ROLE2, $T1/=$T2 ? > > ("x1122ljt3i-2bd" is the association type id) > > The problem may come from the last line of this query -- ROLE1 /= > ROLE2, $T1 /= $T2 ? the "/=" predicate. > Because whenI tried to run the query without the last line., it got some > resultsets. > > Does anyone know how to overcome this problem? Or is that becuase TMNav > tolog query does not support this kind of predicates? > > I appreciate... > > > Dandan > > > > |