Author |
Message
|
Seshagiri |
Posted: Tue Oct 11, 2011 8:18 am Post subject: 2phase commit |
|
|
Apprentice
Joined: 04 Oct 2011 Posts: 42
|
Hi,
I am running a java application and using MQ7 and oralce 11g release2. I am using 2phase commit. when I commit queue then I am able to see the data in the queue but unable to see the data in table but when I close the database connection then able to see the data in the tables. The calls as as follows
qmanager.commit();//At this point the data commited in queue but no data in database tables
con.close();// At this point I am able to see the data in the database.
OS: solaries10
Here java application,MQ and database are on the same system.
I am using oracle.jdbc.xa.client.OracleXADataSource in java application
I feel that 2phase is not working properly. Please let me know is any thing has to be changed. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Oct 11, 2011 8:23 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
Seshagiri |
Posted: Tue Oct 11, 2011 8:26 am Post subject: |
|
|
Apprentice
Joined: 04 Oct 2011 Posts: 42
|
Yes. Please help me to figure it out |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 11, 2011 8:29 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It appears you are expecting that the commit call to the queue manager object will magically cause a commit call to the database.
There is no magic. |
|
Back to top |
|
 |
Seshagiri |
Posted: Tue Oct 11, 2011 8:33 am Post subject: |
|
|
Apprentice
Joined: 04 Oct 2011 Posts: 42
|
mqjeff wrote: |
It appears you are expecting that the commit call to the queue manager object will magically cause a commit call to the database.
There is no magic. |
Please let me know how it works. We have created the switchfile and done the configuration. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Oct 11, 2011 8:35 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Seshagiri wrote: |
Yes. Please help me to figure it out |
Please do not open a new post for an existing issue. There are some WMQ configuration issues you must address that will let an mq commit coordinate changes to your Oracle database AND mq resources.
You will need to refer to Oracle documentation, and then make the appropriate changes to your WMQ configuration. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Seshagiri |
Posted: Tue Oct 11, 2011 8:40 am Post subject: |
|
|
Apprentice
Joined: 04 Oct 2011 Posts: 42
|
bruce2359 wrote: |
Seshagiri wrote: |
Yes. Please help me to figure it out |
Please do not open a new post for an existing issue. There are some WMQ configuration issues you must address that will let an mq commit coordinate changes to your Oracle database AND mq resources.
You will need to refer to Oracle documentation, and then make the appropriate changes to your WMQ configuration. |
Jedi sorry for opening the issue again. Can you please let me know the mq configuration issues so that I can understand where I am going wrong. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Oct 11, 2011 8:43 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
WMQ comes with the capability for your application to coordinate local units of work (WMQ resources only).
In order for your application to coordinate global units of work (resources of WMQ and database), you or your WMQ administrator will need to make modifications to the qmgr configuration.
You (or your WMQ administrator) will need to refer to Oracle documentation and WMQ documentation (WMQ System Administration manual), and then make the appropriate changes to your WMQ configuration. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Seshagiri |
Posted: Tue Oct 11, 2011 8:56 am Post subject: |
|
|
Apprentice
Joined: 04 Oct 2011 Posts: 42
|
bruce2359 wrote: |
WMQ comes with the capability for your application to coordinate local units of work (WMQ resources only).
In order for your application to coordinate global units of work (resources of WMQ and database), you or your WMQ administrator will need to make modifications to the qmgr configuration.
You (or your WMQ administrator) will need to refer to Oracle documentation and WMQ documentation (WMQ System Administration manual), and then make the appropriate changes to your WMQ configuration. |
Can you please guide on this to me. Here I am dealing with global unit of work. But just to understand. Is closing of connection of databse is correct or worng. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Oct 11, 2011 9:02 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Seshagiri wrote: |
Is closing of connection of databse is correct or worng. |
Your application will not be able to coordinate a global unit of work until your WMQ configuration is set up to support a global unit of work. Until then, your application will only coordinate local units of work.
Please read about global units of work in the WMQ Application Programming Referene, WMQ Application Programming Guide, and WMQ System Administration manuals. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 11, 2011 9:06 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Seshagiri wrote: |
bruce2359 wrote: |
WMQ comes with the capability for your application to coordinate local units of work (WMQ resources only).
In order for your application to coordinate global units of work (resources of WMQ and database), you or your WMQ administrator will need to make modifications to the qmgr configuration.
You (or your WMQ administrator) will need to refer to Oracle documentation and WMQ documentation (WMQ System Administration manual), and then make the appropriate changes to your WMQ configuration. |
Can you please guide on this to me. |
You have been guided.
You have been guided to READ THE DOCUMENTATION.
We can not read the documentation to you.
You have provided absolutely no information about what steps you have taken to CONFIGURE the global unit of work.
You have provided no absolutely no information about whether your application CAN SUPPORT a global unit of work. It is not automatic that ALL mq applications, regardless of what language and where they run, can use global units of work.
It is your job to spend a lot more of your time researching this.
If you have specific questions about specific pieces of the documentation, then you may get more assistance.
If you persist in saying "tell me how to do this", you will likely not get more assistance. |
|
Back to top |
|
 |
Seshagiri |
Posted: Tue Oct 11, 2011 9:18 am Post subject: |
|
|
Apprentice
Joined: 04 Oct 2011 Posts: 42
|
mqjeff wrote: |
Seshagiri wrote: |
bruce2359 wrote: |
WMQ comes with the capability for your application to coordinate local units of work (WMQ resources only).
In order for your application to coordinate global units of work (resources of WMQ and database), you or your WMQ administrator will need to make modifications to the qmgr configuration.
You (or your WMQ administrator) will need to refer to Oracle documentation and WMQ documentation (WMQ System Administration manual), and then make the appropriate changes to your WMQ configuration. |
Can you please guide on this to me. |
You have been guided.
You have been guided to READ THE DOCUMENTATION.
We can not read the documentation to you.
You have provided absolutely no information about what steps you have taken to CONFIGURE the global unit of work.
You have provided no absolutely no information about whether your application CAN SUPPORT a global unit of work. It is not automatic that ALL mq applications, regardless of what language and where they run, can use global units of work.
It is your job to spend a lot more of your time researching this.
If you have specific questions about specific pieces of the documentation, then you may get more assistance.
If you persist in saying "tell me how to do this", you will likely not get more assistance. |
Sorry I did not intend you people to read docs for me. I just wana know closing the connection is right or wrong. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 11, 2011 9:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Seshagiri wrote: |
I just wana know closing the connection is right or wrong. |
It's irrelevant. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Oct 11, 2011 9:29 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Vitor wrote: |
Seshagiri wrote: |
I just wana know closing the connection is right or wrong. |
It's irrelevant. |
I'm not sure how I/we can make this any clearer.
There is nothing your application (or any application, in any programming language) can do to effect a two-phase commit until your queue-manager is configured to support two-phase commit.
How to configure your queue-manager to support two-phase commit is documented. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Seshagiri |
Posted: Thu Oct 13, 2011 8:56 am Post subject: |
|
|
Apprentice
Joined: 04 Oct 2011 Posts: 42
|
I have a question. I have two qmanagers say Qmgr1 and Qmgr2 and database oracle. I have added resource manager information in qm.ini file of Qmgr1 with the resource name as say "myoracle". if I want to add the resource manager information in qm.ini file of Qmgr2 then do I need to use same name or can specify different name. |
|
Back to top |
|
 |
|