I've posted this in the beginner's forum, but maybe it better belongs here:
I need to integrate my JBoss app's authentication with a separate Ruby on Rails server. I've setup a servlet that takes a jsessionid as a query parameter, and returns a message saying if that jsessionid is authenticated (logged in). But I'm stumped as to how to find the HttpSession object for a particular jsessionid.
It seems like it was very easy to do in previous versions of JBoss: in any servlet obtain the session context, the get the session according to jsessionid:
HttpSession s = request.getSession().getSessionContext().getSession(JSESSIONID);
However, this has been 'deprecated with no replacement.', and getSession always returns null. I haven't yet found an explanation as to why this was deprecated.
I've read people suggent implementing a SessionListener, then recording the information I need in some kind of global variable myself. However, since I'm working with a clustered JBoss, I'd then need to make a JBoss Cache instance to share it -- and then it seems like I'm just recreating what the JBoss session management does by itself! I know the information is there in JBoss -- I just need a way to get to it!
Any help much appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161623#4161623
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161623
I'm implementing a standalone cache (not using any other JBoss packages) and am looking for information on what TransactionManager to use.
Currently it falls back to "DummyTransactionManager" and that seems to be unfit for production use. The only other TM in the jboss-cache-core package is the BatchModeTransactionManager, it's code indicates it is for POJO caches.
I ask because I think my other issue (posted below, regarding memory usage) is linked to uncommitted transactions filling up memory. When I try to commit the transactions as such:
| GenericTransactionManagerLookup tml = new GenericTransactionManagerLookup();
I get the following exception:
| java.lang.IllegalStateException: thread not associated with transaction
| at org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:74)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161617#4161617
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161617