Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » Problem with non blocking request (Synch)
icon4.gif  Problem with non blocking request (Synch) [message #1757138] Sun, 19 March 2017 16:25 Go to next message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
Hi,

i am trying to use non blocking request. I followed tutorial on http://wiki.eclipse.org/OM2M/one/REST_API. Everything went fine but when i want to create contentInstance with rt=1 parameter i got exception in my in-cse.

I sent POST request:
Url: 127.0.0.1:8080/~/mn-cse/mn-name/MY_SENSOR/DATA?rt=1
Header:
X-M2M-Origin: admin:admin
Content-Type: application/xml;ty=4
Body:
<m2m:cin xmlns:m2m="http://www.onem2m.org/xml/protocols">
    <cnf>message</cnf>
    <con>
      &lt;obj&gt;
        &lt;str name=&quot;appId&quot; val=&quot;MY_SENSOR&quot;/&gt;
        &lt;str name=&quot;category&quot; val=&quot;temperature &quot;/&gt;
        &lt;int name=&quot;data&quot; val=&quot;27&quot;/&gt;
        &lt;int name=&quot;unit&quot; val=&quot;celsius&quot;/&gt;
      &lt;/obj&gt;
    </con>
</m2m:cin>


Exception that i get in my in-cse is:
310380 [pool-3-thread-1] INFO  org.eclipse.om2m.core.nblocking.NonBlockingWorker
  - Request /in-cse/req-909777630 completed
310400 [pool-3-thread-1] ERROR org.eclipse.om2m.datamapping.jaxb.Mapper  - JAXB
unmarshalling error!
javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.2.v20140319-9
ad6abd): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber:1; Content is not allowed in prolog.]
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:980)
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:290)
        at org.eclipse.om2m.datamapping.jaxb.Mapper.stringToObj(Mapper.java:119)
        at org.eclipse.om2m.core.nblocking.NonBlockingWorker.run(NonBlockingWorker.java:101)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.       
at org.eclipse.persistence.exceptions.XMLMarshalException.unmarshalException(XMLMarshalException.java:114)        
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.convertSAXException(SAXUnmarshaller.java:999)        
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal (SAXUnmarshaller.java:903)        
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:388)        
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal (SAXUnmarshaller.java:626)       
 at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal (SAXUnmarshaller.java:662)       
 at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:593)        
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:287)        ... 5 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:223)
        at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:895)
        ... 10 more
Exception in thread "pool-3-thread-1" java.lang.IllegalArgumentException        
at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:443)        
at org.eclipse.om2m.datamapping.jaxb.Mapper.objToString(Mapper.java:92)
at org.eclipse.om2m.core.nblocking.NonBlockingWorker.run(NonBlockingWorker.java:102)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)       
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


I attached in-cse and mn-cse screenshot.
index.php/fa/28794/0/
index.php/fa/28795/0/

Do you know where is the problem? I tried same procedure on in-cse and its working.

Why req_ still existst in mn-name when his data exists in MY_SENSOR/DATA container?


Thanks for your help,

Matej
  • Attachment: mn-cse.PNG
    (Size: 58.96KB, Downloaded 1968 times)
  • Attachment: in-cse.PNG
    (Size: 48.84KB, Downloaded 1959 times)

[Updated on: Sun, 19 March 2017 16:39]

Report message to a moderator

Re: Problem with non blocking request (Synch) [message #1757873 is a reply to message #1757138] Tue, 21 March 2017 06:17 Go to previous messageGo to next message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
Bump Smile
Re: Problem with non blocking request (Synch) [message #1757915 is a reply to message #1757873] Tue, 21 March 2017 19:54 Go to previous messageGo to next message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
I did another test.

I wrote simple Java app that use asyncHttpClient for sending requests to oneM2M. I sent 20 requests per second for 1 minute. 3000 * 2 PC = total 6000 requests. After few time i got exception:
Internal Exception: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ; SQL statement:
UPDATE CNT SET st = ? WHERE (ri = ?) [50200-186]
Error Code: 50200
Call: UPDATE CNT SET st = ? WHERE (ri = ?)
        bind => [2 parameters bound]
Query: UpdateObjectQuery(org.eclipse.om2m.commons.entities.ContainerEntity@45262d7e)
        at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
        at org.eclipse.om2m.persistence.eclipselink.internal.dao.AbstractDAO.update(AbstractDAO.java:49)
        at org.eclipse.om2m.persistence.eclipselink.internal.dao.ContainerDAO.update(ContainerDAO.java:60)
        at org.eclipse.om2m.persistence.eclipselink.internal.dao.ContainerDAO.update(ContainerDAO.java:1)
        at org.eclipse.om2m.core.controller.ContentInstanceController.doCreate(ContentInstanceController.java:237)
        at org.eclipse.om2m.core.controller.Controller.doRequest(Controller.java:76)
        at org.eclipse.om2m.core.router.Router.doRequest(Router.java:228)
        at org.eclipse.om2m.core.nblocking.NonBlockingWorker.run(NonBlockingWorker.java:85)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ; SQL statement:
UPDATE CNT SET st = ? WHERE (ri = ?) [50200-186]
Error Code: 50200
Call: UPDATE CNT SET st = ? WHERE (ri = ?)
        bind => [2 parameters bound]
Query: UpdateObjectQuery(org.eclipse.om2m.commons.entities.ContainerEntity@45262d7e)
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:631)
        at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558)
        at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2002)
        at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:298)
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
        at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.updateObject(DatasourceCallQueryMechanism.java:797)
        at org.eclipse.persistence.internal.queries.StatementQueryMechanism.updateObject(StatementQueryMechanism.java:435)
        at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1079)
        at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84)
        at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:301)
        at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
        at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899)
        at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:798)
        at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
        at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1804)
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1786)
        at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1737)
        at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:267)
        at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:130)
        at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4207)
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1441)
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1587)
        at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:452)
        at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:863)
        ... 10 more
		
		
118982 [pool-3-thread-10] ERROR org.eclipse.om2m.datamapping.jaxb.Mapper  - JAXB unmarshalling error!
javax.xml.bind.UnmarshalException
 - with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.]
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:980)
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:588)
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:182)
        at org.eclipse.om2m.datamapping.jaxb.Mapper.stringToObj(Mapper.java:117)
        at org.eclipse.om2m.core.nblocking.NonBlockingWorker.run(NonBlockingWorker.java:101)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
        at org.eclipse.persistence.exceptions.XMLMarshalException.unmarshalException(XMLMarshalException.java:114)
        at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.convertSAXException(SAXUnmarshaller.java:996)
        at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:903)
        at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:659)
        at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:585)
        ... 6 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
        at org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parse(XMLStreamReaderReader.java:98)
        at org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parse(XMLStreamReaderReader.java:86)
        at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:895)
        ... 8 more
Exception in thread "pool-3-thread-10" java.lang.IllegalArgumentException
        at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:443)
        at org.eclipse.om2m.datamapping.jaxb.Mapper.objToString(Mapper.java:91)
        at org.eclipse.om2m.core.nblocking.NonBlockingWorker.run(NonBlockingWorker.java:102)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)		


Dont know where is the problem? I think that 40 req per s is nothing for normal database. Is there some deeper explanation of this problem? Any idea what can i do?

[Updated on: Tue, 21 March 2017 20:02]

Report message to a moderator

Re: Problem with non blocking request (Synch) [message #1758105 is a reply to message #1757915] Thu, 23 March 2017 14:46 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello
Try to enable multi threading in H2 database. Update your config.ini file like this:
org.eclipse.om2m.dbUrl=jdbc\:h2\:./database/indb;MULTI_THREADED=1

[Updated on: Thu, 23 March 2017 14:47]

Report message to a moderator

Re: Problem with non blocking request (Synch) [message #1758206 is a reply to message #1758105] Fri, 24 March 2017 16:11 Go to previous messageGo to next message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
Thanks for your answer, i will try.
Re: Problem with non blocking request (Synch) [message #1758268 is a reply to message #1758206] Sun, 26 March 2017 11:19 Go to previous messageGo to next message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
With MULTI_THREADED=1 i get this exception:
Controller internal error
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: Row not found when trying to delete from index "PUBLIC.PRIMARY_KEY_10: 3"; SQL statement:
UPDATE CNT SET st = ? WHERE (ri = ?) [90112-186]
Error Code: 90112
Call: UPDATE CNT SET st = ? WHERE (ri = ?)
        bind => [2 parameters bound]
Query: UpdateObjectQuery(org.eclipse.om2m.commons.entities.ContainerEntity@70036284)
        at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
        at org.eclipse.om2m.persistence.eclipselink.internal.dao.AbstractDAO.update(AbstractDAO.java:49)
        at org.eclipse.om2m.persistence.eclipselink.internal.dao.ContainerDAO.update(ContainerDAO.java:60)
        at org.eclipse.om2m.persistence.eclipselink.internal.dao.ContainerDAO.update(ContainerDAO.java:1)
        at org.eclipse.om2m.core.controller.ContentInstanceController.doCreate(ContentInstanceController.java:237)
        at org.eclipse.om2m.core.controller.Controller.doRequest(Controller.java:76)
        at org.eclipse.om2m.core.router.Router.doRequest(Router.java:228)
        at org.eclipse.om2m.binding.http.RestHttpServlet.service(RestHttpServlet.java:130)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:360)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:370)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
        at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException


Do you have any idea where is the problem for first exception (jaxb unmarshal). Is there any benchmark for oneM2M (what is max number of request which can be processed, ...)?
Re: Problem with non blocking request (Synch) [message #1759907 is a reply to message #1758268] Wed, 19 April 2017 19:21 Go to previous message
Matej AA is currently offline Matej AAFriend
Messages: 23
Registered: February 2016
Junior Member
Hi,
last two weeks i was thinking about exception:
Internal Exception: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ; SQL statement:
UPDATE CNT SET st = ? WHERE (ri = ?) [50200-186]
Error Code: 50200
Call: UPDATE CNT SET st = ? WHERE (ri = ?)

I can reproduce this exception if i send 30 requests/s from two computers at same time. I get exception after 6000 data.

If i remove code which update st attribute in content instance everything works fine.
ContentInstanceController.java
if(container.getStateTag() != null){
	container.setStateTag(BigInteger.valueOf(container.getStateTag().intValue() + 1));
	dbs.getDAOFactory().getContainerDAO().update(transaction, container);
}


If i understand ContentInstanceController.doRequest code correctly: first computer send request, code lock record in CNT table and insert new record in CIN table. Problem is if there come new request for CNT table lock, but table is still locked from request before. After few seconds, new lock request times out and om2m (H2 entity manager) throw exception. Is this OK, that we executing row update (lock), if this segment of code can be executed n times in one s?

I was thinking how could i fix this error but i can't find any idea. I hope you understand what are my concerns Smile Does anyone has any idea what can i do? Smile

Thanks for your help.
Previous Topic:How does OM2M support the Device Management Protocol?
Next Topic:OM2M :Method Not Allowed Update on ContentInstance is not Allowed
Goto Forum:
  


Current Time: Sat Oct 12 10:18:57 GMT 2024

Powered by FUDForum. Page generated in 0.05118 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top