MySQL connection in Xaction

Asked by Vitex

Hello,

When i establish the connection in Adapter::Service::sqlconnect() to mysqlpp::Connection sqlConn then in
Xaction the "service->sqlConn" connecion don't work and must be connected again ...

 where is best place to store mysqlpp::Connection reachable from Xaciton ?

i use mysql++-3.2.0 Thanks for answer.

Question information

Language:
English Edit question
Status:
Answered
For:
eCAP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Rousskov (rousskov) said :
#1

The methods you mentioned are not a part of the eCAP API. It may help if you rephrase your question in eCAP terms. For example, it is not clear whether your custom Service::sqlconnect() is called at all and, if it is called, which standard Service method calls it.

In general, if your MySQL connection is shared by all transactions that belong to an eCAP Service, then you should store that connection in the Adapter Service object. You may initialize the connection when it is first needed, when the Service::[re]configure() method is called, or when the Service::start() method is called, whichever is more convenient for your code.

Can you help with this problem?

Provide an answer of your own, or ask Vitex for more information if necessary.

To post a message you must log in.