[JBoss-user] EJB relation - exception in DBCCMRFieldBridge.setInstanceValue
Hi all, I would llike to ask you for help. I have a problem with setting the relation - there are 2 entity beans with ONE to MANY relationship (see ejb-jar.xml). When I try to set SenavigatorLink on Senavigator (using Collection) I get the following exception : 20:07:48,311 ERROR [STDERR] javax.ejb.EJBException: null; CausedByException is: null 20:07:48,311 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceValue(JDBCCMRFieldBridge.java:673) 20:07:48,311 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JDBCCMRFieldBridge.java:541) 20:07:48,321 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:126) 20:07:48,321 ERROR [STDERR] at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59) 20:07:48,321 ERROR [STDERR] at testrelation.SenavigatorBean$Proxy.setSenavigatorlinks() 20:07:48,321 ERROR [STDERR] at testrelation.SenavigatorBean.setLink(SenavigatorBean.java:93) 20:07:48,321 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:07:48,321 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) This exception is thrown by this portion of code in setInstanceValue method of JDBCCMRFieldBridge : try { // Remove old value(s) List valuesCopy = new ArrayList(fieldState.getValue()); Iterator relatedKeys = valuesCopy.iterator(); while(relatedKeys.hasNext()) destroyRelationLinks(myCtx, relatedKeys.next()); // Add new value(s) if(newPkValues != null) { for(Iterator iter = newPkValues.iterator(); iter.hasNext();) createRelationLinks(myCtx, iter.next()); } else { while(newBeans.hasNext()) { EJBLocalObject newBean = (EJBLocalObject)newBeans.next(); createRelationLinks(myCtx, newBean.getPrimaryKey()); } } } catch(EJBException e) { throw e; } catch(Exception e) { throw new EJBException(e); } But I really do not know the right reason of that exception (with null argument???). Please, if you have any idea I would appreciate it. Thanks a lot. Cheers Mark ejb-jar.xml: = http://java.sun.com/dtd/ejb-jar_2_0.dtd";> Treloation Senavigator Senavigator testrelation.SenavigatorHome testrelation.Senavigator testrelation.SenavigatorBean Container java.lang.String False 2.x Senavigator senaid senaid ejb/SenavigatorlinkRef Entity testrelation.SenavigatorlinkHome testrelation.Senavigatorlink Senavigatorlink Senavigatorlink Senavigatorlink testrelation.SenavigatorlinkHome testrelation.Senavigatorlink testrelation.SenavigatorlinkBean Container java.lang.String False 2.x Senavigatorlink senalid senalid senavigator-senavigatorlink senavigator SenavigatorRelationshipRole One senavigator Senavigator senavigatorlinks senavigatorlinks java.util.Collection senavigatorlink SenavigatorlinkRelationshipRole Many senavigatorlink Senavigatorlink Senavigator * Required Senavigatorlink * Required --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Local transaction configuration
..sorry, I have posted this to another thread : OK, default oracle-ds.xml configures local transacation datasource. But then I do not understand, how can I get different connections when calling SLB with Required TA from another SLB with Required TA - they are supposed to be executed in the same transaction context so the same connection should be restored from Datasource in both SLBs. Or am I wrong ? Thank you. Mark [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 13.06.2003 20:45 Please respond to jboss-user To: [EMAIL PROTECTED] cc: (bcc: Marek Sedliak/BYS/SOFTIP) Subject: [JBoss-user] Local transaction configuration Hi all. Please I would like to ask you for a kind of help. I have bought and passed through the JBoss docs (Admin, CMP), I have searched forums - no success. I would like to know how to configure JBoss to use local transactions. Please where could I find any info about it ? I use Oracle 8.1.7, JBoss 3.2, CMP, SLB and I need to get the same database connection in the same transaction context. Thanx a lot. Cheers. Mark
Re: [JBoss-user] JBoss 3.0.3 Connection Pooling...
OK, default oracle-ds.xml configures local transacation datasource. But then I do not understand, how can I get different connections when calling SLB with Required TA from another SLB with Required TA - they are supposed to be executed in the same transaction context so the same connection should be restored from Datasource in both SLBs. Or am I wrong ? Thank you. Mark. [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 13.06.2003 20:49 Please respond to jboss-user To: [EMAIL PROTECTED] cc: (bcc: Marek Sedliak/BYS/SOFTIP) Subject: Re: [JBoss-user] JBoss 3.0.3 Connection Pooling... Hi, excuse me plesae, but I think your connections or statements have stayed open - we had the same problem before - Oracle, Max open cursors ... and the problem was the forgotten open connection - good way how to figure out this problem is JBoss 3.2 - this version produces warning when the connection is left open. Cheers Marek "Dayanand Kangala Shanmugham" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 13.06.2003 19:20 Please respond to jboss-user To: <[EMAIL PROTECTED]> cc: (bcc: Marek Sedliak/BYS/SOFTIP) Subject: [JBoss-user] JBoss 3.0.3 Connection Pooling... Hi All, We are developing an application using JBoss 3.0.3 and use its connection pooling to connect to Oracle database. We are facing an issue where though the statement's are closed (and connection closed, to return to the pool), the cursors are still not getting released from Oracle. After using the system for about a day, either we get a "Maximum open cursors exceeded" problem (or) the system slows down. Has anyone faced similar issues before and solved it?! (We use CMPs, Tomcat 4.0.4, Linux 7.3 and have set the MAX CURSOR as 300 in Oracle) Any info on this issue would be great. Regards, Dayanand
Re: [JBoss-user] JBoss 3.0.3 Connection Pooling...
Hi, excuse me plesae, but I think your connections or statements have stayed open - we had the same problem before - Oracle, Max open cursors ... and the problem was the forgotten open connection - good way how to figure out this problem is JBoss 3.2 - this version produces warning when the connection is left open. Cheers Marek "Dayanand Kangala Shanmugham" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 13.06.2003 19:20 Please respond to jboss-user To: <[EMAIL PROTECTED]> cc: (bcc: Marek Sedliak/BYS/SOFTIP) Subject: [JBoss-user] JBoss 3.0.3 Connection Pooling... Hi All, We are developing an application using JBoss 3.0.3 and use its connection pooling to connect to Oracle database. We are facing an issue where though the statement's are closed (and connection closed, to return to the pool), the cursors are still not getting released from Oracle. After using the system for about a day, either we get a "Maximum open cursors exceeded" problem (or) the system slows down. Has anyone faced similar issues before and solved it?! (We use CMPs, Tomcat 4.0.4, Linux 7.3 and have set the MAX CURSOR as 300 in Oracle) Any info on this issue would be great. Regards, Dayanand
[JBoss-user] Local transaction configuration
Hi all. Please I would like to ask you for a kind of help. I have bought and passed through the JBoss docs (Admin, CMP), I have searched forums - no success. I would like to know how to configure JBoss to use local transactions. Please where could I find any info about it ? I use Oracle 8.1.7, JBoss 3.2, CMP, SLB and I need to get the same database connection in the same transaction context. Thanx a lot. Cheers. Mark
RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE
Hi Saroi, not exactly - in this case I use session beans for calling data access layer that accesses database. Connection is picked up from pool and used. So in this case I do not use entity beans. Thanks Mark "saroj kumar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent by:cc: (bcc: Marek Sedliak/BYS/SOFTIP) [EMAIL PROTECTED]Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE eforge.net 20.12.2002 18:15 Please respond to jboss-user Hi Marek, >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED]] On Behalf Of >[EMAIL PROTECTED] >Sent: Friday, December 20, 2002 10:13 PM >To: [EMAIL PROTECTED] >Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE > > > >Thank you veru much for you're helping me. > >I looked at standardjboss.xml but there is no change to set >commit option >for session bean - just for entity beans. Yes, there is no such thing for Session Bean. But, how are you accessing Entity Beans? You must be calling Them through Session Beans only. Or, you are making JDBC Calls? > > >Marek > > > > > > > >"saroj kumar" > > ><[EMAIL PROTECTED]> To: > <[EMAIL PROTECTED]> > >Sent by:cc: > (bcc: Marek Sedliak/BYS/SOFTIP) > >[EMAIL PROTECTED] >Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE > >eforge.net > > > > > > > > >20.12.2002 16:15 > > >Please respond to jboss-user > > > > > > > > > > > > >Replies inline > >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED]] On Behalf Of >>[EMAIL PROTECTED] >>Sent: Friday, December 20, 2002 7:49 PM >>To: [EMAIL PROTECTED] >>Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE >> >> >> >>Hi Saroj, >> >>thank you for your help. >>Ad 1 - I'm sorry, but what is commit option B/C > >These are different ways to handle Transactions and bean life cycle. >Default Commit option is A. You can have a look at >JBOSS_HOME\server\default\ >Conf\standardjboss.xml. > >I use Commit Option B in this way: > >Snippet from jboss.xml >-- > > > > "-//JBoss//DTD JBOSS 3.0//EN" > "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd";> > > > false > > > > >Instance Per Transaction CMP 2.x >EntityBean > >B > > > > > > > > > > > AddressTypeMaster > Instance >Per Transaction >CMP >2.x EntityBean > sdsdsdsd > >dsdsdsdlcoal > > > > > > >May be you can try this. > > >>Ad 2 - I have tried it but didn't help. Anyway, I see you use oci jdbc >>driver (jdbc:oracle:oci8:@RPM-9I) and I use thin JDBC driver. >>Do you think >>it could be a source of my problem ? Why do you use oci driver ? > >This problem will not be due to thin driver. I use OCI to handle CLOB. > > >>Thanks a lot. >> >>Mark >> >> >> >> >> >> >> >>"saroj kumar" >> >> >><[EMAIL PROTECTED]> To: >> <[EMAIL PROTECTED]> >> >>Sent by:cc: >> (bcc: Marek Sedliak/BYS/SOFTIP) >> >>[EMAIL PROTECTED] >>Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE >> >>eforge.net >> >> >> >> >> >> >> >> >>20.12.2002 13:39 >> >> >>Please respond to jboss
RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE
Thank you veru much for you're helping me. I looked at standardjboss.xml but there is no change to set commit option for session bean - just for entity beans. Marek "saroj kumar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent by:cc: (bcc: Marek Sedliak/BYS/SOFTIP) [EMAIL PROTECTED]Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE eforge.net 20.12.2002 16:15 Please respond to jboss-user Replies inline >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED]] On Behalf Of >[EMAIL PROTECTED] >Sent: Friday, December 20, 2002 7:49 PM >To: [EMAIL PROTECTED] >Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE > > > >Hi Saroj, > >thank you for your help. >Ad 1 - I'm sorry, but what is commit option B/C These are different ways to handle Transactions and bean life cycle. Default Commit option is A. You can have a look at JBOSS_HOME\server\default\ Conf\standardjboss.xml. I use Commit Option B in this way: Snippet from jboss.xml -- http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd";> false Instance Per Transaction CMP 2.x EntityBean B AddressTypeMaster Instance Per Transaction CMP 2.x EntityBean sdsdsdsd dsdsdsdlcoal May be you can try this. >Ad 2 - I have tried it but didn't help. Anyway, I see you use oci jdbc >driver (jdbc:oracle:oci8:@RPM-9I) and I use thin JDBC driver. >Do you think >it could be a source of my problem ? Why do you use oci driver ? This problem will not be due to thin driver. I use OCI to handle CLOB. >Thanks a lot. > >Mark > > > > > > > >"saroj kumar" > > ><[EMAIL PROTECTED]> To: > <[EMAIL PROTECTED]> > >Sent by:cc: > (bcc: Marek Sedliak/BYS/SOFTIP) > >[EMAIL PROTECTED] >Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE > >eforge.net > > > > > > > > >20.12.2002 13:39 > > >Please respond to jboss-user > > > > > > > > > > > > >Hi Mark, > >2 things come to my mind: > >1) Try commit option B/C They solve Deadlock problems quite nicely. > >2) Add READ COMMITED Isolation Level as shown here in >oracle-service.xml > > > > > name="jboss.jca:service=LocalTxDS,name=OracleDS"> > >OracleDS > > > > > type="java.lang.String">jdbc:oracle:thin:@youroraclehost:1521:y >oursidonfig-property> > type="java.lang.String">jdbc:oracle:oci8:@RPM-9I > type="java.lang.String">oracle.jdbc.driver.OracleDriver-property >> > > type="java.lang.String">SDSDS > type="java.lang.String">SDSDSD > type="java.lang.String">TRANSACTION_READ_COMMITTED > > > > > > > >optional-attribute-name="OldRarDeployment">jboss.jca:service=RA >RDeployme >nt,name=JBoss LocalTransaction JDBC Wrapper > > > > >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED]] On Behalf Of >>[EMAIL PROTECTED] >>Sent: Friday, December 20, 2002 5:47 PM >>To: [EMAIL PROTECTED] >>Subject: [JBoss-user] TRANSACTION ISOLATION and ORACLE >> >> >> >> >>Hi All. >> >>I have already searc
RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE
Hi Saroj, thank you for your help. Ad 1 - I'm sorry, but what is commit option B/C Ad 2 - I have tried it but didn't help. Anyway, I see you use oci jdbc driver (jdbc:oracle:oci8:@RPM-9I) and I use thin JDBC driver. Do you think it could be a source of my problem ? Why do you use oci driver ? Thanks a lot. Mark "saroj kumar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent by:cc: (bcc: Marek Sedliak/BYS/SOFTIP) [EMAIL PROTECTED]Subject: RE: [JBoss-user] TRANSACTION ISOLATION and ORACLE eforge.net 20.12.2002 13:39 Please respond to jboss-user Hi Mark, 2 things come to my mind: 1) Try commit option B/C They solve Deadlock problems quite nicely. 2) Add READ COMMITED Isolation Level as shown here in oracle-service.xml OracleDS jdbc:oracle:thin:@youroraclehost:1521:yoursid jdbc:oracle:oci8:@RPM-9I oracle.jdbc.driver.OracleDriver SDSDS SDSDSD TRANSACTION_READ_COMMITTED jboss.jca:service=RARDeployme nt,name=JBoss LocalTransaction JDBC Wrapper >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED]] On Behalf Of >[EMAIL PROTECTED] >Sent: Friday, December 20, 2002 5:47 PM >To: [EMAIL PROTECTED] >Subject: [JBoss-user] TRANSACTION ISOLATION and ORACLE > > > > >Hi All. > >I have already searched the forum but haven't found any >answer. Please, I >would appreciate any suggestions. I have the following problem : > >I've got two session beans. The first one has a method with Required >transaction attribute and the second one has a method with RequiresNew >transaction attribute. The following code hags - because the first >transaction is blocking the second one. > >// the following code hangs >class SessionBean { > >public void hasRequiredAttribute() { > .. . . . . . . > // it hangs here !! > anotherSessionBean.hasRequiresNewAttribute(); // method 2 > >} //of method > >} //of class > >It looks like SERIALIZABLE isolation level is set - in the first method >(Required attribute) I just query the data (just SELECT) but >it locks the >bean. Does JBoss always use "pessimistic concurrency" at the >server level ? >My DB is Oracle and it has its default isolation level set to >READ_COMMITTED. With this isolation level, the above problem should not >have occured. How can I determine what isolation level is >being implemented >in JBoss? Or how can I change that? I think it should be possible to >change it in oracle-service.xml. But it looks it doesn't work >or I do that >wrong. Also I have tried to set it for a SESSION - didn't help. > > >Thanks a lot. > >Mark > > > >--- >This SF.NET email is sponsored by: The Best Geek Holiday Gifts! >Time is running out! Thinkgeek.com has the coolest gifts for >your favorite geek. Let your fingers do the typing. Visit Now. >T H I N K G E E K . C O Mhttp://www.thinkgeek.com/sf/ >___ >JBoss-user mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/jboss-user > --- This SF.NET email is sponsored by: The Best Geek Holiday Gifts! Time is running out! Thinkgeek.com has the coolest gifts for your favorite geek. Let your fingers do the typing. Visit Now. T H I N K G E E K . C O Mhttp://www.t
Re: [JBoss-user] TRANSACTION ISOLATION and ORACLE
David, thaks. I have tried to set TRANSACTION_READ_COMMITTED into oracle-service.xml but it didn't help. Still when I call the second bean's method with RequiresNew transaction attribute it hangs. Looks like this setting would have no impact connection. Thanks. Marek David Jencks cc: (bcc: Marek Sedliak/BYS/SOFTIP) Sent by:Subject: Re: [JBoss-user] TRANSACTION ISOLATION and ORACLE [EMAIL PROTECTED] eforge.net 20.12.2002 14:15 Please respond to jboss-user by default jboss doesn't set the tx isolation level. You can only set it in the datasource configuration, not per bean/method. You can use names or numbers for *-service.xml READ_COMMITTED for ds.xml READ_COMMITTED david jencks On 2002.12.20 07:16:51 -0500 [EMAIL PROTECTED] wrote: > > > Hi All. > > I have already searched the forum but haven't found any answer. Please, I > would appreciate any suggestions. I have the following problem : > > I've got two session beans. The first one has a method with Required > transaction attribute and the second one has a method with RequiresNew > transaction attribute. The following code hags - because the first > transaction is blocking the second one. > > // the following code hangs > class SessionBean { > > public void hasRequiredAttribute() { > .. . . . . . . >// it hangs here !! > anotherSessionBean.hasRequiresNewAttribute(); // method 2 > > } //of method > > } //of class > > It looks like SERIALIZABLE isolation level is set - in the first method > (Required attribute) I just query the data (just SELECT) but it locks the > bean. Does JBoss always use "pessimistic concurrency" at the server level > ? > My DB is Oracle and it has its default isolation level set to > READ_COMMITTED. With this isolation level, the above problem should not > have occured. How can I determine what isolation level is being > implemented > in JBoss? Or how can I change that? I think it should be possible to > change it in oracle-service.xml. But it looks it doesn't work or I do > that > wrong. Also I have tried to set it for a SESSION - didn't help. > > > Thanks a lot. > > Mark > > > > --- > This SF.NET email is sponsored by: The Best Geek Holiday Gifts! > Time is running out! Thinkgeek.com has the coolest gifts for > your favorite geek. Let your fingers do the typing. Visit Now. > T H I N K G E E K . C O Mhttp://www.thinkgeek.com/sf/ > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > --- This SF.NET email is sponsored by: The Best Geek Holiday Gifts! Time is running out! Thinkgeek.com has the coolest gifts for your favorite geek. Let your fingers do the typing. Visit Now. T H I N K G E E K . C O Mhttp://www.thinkgeek.com/sf/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.NET email is sponsored by: The Best Geek Holiday Gifts! Time is running out! Thinkgeek.com has the coolest gifts for your favorite geek. Let your fingers do the typing. Visit Now. T H I N K G E E K . C O Mhttp://www.thinkgeek.com/sf/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-
[JBoss-user] TRANSACTION ISOLATION and ORACLE
Hi All. I have already searched the forum but haven't found any answer. Please, I would appreciate any suggestions. I have the following problem : I've got two session beans. The first one has a method with Required transaction attribute and the second one has a method with RequiresNew transaction attribute. The following code hags - because the first transaction is blocking the second one. // the following code hangs class SessionBean { public void hasRequiredAttribute() { .. . . . . . . // it hangs here !! anotherSessionBean.hasRequiresNewAttribute(); // method 2 } //of method } //of class It looks like SERIALIZABLE isolation level is set - in the first method (Required attribute) I just query the data (just SELECT) but it locks the bean. Does JBoss always use "pessimistic concurrency" at the server level ? My DB is Oracle and it has its default isolation level set to READ_COMMITTED. With this isolation level, the above problem should not have occured. How can I determine what isolation level is being implemented in JBoss? Or how can I change that? I think it should be possible to change it in oracle-service.xml. But it looks it doesn't work or I do that wrong. Also I have tried to set it for a SESSION - didn't help. Thanks a lot. Mark --- This SF.NET email is sponsored by: The Best Geek Holiday Gifts! Time is running out! Thinkgeek.com has the coolest gifts for your favorite geek. Let your fingers do the typing. Visit Now. T H I N K G E E K . C O Mhttp://www.thinkgeek.com/sf/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Initializing JDBC Connection II
OK. I use this on JBoss 2.4 and WebSphere : //Restoring connection from pool dataSource = (DataSource)ServiceLocator.getServiceLocator ().getJndiService(jndiDataSourceName); connection = dataSource.getConnection(); //Setting NLS ... setConnectionParams(connection); where : dataSource is instance of javax.sql.DataSource connection is instance of java.sql.Connection later : connection.executeUpdate("INSERT .. NLS specific values Everything works OK. But when I try to use JBoss 3.0.2, it doesn't work - NLS params are not set, when I use the restored connection later - that's the problem. So I just wanted to know, how to set NLS params or any other params for the restored connection. Something must have been changed in the implementation of JBoss connection pool, 'cause it works other way now. And the getUnderlyingConnection method didn't help. Thanks Marek David Jencks cc: (bcc: Marek Sedliak/BYS/SOFTIP) Sent by:Subject: Re: [JBoss-user] Initializing JDBC Connection II [EMAIL PROTECTED] eforge.net 09.10.2002 14:38 Please respond to jboss-user On 2002.10.09 04:22:26 -0400 [EMAIL PROTECTED] wrote: > > Hi David, > > thank you for you're helping me. I have tried to do this : > > org.jboss.resource.adapter.jdbc.local.LocalConnection loJBossConnection > = (org.jboss.resource.adapter.jdbc.local.LocalConnection)aoConnection; > oracle.jdbc.driver.OracleConnection oraConn > = (oracle.jdbc.driver.OracleConnection)loJBossConnection.getUnderlyingConnection > > ); > setNLSParams(oraConn); //- sets the NLS params on the connection > > But id doesn't help - when I try to insert date into DB it fails. The > only > way how it works now is to set NLS everytime before INSERT. In the > previous > version of JBoss it was OK to set NLS after getting connection from pool. I't isn't clear to me what the difference is between the code that works and the code that doesn't work. david jencks > > Thank you very much. > > Marek > > > > > > David Jencks > > [EMAIL PROTECTED] > .com> cc: (bcc: > Marek Sedliak/BYS/SOFTIP) > Sent by:Subject: Re: > [JBoss-user] Initializing JDBC Connection II > [EMAIL PROTECTED] > > eforge.net > > > > > > 08.10.2002 19:54 > > Please respond to jboss-user > > > > > > > > > > I'ts an optional adapter, not part of jboss core. It's in the > jboss-local-jdbc.rar. > > david jencks > > > On 2002.10.08 12:31:57 -0400 [EMAIL PROTECTED] wrote: > > > > Hi David, > > > > thanks. I tried that, but jboss-jca.jar has no class in package > > org.jboss.resource.adapter.jdbc.local. I use JBoss 3.0.2 - could this > be > > a > > problem ? Do I have to uprade JBoss ? > > > > Thank you. > > > > Marek > > > > > > > > > > > > David Jencks > > > > > [EMAIL PROTECTED] > > .com> cc: (bcc: > > Marek Sedliak/BYS/SOFTIP) > > Sent by:Subject: > Re: > > [JBoss-user] Initializing JDBC Connection II > > [EMAIL PROTECTED] > > > > eforge.net > > > > > > > > > > > > 07.10.2002 21:04 > > > > Please respond to jboss-user > > > > > > > > > > > > > > > > > > > > On org.jboss.resource.adapter.jdbc.local.LocalConnection in 3.0.x and > 3.2 > > > > david jencks > > > > On 2002.10.05 09:53:59 -0400 [EMAIL PR
Re: [JBoss-user] Initializing JDBC Connection II
Hi David, thank you for you're helping me. I have tried to do this : org.jboss.resource.adapter.jdbc.local.LocalConnection loJBossConnection = (org.jboss.resource.adapter.jdbc.local.LocalConnection)aoConnection; oracle.jdbc.driver.OracleConnection oraConn = (oracle.jdbc.driver.OracleConnection)loJBossConnection.getUnderlyingConnection ); setNLSParams(oraConn); //- sets the NLS params on the connection But id doesn't help - when I try to insert date into DB it fails. The only way how it works now is to set NLS everytime before INSERT. In the previous version of JBoss it was OK to set NLS after getting connection from pool. Thank you very much. Marek David Jencks cc: (bcc: Marek Sedliak/BYS/SOFTIP) Sent by:Subject: Re: [JBoss-user] Initializing JDBC Connection II [EMAIL PROTECTED] eforge.net 08.10.2002 19:54 Please respond to jboss-user I'ts an optional adapter, not part of jboss core. It's in the jboss-local-jdbc.rar. david jencks On 2002.10.08 12:31:57 -0400 [EMAIL PROTECTED] wrote: > > Hi David, > > thanks. I tried that, but jboss-jca.jar has no class in package > org.jboss.resource.adapter.jdbc.local. I use JBoss 3.0.2 - could this be > a > problem ? Do I have to uprade JBoss ? > > Thank you. > > Marek > > > > > > David Jencks > > [EMAIL PROTECTED] > .com> cc: (bcc: > Marek Sedliak/BYS/SOFTIP) > Sent by:Subject: Re: > [JBoss-user] Initializing JDBC Connection II > [EMAIL PROTECTED] > > eforge.net > > > > > > 07.10.2002 21:04 > > Please respond to jboss-user > > > > > > > > > > On org.jboss.resource.adapter.jdbc.local.LocalConnection in 3.0.x and 3.2 > > david jencks > > On 2002.10.05 09:53:59 -0400 [EMAIL PROTECTED] wrote: > > > > Hi David. > > > > Thank you very much for your help. > > But I still have a little problem - do you mean method > > getUnderlyingConnection on tyrex.resource.jdbc.xa.TyrexConnection > > instance > > ? But it has a private access. > > > > > > More details : > > > > On JBoss 2.4 I used something like this : > > > > //Restoring connection from pool > > dataSource = (DataSource)ServiceLocator.getServiceLocator > > ().getJndiService(jndiDataSourceName); > > connection = dataSource.getConnection(); > > > > //Setting NLS ... > > setConnectionParams(result); > > > > where : > > > > dataSource is instance of javax.sql.DataSource > > connection is instance of java.sql.Connection > > > > and setConnectionParams performs setting NLS_LANGUAGE, NLS_TERRITORY > and > > NLS_SORT, NLS_DATE_FORMAT on the restored connection. > > > > > > In previous JBoss version it worked OK, but now it doesn't. > > > > > > Thank you. > > > > Marek > > > > > > > > > > > > > > > > David Jencks > > > > > [EMAIL PROTECTED] > > .com> cc: (bcc: > > Marek Sedliak/BYS/SOFTIP) > > Sent by:Subject: > Re: > > [JBoss-user] Initializing JDBC Connection II > > [EMAIL PROTECTED] > > > > eforge.net > > > > > > > > > > > > 05.10.2002 13:45 > > > > Please respond to jboss-user > > > > > > > > > > > > > > > > > > > > If you are doing this on a connection by connection basis, you would > need > > to get the underlying connection > > > > OracleConnection oc = (OracleConnection)c.getUnderlyingCon
Re: [JBoss-user] Initializing JDBC Connection II
Hi David, thanks. I tried that, but jboss-jca.jar has no class in package org.jboss.resource.adapter.jdbc.local. I use JBoss 3.0.2 - could this be a problem ? Do I have to uprade JBoss ? Thank you. Marek David Jencks cc: (bcc: Marek Sedliak/BYS/SOFTIP) Sent by:Subject: Re: [JBoss-user] Initializing JDBC Connection II [EMAIL PROTECTED] eforge.net 07.10.2002 21:04 Please respond to jboss-user On org.jboss.resource.adapter.jdbc.local.LocalConnection in 3.0.x and 3.2 david jencks On 2002.10.05 09:53:59 -0400 [EMAIL PROTECTED] wrote: > > Hi David. > > Thank you very much for your help. > But I still have a little problem - do you mean method > getUnderlyingConnection on tyrex.resource.jdbc.xa.TyrexConnection > instance > ? But it has a private access. > > > More details : > > On JBoss 2.4 I used something like this : > > //Restoring connection from pool > dataSource = (DataSource)ServiceLocator.getServiceLocator > ().getJndiService(jndiDataSourceName); > connection = dataSource.getConnection(); > > //Setting NLS ... > setConnectionParams(result); > > where : > > dataSource is instance of javax.sql.DataSource > connection is instance of java.sql.Connection > > and setConnectionParams performs setting NLS_LANGUAGE, NLS_TERRITORY and > NLS_SORT, NLS_DATE_FORMAT on the restored connection. > > > In previous JBoss version it worked OK, but now it doesn't. > > > Thank you. > > Marek > > > > > > > > David Jencks > > [EMAIL PROTECTED] > .com> cc: (bcc: > Marek Sedliak/BYS/SOFTIP) > Sent by:Subject: Re: > [JBoss-user] Initializing JDBC Connection II > [EMAIL PROTECTED] > > eforge.net > > > > > > 05.10.2002 13:45 > > Please respond to jboss-user > > > > > > > > > > If you are doing this on a connection by connection basis, you would need > to get the underlying connection > > OracleConnection oc = (OracleConnection)c.getUnderlyingConnection(); > > If this isn't what you want provide more details. > > david jencks > > On 2002.10.05 06:53:41 -0400 [EMAIL PROTECTED] wrote: > > Hi all, > > > > please, I would like to ask you about initializing JDBC connection - > I > > mean, I need to set up a few connection params that are application > > specific, e.g. for ORACLE - NLS_LANGUAGE, NLS_TERRITORY and NLS_SORT, > > NLS_DATE_FORMAT. I have found in the archive it's a problem now. In > JBoss > > 2.4 it worked after getting the connection from the pool. In JBoss 3.0 > it > > doesn't. > > Please, is there any correct way how to set up these params ? > > > > Thanks a lot. > > > > Marek > > > > > > > > > > > > --- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___
Re: [JBoss-user] Initializing JDBC Connection II
Hi David. Thank you very much for your help. But I still have a little problem - do you mean method getUnderlyingConnection on tyrex.resource.jdbc.xa.TyrexConnection instance ? But it has a private access. More details : On JBoss 2.4 I used something like this : //Restoring connection from pool dataSource = (DataSource)ServiceLocator.getServiceLocator ().getJndiService(jndiDataSourceName); connection = dataSource.getConnection(); //Setting NLS ... setConnectionParams(result); where : dataSource is instance of javax.sql.DataSource connection is instance of java.sql.Connection and setConnectionParams performs setting NLS_LANGUAGE, NLS_TERRITORY and NLS_SORT, NLS_DATE_FORMAT on the restored connection. In previous JBoss version it worked OK, but now it doesn't. Thank you. Marek David Jencks cc: (bcc: Marek Sedliak/BYS/SOFTIP) Sent by:Subject: Re: [JBoss-user] Initializing JDBC Connection II [EMAIL PROTECTED] eforge.net 05.10.2002 13:45 Please respond to jboss-user If you are doing this on a connection by connection basis, you would need to get the underlying connection OracleConnection oc = (OracleConnection)c.getUnderlyingConnection(); If this isn't what you want provide more details. david jencks On 2002.10.05 06:53:41 -0400 [EMAIL PROTECTED] wrote: > Hi all, > > please, I would like to ask you about initializing JDBC connection - I > mean, I need to set up a few connection params that are application > specific, e.g. for ORACLE - NLS_LANGUAGE, NLS_TERRITORY and NLS_SORT, > NLS_DATE_FORMAT. I have found in the archive it's a problem now. In JBoss > 2.4 it worked after getting the connection from the pool. In JBoss 3.0 it > doesn't. > Please, is there any correct way how to set up these params ? > > Thanks a lot. > > Marek > > > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Initializing JDBC Connection II
Hi all, please, I would like to ask you about initializing JDBC connection - I mean, I need to set up a few connection params that are application specific, e.g. for ORACLE - NLS_LANGUAGE, NLS_TERRITORY and NLS_SORT, NLS_DATE_FORMAT. I have found in the archive it's a problem now. In JBoss 2.4 it worked after getting the connection from the pool. In JBoss 3.0 it doesn't. Please, is there any correct way how to set up these params ? Thank a lot. Marek --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] ejb foreign contsraints question
Hi Bryan, as for me, the problem is not on JBoss side. We have a similar scenario and it works great. We use oracle too. How do you perform insert into a file table ? Marek bryan hansen <[EMAIL PROTECTED]>To: [EMAIL PROTECTED] Sent by:cc: (bcc: Marek Sedliak/BYS/SOFTIP) [EMAIL PROTECTED]Subject: [JBoss-user] ejb foreign contsraints question eforge.net 21.03.2002 15:24 I have a question as to if this will work in JBoss. I have tried this in IPlanet (which sucks) and it is not working, but I believe that it should. I have an statless session ejb that starts a user transaction called process. It then calls a statless session ejb named file that inserts some data into an oracle database. When finished with that the process ejb then calls a different stateless session bean named collateral. The collateral table has a foreign key constraint to the file table, but since this is in the same user transaction it has not written the data out to the file table to complete the foreign key constraint. I think that the container should handle this, but other people think otherwise. Any comments? Suggestions? I want to try this in JBoss, but haven't had the time to set it up and a database on a different machine. Thanks, Bryan __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Someone PLEASE advise re: Client UserTransactions nevercommiting
I have met the similar problem. The reason - Connection.closed() was not called, i.e. commit was not realized. Try to review your code from this point of view. Mark Bryan Field-Elliot <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent by:cc: (bcc: Marek Sedliak/BYS/SOFTIP) [EMAIL PROTECTED]Subject: [JBoss-user] Someone PLEASE advise re: Client eforge.net UserTransactions never commiting 19.01.2002 02:20 I am hoping someone can help me solve a problem I'm having with JBoss 2.4.4 (using RedHat Linux 7.1 and PostgreSQL 7.0.2). My client application manipulates several entity beans. I know that a better design would be to use a session facade, but that's not an option in the short term. In any case -- I've introduced the use of UserTransaction from the client. I obtain a UserTransaction and call "begin". Then I manipulate my entity beans. Finally, I call "UserTransaction.commit()". My changes are being written to the database, but, they are not being commited. I know this because when my application tries to read the values back, the new values are shown. But another application, connecting directly to PostgreSQL, shows the old values. Lastly, when I restart JBoss or reload the EAR file, all the old values come back. My CMP beans are marked as "Requires" a transaction. Can anyone please help me deduce what's going wrong, and why my commit() calls don't seem to be doing anything? Thank you, Bryan ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Please help
Hi All, please I would like to ask you for help. I use JBoss-2.2.2_Tomcat-3.2.2 and I have a problem when I try to use my stateless EJB sk.softip.ejb.util.EjbDispatcher after approx 20 minuts of waiting. I get this exception. Are there some ideas ? java.lang.NullPointerException at org.opentools.minerva.cache.LeastRecentlyUsedCache.checkMaxSize(LeastRecentlyUsedCache.java:183) at org.opentools.minerva.cache.LeastRecentlyUsedCache.addObject(LeastRecentlyUsedCache.java:158) at org.opentools.minerva.cache.LeastRecentlyUsedCache.getObject(LeastRecentlyUsedCache.java:106) at org.opentools.minerva.cache.LeastRecentlyUsedCache.useObject(LeastRecentlyUsedCache.java:35) at org.opentools.minerva.jdbc.xa.wrapper.XAClientConnection.prepareStatement(XAClientConnection.java:167) at sk.softip.dao.HandlerBase.executeQuery(HandlerBase.java:107) at sk.softip.dao.HandlerBase.executeQuery(HandlerBase.java:73) at sk.softip.util.security.UserPermission.getPermission(UserPermission.java:107) at sk.softip.ejb.util.EjbDispatcher.checkClientAuthorizedForMethod(EjbDispatcher.java:228) at sk.softip.ejb.util.EjbDispatcher.processRequest(EjbDispatcher.java:126) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:472) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:87) at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:271) at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:482) at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:152) at $Proxy326.processRequest(Unknown Source) at sk.softip.servlet.ServletDispatcher.processRequest(ServletDispatcher.java:69) at sk.softip.servlet.ServletDispatcher.doPost(ServletDispatcher.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Unknown Source) My JBoss.jcml OracleDB org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl jdbc:oracle:thin:@APPSERVER:1521:ORA test test 120 50 true false false true 12 90 true false 1.0 10 Thanks a lot. Mark ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user