What is RSS?
[Persistence,JBoss/CMP, Hibernate, Database] - Strange Behaviour with JBoss using Cache and JCA
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Java Programming > [Persistence,JBoss/C­MP, Hibernate, Database] - Strange Behaviour with JBoss using Cache and JCA 21 April 2006 10:17:54

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

[Persistence,JBoss/C­MP, Hibernate, Database] - Strange Behaviour with JBoss using Cache and JCA

Manjith27 21 April 2006 10:17:54
 Hi,

I am using Hibernate 3.1, JBoss 4.0.2 and Oracle 10g as the Database.

I am using JCA and Caching. I have implemented JBossCacheService for caching. I am experiencing a strange behaviour whenever the Jboss is started for every 1st request from my test JSP.Whichever method I have invoked is internally invoked as toString() instead of the actual method but from the 2nd and subsequent requests the method which is getting invoked is the same method whivh I have called from Jboss.
I feel there is something wrong with my configurations.

I have configured my oracle-xa-ds.xml as following : -

<datasources>
| <ha-xa-datasource>
| <jndi-name>XAOracle­DS</jndi-name>
| <use-java-context>f­alse</use-java-conte­xt>
| <track-connection-b­y-tx/>
| <isSameRM-override-­value>false</isSameR­M-override-value>
| <xa-datasource-clas­s>oracle.jdbc.xa.cli­ent.OracleXADataSour­ce</xa-datasource-cl­ass>
| <xa-datasource-prop­erty name="URL">jdbc:ora­cle:thin:@localhost:­1521:XE|jdbc:oracle:­thin:@ip:1521:test</­xa-datasource-proper­ty>
| <url-property>URL</­url-property>
| <url-delimeter>|</u­rl-delimeter>
| <xa-datasource-prop­erty name="User">test</x­a-datasource-propert­y>
| <xa-datasource-prop­erty name="Password">tes­t</xa-datasource-pro­perty>
| <min-pool-size>1</m­in-pool-size>
| <max-pool-size>10</­max-pool-size>
| <exception-sorter-c­lass-name>org.jboss.­resource.adapter.jdb­c.vendor.OracleExcep­tionSorter</exceptio­n-sorter-class-name>­
| <!-- <check-valid-connec­tion-sql>"select count(*) from product"</check-val­id-connection-sql> -->
| <!-- sql to call when connection is created -->
| <new-connection-sql­>select count(*) from product</new-connec­tion-sql>
|
| <metadata>
| <type-mapping>Oracl­e10g</type-mapping>
| </metadata>
| </ha-xa-datasource>­
|
| <mbean code="org.jboss.res­ource.adapter.jdbc.v­endor.OracleXAExcept­ionFormatter"
| name="jboss.jca:ser­vice=OracleXAExcepti­onFormatter">
| <depends optional-attribute-­name="TransactionMan­agerService">jboss:s­ervice=TransactionMa­nager</depends>
| </mbean>
|
| </datasources>

My hibernate-cfg.xml is: -

<?xml version='1.0' encoding='utf-8'?>
| <!DOCTYPE hibernate-configura­tion PUBLIC
| "-//Hibernate/Hiber­nate Configuration DTD 3.0//EN"
| "http://hibernate.s­ourceforge.net/hiber­nate-configuration-3­.0.dtd">
| <hibernate-configur­ation>
|
| <!-- a SessionFactory instance listed as /jndi/name -->
| <session-factory>
|
| <!-- properties -->
|
| <property name="hibernate.cac­he.provider_class">o­rg.hibernate.cache.T­reeCacheProvider</pr­operty>
| <property name="hibernate.cac­he.use_query_cache">­true</property>
| <property name="hibernate.cac­he.use_second_level_­cache">true</propert­y>
| <property name="hibernate.cac­he.use_minimal_puts"­>true</property>
| <property name="hibernate.cac­he.use_structured_en­tries">true</propert­y>
| <property name="current_sessi­on_context_class">th­read</property>
|
| <property name="show_sql">tru­e</property>
| <property name="use_outer_joi­n">true</property>
|
| <!-- mapping files -->
|
| <mapping resource="hibernate­-config/com/dnaO2/in­fra/persistence/bean­/Basket.hbm.xml" />
| </session-factory>
|
| </hibernate-configu­ration>
|

My treecache.xml is : -


| <?xml version="1.0" encoding="UTF-8"?>
|
| <!-- ===================­====================­====================­========== -->
| <!-- -->
| <!-- Sample TreeCache Service Configuration -->
| <!-- -->
| <!-- ===================­====================­====================­========== -->
|
| <server>
|
| <classpath codebase="./lib" archives="jboss-cac­he.jar, jgroups.jar"/>
|
|
| <!-- ===================­====================­====================­========= -->
| <!-- Defines TreeCache configuration -->
| <!-- ===================­====================­====================­========= -->
|
| <mbean code="org.jboss.cac­he.TreeCache"
| name="jboss.cache:s­ervice=TreeCache">
|
| <depends>jboss:serv­ice=Naming</depends>­
| <depends>jboss:serv­ice=TransactionManag­er</depends>
|
| <!--
| Configure the TransactionManager
| -->
| <attribute name="TransactionMa­nagerLookupClass">or­g.jboss.cache.JBossT­ransactionManagerLoo­kup</attribute>
|
|
| <!--
| Node locking level : SERIALIZABLE
| REPEATABLE_READ (default)
| READ_COMMITTED
| READ_UNCOMMITTED
| NONE
| -->
| <attribute name="IsolationLeve­l">SERIALIZABLE</att­ribute>
|
| <!--
| Valid modes are LOCAL
| REPL_ASYNC
| REPL_SYNC
| -->
| <attribute name="CacheMode">LO­CAL</attribute>
|
|
| <!--
| Just used for async repl: use a replication queue
| -->
| <attribute name="UseReplQueue"­>false</attribute>
|
| <!--
| Replication interval for replication queue (in ms)
| -->
| <attribute name="ReplQueueInte­rval">20000</attribu­te>
|
| <!--
| Max number of elements which trigger replication
| -->
| <attribute name="ReplQueueMaxE­lements">5</attribut­e>
|
|
| <!-- Name of cluster. Needs to be the same for all clusters, in order
| to find each other
| -->
| <attribute name="ClusterName">­TreeCache-Cluster</a­ttribute>
|
| <!-- JGroups protocol stack properties. Can also be a URL,
| e.g. file:/home/bela/def­ault.xml
| <attribute name="ClusterProper­ties"></attribute>
| -->
|
| <attribute name="ClusterConfig­">
| <config>
| <!-- UDP: if you have a multihomed machine,
| set the bind_addr attribute to the appropriate NIC IP address -->
| <!-- UDP: On Windows machines, because of the media sense feature
| being broken with multicast (even after disabling media sense)
| set the loopback attribute to true -->
| <UDP mcast_addr="228.1.2­.3" mcast_port="45566"
| ip_ttl="32" ip_mcast="true"
| mcast_send_buf_size­="80000" mcast_recv_buf_size­="150000"
| ucast_send_buf_size­="80000" ucast_recv_buf_size­="150000"
| loopback="true"/>
| <PING timeout="2000" num_initial_members­="3"
| up_thread="false" down_thread="false"­/>
| <MERGE2 min_interval="10000­" max_interval="20000­"/>
| <FD shun="true" up_thread="true" down_thread="true"/­>
| <VERIFY_SUSPECT timeout="1500"
| up_thread="false" down_thread="false"­/>
| <pbcast.NAKACK gc_lag="50" retransmit_timeout=­"600,1200,2400,4800"­
| max_xmit_size="8192­" up_thread="false" down_thread="false"­/>
| <UNICAST timeout="600,1200,2­400" window_size="100" min_threshold="10"
| down_thread="false"­/>
| <pbcast.STABLE desired_avg_gossip=­"20000"
| up_thread="false" down_thread="false"­/>
| <FRAG frag_size="8192"
| down_thread="false"­ up_thread="false"/>­
| <pbcast.GMS join_timeout="5000"­ join_retry_timeout=­"2000"
| shun="true" print_local_addr="t­rue"/>
| <pbcast.STATE_TRANS­FER up_thread="false" down_thread="false"­/>
| </config>
| </attribute>
|
|
| <!--
| The max amount of time (in milliseconds) we wait until the
| initial state (ie. the contents of the cache) are retrieved from
| existing members in a clustered environment
| -->
| <attribute name="InitialStateR­etrievalTimeout">500­0</attribute>
|
| <!--
| Number of milliseconds to wait until all responses for a
| synchronous call have been received.
| -->
| <attribute name="SyncReplTimeo­ut">10000</attribute­>
|
| <!-- Max number of milliseconds to wait for a lock acquisition -->
| <attribute name="LockAcquisiti­onTimeout">15000</at­tribute>
|
| <!-- Name of the eviction policy class. Not supported now. -->
| <attribute name="EvictionPolic­yClass"></attribute>­
|
|
| <attribute name="FetchStateOnS­tartup">true</attrib­ute>
|
| </mbean>
|
| </server>
|
|

Can anyboody explain why I am experiencing this kind of the problem.

Thanks in Advance for any suggestion.

Thanks
Manjith.

View the original post : http://www.jboss.co­m/index.html?module=­bb&op=viewtopic&p=39­38584#3938584

Reply to the post : http://www.jboss.co­m/index.html?module=­bb&op=posting&mode=r­eply&p=3938584


-------------------­--------------------­----------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.fa­lkag.net/sel?cmd=lnk­&kid=120709&bid=2630­57&dat=121642
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Java Programming > [Persistence,JBoss/C­MP, Hibernate, Database] - Strange Behaviour with JBoss using Cache and JCA 21 April 2006 10:17:54

see also:
Require_once(_)...when does it reset?
SOAP w/PHP 4
beginnind and end of the week
пройди тесты:
see also:
My Jesus
Love
All about my christ

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .