Re: geronimo 2.1.4 container managed transaction
On Apr 30, 2010, at 2:05 PM, Anshuk wrote: > > Ok David. > > Let me elaborate the scenario. > > I am deploying an ear..having the web & the ejb.The web part contains some > web screens..(some jsps)..from which I am doing some inserts/updates..while > doing so..the ejb is invoked which does the inert/update operations...the > database used is oracle..the connection pool is used..for doing so..the > TranQL Generic JDBC Resource Adapter is used.. > Now by default..setautocommit is always set to true..which we are setting to > false (reason being in case of rollback using container managed transaction, > the transaction should not be commited but rolled back) from the > application. > > So when I am doing an insert..the row is not commited..even if it is done > correct insert..with no exceptions... > > Do I need to change the tranql adapter? Can you advise. You should use the latest tranql oracle wrapper instead of the generic wrapper. I'm not sure the latest one is distributed with g. 2.14, but it's here: http://repo1.maven.org/maven2/org/tranql/tranql-connector-oracle-local/1.5/tranql-connector-oracle-local-1.5.rar Again, use the correct tranql wrapper, and don't call setAutocommit() in your code. If you really have to use the generic wrapper, set the property CommitOnAutocommit to true. thanks david jencks > > Anshuk > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/geronimo-2-1-4-container-managed-transaction-tp768780p768879.html > Sent from the Users mailing list archive at Nabble.com.
Re: geronimo 2.1.4 container managed transaction
Ok David. Let me elaborate the scenario. I am deploying an ear..having the web & the ejb.The web part contains some web screens..(some jsps)..from which I am doing some inserts/updates..while doing so..the ejb is invoked which does the inert/update operations...the database used is oracle..the connection pool is used..for doing so..the TranQL Generic JDBC Resource Adapter is used.. Now by default..setautocommit is always set to true..which we are setting to false (reason being in case of rollback using container managed transaction, the transaction should not be commited but rolled back) from the application. So when I am doing an insert..the row is not commited..even if it is done correct insert..with no exceptions... Do I need to change the tranql adapter? Can you advise. Anshuk -- View this message in context: http://apache-geronimo.328035.n3.nabble.com/geronimo-2-1-4-container-managed-transaction-tp768780p768879.html Sent from the Users mailing list archive at Nabble.com.
Re: geronimo 2.1.4 container managed transaction
I don't understand your scenario. The uncommitted work is done by the application client?? I don't recommend ever calling setAutoCommit from an application. If you are outside a jta transaction, you presumably want autocommit behavior. If you don't, use UserTransaction. Some drivers (including, last time I checked, oracle) are not jdbc spec compliant and do not commit pending work when autocommit is turned on (the tranql wrapper uses setAutocommit(true) to end transactions when wrapping non-xa connections/datasources). To counteract this defect there's a property CommitOnAutocommit you can use with the generic wrapper. I recommend using a db-specific wrapper where this problem should be taken care of. thanks david jencks On Apr 30, 2010, at 1:11 PM, Anshuk wrote: > Hello All, I am trying to use a ejb which insert/update a database and have > configured the ejb to handle container managed transaction. SampleEJB * > RequiresNew The auto commit has been set to false, when I am trying to insert > a row, from the application client (within the same server, same ear > actually), there is no exception, but when I check the database, the record > is not shown in the tables. When the app. server is shut down, the records is > shown in the database table. This good scenario is not working. Only after > this works successfully, I will try for thr roll back scenario. Has anybody > seen a simialr situation? Any workarounds?? Anshuk > View this message in context: geronimo 2.1.4 container managed transaction > Sent from the Users mailing list archive at Nabble.com.
geronimo 2.1.4 container managed transaction
Hello All, I am trying to use a ejb which insert/update a database and have configured the ejb to handle container managed transaction. SampleEJB * RequiresNew The auto commit has been set to false, when I am trying to insert a row, from the application client (within the same server, same ear actually), there is no exception, but when I check the database, the record is not shown in the tables. When the app. server is shut down, the records is shown in the database table. This good scenario is not working. Only after this works successfully, I will try for thr roll back scenario. Has anybody seen a simialr situation? Any workarounds?? Anshuk -- View this message in context: http://apache-geronimo.328035.n3.nabble.com/geronimo-2-1-4-container-managed-transaction-tp768780p768780.html Sent from the Users mailing list archive at Nabble.com.
Re: looking for some suggestion for setting AMQ across multiple JVMs
On Apr 30, 2010, at 5:11 AM, easyl wrote: > > Hallo, > > At the moment I run multiple applications (EAR with MDB) in a single > Geronimo. > > I am trying to run applications on different Geronimo (i.e. on different > JVM) within one physical machine. > > server \--- Geronimo1 \--- appA > \ \--- appB >\ > \--- Geronimo2 --- appC > > appA, appB and appC send/receive JMS to/from each other. > > > Can someone give me some suggestion? > > do I need one or more than one broker? should I set a broker for each > Geronimo? Multiple brokers aren't a requirement. Do appA/appB need to share destinations with appC? If not, then multiple brokers using default configuration (avoiding port conflicts of course) will work fine. If you do need to share JMS destinations, you'd need either a single broker or a broker network. For a single broker (e.g. running in Geronimo1), you'd need to configure your JMS resources in Geronimo2 to use TCP (VM transport won't work. You could use multicast or discovery protocol). Something like: arcgis-jms tcp://localhost:61616 http://geronimo.apache.org/xml/ns/naming-1.2";> DefaultWorkManager A broker network would require G 2.2 (it would be very difficult/impossible to configure a broker network on G 2.1.x). In var/activemq/conf/activemq.xml add: > what kind of transport should I use? is simple VM possible? In a broker network, VM transport is possible between client and broker. VM transport would not work between brokers. > is there any example of setting up such AMQ? AMQ has examples. I don't think we have any examples set up in Geronimo. --kevan
Re: MDB error?
I am not sure it is a known issue that I encounter in the past, could you help to check after clear the derby message db, your sample could receive the new messages again ? 2010/4/30 B'lue > > I deploy samples jms-mdb-ear in geronimo2.1.5 ,can get correct result. > But after restart geronimo server,MDB don't get massage. > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/MDB-error-tp767294p767294.html > Sent from the Users mailing list archive at Nabble.com. > -- Ivan
Re: looking for some suggestion for setting AMQ across multiple JVMs
For simple use, I think one broker is enough. If the MDB is hosted in the same vm of the broker, vm protocol is enough. If not, tcp transport could be used. I remembered that there is some advanced features for multi-brokers, you might ask it in the ActiveMQ mail list ;-) 2010/4/30 easyl > > Hallo, > > At the moment I run multiple applications (EAR with MDB) in a single > Geronimo. > > I am trying to run applications on different Geronimo (i.e. on different > JVM) within one physical machine. > > server \--- Geronimo1 \--- appA > \ \--- appB >\ > \--- Geronimo2 --- appC > > appA, appB and appC send/receive JMS to/from each other. > > > Can someone give me some suggestion? > > do I need one or more than one broker? should I set a broker for each > Geronimo? > what kind of transport should I use? is simple VM possible? > is there any example of setting up such AMQ? > > > -- > View this message in context: > http://apache-geronimo.328035.n3.nabble.com/looking-for-some-suggestion-for-setting-AMQ-across-multiple-JVMs-tp767393p767393.html > Sent from the Users mailing list archive at Nabble.com. > -- Ivan
looking for some suggestion for setting AMQ across multiple JVMs
Hallo, At the moment I run multiple applications (EAR with MDB) in a single Geronimo. I am trying to run applications on different Geronimo (i.e. on different JVM) within one physical machine. server \--- Geronimo1 \--- appA \ \--- appB \ \--- Geronimo2 --- appC appA, appB and appC send/receive JMS to/from each other. Can someone give me some suggestion? do I need one or more than one broker? should I set a broker for each Geronimo? what kind of transport should I use? is simple VM possible? is there any example of setting up such AMQ? -- View this message in context: http://apache-geronimo.328035.n3.nabble.com/looking-for-some-suggestion-for-setting-AMQ-across-multiple-JVMs-tp767393p767393.html Sent from the Users mailing list archive at Nabble.com.