[JBossCache] - JDBCCacheLoader Problems
by chicago_pool_dude
I am trying to use the JDBC Cache Loader to persist TreeCache to DB, Here is how i do it....
public void configureCache(){
try {
System.out.println("Inside configureCache");
Properties properties = new Properties();
try {
properties.load(new FileInputStream("jdbc-cache.properties"));
} catch (IOException e) {
e.printStackTrace();
}
PropertyConfigurator config = new PropertyConfigurator();
config.configure(cache,getConfigFile());
JDBCCacheLoader jdbcCacheLoader=new JDBCCacheLoader();
jdbcCacheLoader.setConfig(properties);
jdbcCacheLoader.setCache(cache);
jdbcCacheLoader.create();
jdbcCacheLoader.start();
Fqn fqn=new Fqn("PaymentCache");
System.out.println(cache.get(fqn));//I get NULL HERE
} catch(Exception e) {
e.printStackTrace();
}
I am following the life cycle of Loader as described in API fo CacheLoader interface. But i do a get on TreeCache cache i get a null pointer, looks like the cache is not getting any thing from loader the data is avaliable on the DB i can directly do a get on jdbccacheloader and get the info.
Where am i going wrong is this the right way to attach a loader to TreeCache....
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959717#3959717
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959717
19 years, 9 months
[Security & JAAS/JBoss] - Strange interpetation of a CSS link inside login page
by nvanevski
Hi all,
I ran into a pretty strange issue with CSS links inside the login page, using FORM authentication method. Take a look at this page header :
| <html>
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
| <title>Main login page</title>
| <link href="css/main.css" rel="stylesheet" type="text/css">
| </head>
| <body>
| --- rest of the page ---
|
This code works fine when the page is shown standalone, and elements are shown according to definitions in the css file. However, once I put this page in <form-login-page>, following things happen :
- Elements lose their properties, like the css is not included at all
- After succesfull login, user is redirected to the css/main.css file, i.e. contents of the css file are shown in the browser (is this some shortcut for redirection to a specific file different from the welcome file?)
If I remove the <link href = ...> tag and put all css styles inside a "style" tag, everything is ok.
However, I'd like to have the styles inside a css (normally) and page should be displayed accordingly. Is this a configuration issue or a bug?
I repeat that if I get the page out of the <form-login-page> tag in web.xml, it is displayed properly, and the user is normally redirected to index.jsp file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959714#3959714
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959714
19 years, 9 months