[JCA/JBoss] - Results caching in Connection Pool
by harish_here
We are using JBoss 4.0.2 with MySQL 5.0. We are using Connection Pooling of JBoss with MySQL database. The records updated in one query in not getting reflected in another query though the records are committed and is updated in database.
For ex: A connection X is feteched from connection pool (using datasource & JNDI mapping). Some fields of a record are updated with this "X" connection and transaction is committed. The connection is then closed. Immediately after this, a new connection "Y" is fetched from connection pool (this returns an different connection from pool) and same record is fetched. However it shows up data prior to the updation!!! But the same data is reflected in database. After sometime (1 min or idle-timeout-in-minutes value), if the records are fetched again, it shows up the new/updated data. I assume there is some caching of results at the Jboss connection pool level.
Please let me know if there is some problem with configuration.
Following is the mysql-ds.xml for the same
********************************************************
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://172.17.182.102:3306/uiia</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>x</user-name>
y
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>1</idle-timeout-minutes>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
*****************************************************
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965420#3965420
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965420
19 years, 9 months
[JBoss Seam] - Re: Calling Seam Components (Stateless EJB) outside Seam app
by msteiner
With MDB it doesnt work either. I have MDB (with @name annotation). When I send JMS Message I get NPE:
| Caused by: java.lang.NullPointerException
| at org.jboss.seam.Component.forName(Component.java:1298)
| at org.jboss.seam.ejb.SeamInterceptor.getSeamComponent(SeamInterceptor.java:166)
| at org.jboss.seam.ejb.SeamInterceptor.postConstruct(SeamInterceptor.java:72)
| at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.LifecycleInvocationContextImpl.proceed(LifecycleInvocationContextImpl.java:131)
| at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postConstruct(LifecycleInterceptorHandler.java:105)
| ... 15 more
|
Seam version from CVS.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965416#3965416
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965416
19 years, 9 months
[Clustering/JBoss] - JBoss 4.0.4GA HA-JNDI not working
by jamestang
I have a very simple SLSB written in EJB3. The packaged EAR file is copied to "all/deploy" directory in two JBoss 4.0.4GA instances on two machines, n1 and n2. These two JBoss instances form a cluster within one subnet with same out-of-box configurations. The SLSB has annotation @Clustered. When looking up the SLSB, according to the JBoss clustering manual, the application client uses HA-JNDI:props.put(Context.PROVIDER_URL, "n1:1100,n2:1100")The app client worked fine.
To simulate the failover, I undeployed myapp.ear from n1 by deleting it from "all/deploy" on n1 machine. At this time, both JBoss instances are running, but only n2 has my app deployed. Now executing the same app client, it hangs for about 30 seconds, then prints out "JNDI lookup fail" error.
If I use: props.put(Context.PROVIDER_URL, "n2:1100") the app client works.
If I stopped n1 instance, let the n2 instance running. The app client works with props.put(Context.PROVIDER_URL, "n1:1100,n2:1100")
Before and after undeploying myapp.ear from n1, I looked at JMX console of the cluster. Clicked on the jboss:service=DefaultPartition MBean. A list of IP addresses for the cluster members (n1 and n2) is shown in the CurrentView field. So I think JGroup is working fine here.
Are there any other configurations need to be changed?
Thanks,
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965411#3965411
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965411
19 years, 9 months