[JBoss AOP] - Re: Is there a static vs. dynamic binding problem with jboss
by manu4ever
Actually I was wrong to say that it was reading SUBPOJO.field. It's actually reading POJO.field. The problem is that when I try to write to SUBPOJO.field, the code is rewritten by jboss AOP in such a way that it writes to POJO.field instead.
The problem seems to be the mechanism used to intercept field accesses. Static methods for read and write accesses to POJO.field are added to POJO. However in SUBPOJO, the same static methods in POJO are used again when attempting to access SUBPOJO.field.
So in the example above, what is actually happening is that the constructor for SUBPOJO is correctly calling POJO's constructor with an arg of 1, but is then calling POJO.field_r_$aop() or whatever it's called, in the misguided belief that this will set SUBPOJO.field, or that the two are the same which they obviously aren't.
Comments?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968147#3968147
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968147
19 years, 8 months
[JBossCache] - JBoss Cache Cluster Problem within JBoss AS 4.0.2
by gh_aiyz
Hi all, I got a problem when use JBoss Cache 1.4.0 within JBoss AS 4.0.2.
I have two application servers. when they start up, the caches can find each other, and fetch the in-memory status successfully. But when I put an object into cache A, it does not replicate the object to cache B; however, when I remove this object from A, it's also removed from B....
Yes, the insert is not replicated while the removing is replicated successfully.
what's wrong with my configuration? Please help me.
<!-- ==================================================================== -->
| <!-- JBoss Cache -->
| <!-- ==================================================================== -->
| <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=V360WebLayerCache">
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
| <attribute name="TransactionManagerLookupClass">
| org.jboss.cache.JBossTransactionManagerLookup
| </attribute>
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
| <attribute name="CacheMode">REPL_SYNC</attribute>
| <attribute name="FetchInMemoryState">true</attribute>
| <attribute name="ClusterName">${aa.cache.cluster.name}.web</attribute>
| <attribute name="ClusterConfig">
| <config>
| <UDP mcast_port="${aa.cache.cluster.port}" ip_ttl="64" ip_mcast="true"
| mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
| ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
| loopback="false" />
| <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" up_thread="false"
| down_thread="false" />
| <pbcast.STABLE desired_avg_gossip="20000"
| up_thread="false" down_thread="false" />
| <UNICAST timeout="600,1200,2400" window_size="100"
| min_threshold="10" 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="true" />
| <pbcast.STATE_TRANSFER up_thread="false"
| down_thread="false" />
| </config>
| </attribute>
| <attribute name="InitialStateRetrievalTimeout">20000</attribute>
| <attribute name="SyncReplTimeout">15000</attribute>
| <attribute name="LockAcquisitionTimeout">10000</attribute>
| <!--attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">200</attribute>
| <region name="/${aa.cache.web.fid.root}">
| <attribute name="maxNodes">${aa.cache.web.fid.maxNode}</attribute>
| <attribute name="timeToLiveSeconds">${aa.cache.web.fid.timeToLive}</attribute>
| </region>
| <region name="/${aa.cache.web.guitext.root}">
| <attribute name="maxNodes">${aa.cache.web.guitext.maxNode}</attribute>
| <attribute name="timeToLiveSeconds">${aa.cache.web.guitext.timeToLive}</attribute>
|
| </region>
| <region name="/${aa.cache.web.bizdomain.root}">
| <attribute name="maxNodes">${aa.cache.web.bizdomain.maxNode}</attribute>
| <attribute name="timeToLiveSeconds">${aa.cache.web.bizdomain.timeToLive}</attribute>
|
| </region>
| <region name="/${aa.cache.web.constant.root}">
| <attribute name="maxNodes">${aa.cache.web.constant.maxNode}</attribute>
| <attribute name="timeToLiveSeconds">${aa.cache.web.constant.timeToLive}</attribute>
|
| </region>
| <region name="/${aa.cache.web.gview.root}">
| <attribute name="maxNodes">${aa.cache.web.gview.maxNode}</attribute>
| <attribute name="timeToLiveSeconds">${aa.cache.web.gview.timeToLive}</attribute>
|
| </region>
| <region name="/${aa.cache.web.general.root}">
| <attribute name="maxNodes">${aa.cache.web.general.maxNode}</attribute>
| <attribute name="timeToLiveSeconds">${aa.cache.web.general.timeToLive}</attribute>
|
| </region>
| </config>
| </attribute-->
| </mbean>
|
|
|
| <!-- ==================================================================== -->
| <!-- JBoss Cache JNDI -->
| <!-- ==================================================================== -->
| <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
| name="mydomain:service=proxyFactory,type=jrmp,target=factory">
| <attribute name="InvokerName">
| jboss:service=invoker,type=jrmp
| </attribute>
| <attribute name="TargetName">
| jboss.cache:service=V360WebLayerCache
| </attribute>
| <attribute name="JndiName">${aa.cache.jndi.name}</attribute>
| <attribute name="InvokeTargetMethod">true</attribute>
| <attribute name="ExportedInterface">
| org.jboss.cache.TreeCacheMBean
| </attribute>
| <depends>jboss:service=invoker,type=jrmp</depends>
| <depends>jboss.cache:service=V360WebLayerCache</depends>
| </mbean>
|
All the ${} variables are in an individual file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968144#3968144
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968144
19 years, 8 months
[JNDI/Naming/Network] - Re: java.naming.provider.url parsing problem?
by csturtz
I was finally able to get a connection using some different properties. Here's the jndi.propperties I am now using:
anonymous wrote : java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
| java.naming.provider.url=http://localhost:8080/invoker/JNDIFactory
| java.naming.factory.url.=org.jboss.naming.client
Now, I'm getting:
anonymous wrote : javax.naming.NameNotFoundException: OracleDS not bound
even though the log during jboss startup says that it's bound:
anonymous wrote : 11:33:47,819 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=OracleDS' to JNDI name 'java:OracleDS'
Plus, i have no problems when running the actual web application. It's only during integration tests where I'm outside the JBoss JVM that I am having this problem. So, I know the data source is bound and can be used without problems.
Here's the code getting the DS:
anonymous wrote : InitialContext initialContext = new InitialContext();
| javax.sql.DataSource ds = (javax.sql.DataSource) initialContext.lookup("java:OracleDS");
| Connection connection = ds.getConnection();
Ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968139#3968139
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968139
19 years, 8 months