[JBoss Cache: Core Edition] - Re: Config Question
by lovelyliatroim
anonymous wrote :
| The TM should only be used if either:
|
| 1. You have a need for JTA transactions in your application and you need the cache to participate in these transactions.
| 2. You are using OPTIMISTIC locking.
|
| If either of the above are true, you should use a TM.
|
| There is a third argument to use a TM, and this is to batch up modifications. E.g., multiple calls to cache.put() will result in multiple replication events but if you wrap these in a transaction, then replication occurs when the transaction commits, as a single message, which could be more efficient.
|
| Isolation level applies to in-memory locking as well so it is relevant even if you are not using a TM.
|
Thanks for that Manik.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163591#4163591
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163591
17 years, 9 months
[JBoss Cache: Core Edition] - Re: Config Question
by lovelyliatroim
Forgot something
I see also alot of these print outs for my cache using the ExpirationPolicy
anonymous wrote :
| 14:09:53 [EvictionTimer-0] WARN eviction.ExpirationAlgorithm - Unable to remove nodes to reduce region size below 5000. Set expiration for nodes in this region
|
Now my problem with that is that the region its talking about would only have 2-3 nodes in this region but i get the above output every time the expiration policy runs. Why is this??
I think i kind of know the reason but cant say for sure but here is what i am doing
I have a branch called "root/a", i configure the expiration policy for the region "root/a" to be allowed to have 5000 nodes.
When an items are added to the branch "root/a" it can look like so
"root/a/b/c/1"
"root/a/b/c/2"
"root/a/d/c/1"
Now the expiration key is only added to the very last node, so in this case the numeric values. So when eviction kicks in and nodes are valid for eviction it will only evict the numerical nodes, so after eviction i have the following
"root/a/b/c"
"root/a/b/c"
"root/a/d/c"
Now why would i keep getting that warning message when i am not exceeding the limit configured for that region?
Another problem i have with the above strategy for my expiration policy is that i end up with dead branches after eviction i.e the data item i need is evicted but the path to reach it lives on. So take for example
"root/a/b/c/1"
And the data item i want to cash is in node "1", after eviction my tree looks like so
"root/a/b/c"
Essentially the nodes "b" and "c" are dead wood, the data item has been evicted but the path lives on. Is there a better approach to this??
A thought would be to use the path keys on one node level so for example
"root/a/b-c-1"
Which i have no problem in doing but how does the performance compare for locating an item??So you could say depth vs breath, which is the quickest for getting a dataitem??
Any other approaches that i could use??
Thanks Guys,
LL
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163588#4163588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163588
17 years, 9 months
[JNDI/Naming/Network] - Data Source JNDI lookup fails in a WAR
by avyo
Hi All,
I'm running my app on jboss 4.2.0, using a MSSql as a database ans spring.
My Data source:TestDB-ds.xml
<local-tx-datasource>
<jndi-name>TestDB</jndi-name>
<connection-url> jdbc:sqlserver://muzicall01;database=muzicall_dev</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>xxx</user-name>
<p assword>xxx</p assword>
</local-tx-datasource>
The JNDI lookup in spring:
<jee:jndi-lookup id="dataSource" jndi-name="java:TestDB"/>
In a regular EAR deployment it is working just find but when I moved to a WAR I got javax.naming.NameNotFoundException
Follow my JNDI tree:
java: Namespace
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- comp (class: javax.naming.Context)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- jaas (class: javax.naming.Context)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- comp.original (class: javax.namingMain.Context)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
+- TestDB (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+- Mail (class: javax.mail.Session)
+- comp.ejb3 (class: javax.naming.Context)
| NonContext: null
+- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)
I made a small test - in a servlet I inserted those two rows:
((Object)context.lookup("java:SecurityProxyFactory")).getClass().getName();
((Object)context.lookup("java:TestDB")).getClass().getName();
Both JNDI names are from the same level for the first one I got the right class and for the second I dont the name not found.
Any idea why I can find the DS an EAR deployment and not on a WAR one.
You help will be appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163581#4163581
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163581
17 years, 9 months
Re: CAS JBOSS PORTAL INTEGRATION
by samk@twinix.com
See Thread at: http://www.techienuggets.com/Detail?tx=25191 Posted on behalf of a User
Please Can you tell how to make jboss portal cas integration
In Response To:
Greetings,
I have setup JBoss Portal and CAS to authenticate against my LDAP system and everything is working well. Now I tried to integrate an external J2EE application running in a separate tomcat using the IFramePortlet from Portletswap. This application authenticates against the CAS using Soulwing CAS client from http://www.soulwing.org which is also working correctly.
My problem is that I can login to the portal, but it seems that the ticket from CAS is not propagated to the IFramePortlet and thus, it only shows the CAS login screen (which is correct in case the external app. does not receive a valid ticket). Another login with the same credentials here finally gives access to the external application.
Furthermore, I am not able to read any CAS-related information from the session, i.e. via
session.getAttribute("edu.yale.its.tp.cas.client.filter.user")
in a JSP. This is only returning null and I suspect that there is no ticket present in the session or it has been removed somehow, as the first login to the portal is apparently granting a valid ticket:
2008-02-17 16:07:34,828 INFO [STDOUT] 2008-02-17 16:07:34,827 INFO [org.jasig.cas.CentralAuthenticationServiceImpl] - <Granted service ticket [ST-1-5307CdujPPXozCAjlrjF] for service [http://localhost:8080/portal/auth/dashboard] for user [user]>
Any help on how to pass the ticket to the application in IFramePortlet is greatly appreciated... (Sohil? ;-) )
Many thanks in advance,
Chris
17 years, 9 months