[JBoss Seam] - Problem with cache config in unit tests
by endremr
Hi!
I have a Seam application (v1.2.1) where I have started to use JBoss Cache as an entity cache. The application is deployed within JBoss 4.0.4, and things seems to work. I use the following config in "persistence.xml":
| <persistence-unit name="NewsAdminSesamNoDatabase">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/NewsAdminSesamNoDS</jta-data-source>
| <properties>
| <!-- Uses JBoss Cache as entity cache. -->
| <property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook"/>
| <property name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache"/>
| <!-- Enabled query cache. -->
| <property name="hibernate.cache.use_query_cache" value="true"/>
| </properties>
| </persistence-unit>
|
The problem is that my tests now breaks because I can't manage to get things running in the embedded jboss. Usually I use ehcache in my tests using the provider class "HashtableCacheProvider", defined in "default.persistence.properties".
But the TreeCache config in "persistence.xml" seems to override my test config. I have tried to include jboss-cache in my test classpath, but then my tests fail since "EJB3EntityTreeCache" is not deployed, and I don't know how I can do this.
Anybody that can give me an advice how to solve this?
Thanks :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100522#4100522
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100522
17Â years, 2Â months
[JBoss Portal] - Can not be back to home(default page)any more when you click
by tomoon
Hi,
I found a strange thing in JBoss CMS portal2.6.2.
I want to integrate a small web site (some static html pages) into JBoss CMS.
Step 1:
I create a clean JBoss portal with instruments--http://wiki.jboss.org/wiki/Wiki.jsp?page=CleanPortalSamplesF...
Step 2:
I changed the content in one config file to:
<portlet-preferences>
| <preference>
| <name>indexpage</name>
| <!--value>/default/index.html</value-->
| <value>/myfolder/pages/index.html</value>
| </preference>
| </portlet-preferences>
|
And change another config file to:
<window>
| <window-name>CMSWindow</window-name>
| <content>
| <content-type>cms</content-type>
| <content-uri>/myfolder/pages/index.html</content-uri>
| </content>
| <region>left</region>
| <height>0</height>
| </window>
|
BTW?I just use left column to show something here.
Step 3:
I created some menu and sub-menu using JBoss portal, just like below:
Home About Us Help
Sub-menu1
Sub-menu2
There are some html pages including Legal link fragment:
?
| <!--footer-->
| <div id="footer">
| <ul id="navFooter">
| <li>© 2007 MyCompany. All rights reserved.</li>
| <li><a HREF="/portal/content/myfolder/pages/legal.html">Legal Information.</a></li>
| </ul>
| </div>
| <!--/footer-->
| ?
|
Reproduce the problem as follows:
Step 1:
Using http://localhost:8080/portal can be linked to default page
Step 2:
Click the home menu can display default page and browser URL will be http://localhost:8080/portal/portal/default/default
Step3:
Click the menu sub_memu1 can display the right page as well other menus, click home menu, you can get the default page without any problem.
Step4:
In default page, click the Legal link at the bottom of default pages, the Legal page can be displayed. PROBLEM comes at this point now, if we click the Home menu, the page will stay in legal page, we can not be back to default page any more!!!. I verified it with other pages which includes a link (link to Html page, not images) in page, the same thing happened, it is so weird!!. However if you click logout, you will get the default page again.
The url is http://localhost:8080/portal/portal/default .
Is it a Bug or something I missed?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100517#4100517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100517
17Â years, 2Â months