[Microcontainer] - Re: Howto inject beans into a collection
by Welle
Hmm... Perhaps I should mention that I trying to get it to work under JBoiss AS 5.
It doesn't seem to recognize the "inject" within a "value" element:
org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:bean-deployer:2.0}inject not found as a child of {urn:jboss:bean-deployer:2.0}value
Here is my simple testclass B
package xxx.xxx.xxx;
|
| import java.util.List;
|
| public class B {
|
| private List actions = null;
|
| public void setActions(List actions) {
| this.actions = actions;
| }
| }
I also tried to create the bean within the "inject" without luck.
bean name="a" class="xxx.xxx.A">
| <property name="listOfB">
| <list elementClass="xxx.xxx.B">
| <value><bean name="b1" class="xxx.xxx.B">...</bean></value>
| </list>
| </property>
| </bean>
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212134#4212134
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212134
17 years, 2 months
[EJB/JBoss] - Second levele caching: Database connection issue in load tes
by preddy1104
I am new to JBoss caching and trying to use second level caching with ejb3 entity beans. By looking at the document I have configured my entity bean to use jboss caching as second level caching. It is failing in load testing. I am getting an error related to database connection availablity.
Using JBoss Cache 3.0.2
Configurations used:
I have configured persistence.xml with the following properties
name="hibernate.cache.use_second_level_cache" value="true"
name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook" name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache" name="hibernate.cache.region_prefix" value="myTestRegion"
At the entity, I have mentioned to cache the entity through an annotation
@Cache(region="myRegion", usage = CacheConcurrencyStrategy.READ_ONLY)
Database connection pool size is configured for max of 5 connections. While load testing, after few requests been served, application is throwing an error related to data base connection(Connection not avaialable).
Any configuration that I am missing?
When entity is configured for caching, why it is looking for the database connection? is that entity still holding back the database connection?
Thanks in advance
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212125#4212125
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212125
17 years, 2 months
[JBoss Cache: Core Edition] - JBoss cache: Database connection issue in load testing
by preddy1104
I am new to JBoss caching and trying to use second level caching with ejb3 entity beans. By looking at the document I have configured my entity bean to use jboss caching as second level caching. It is failing in load testing. I am getting an error related to database connection availablity.
Using JBoss Cache 3.0.2
Configurations used:
I have configured persistence.xml with the following properties
name="hibernate.cache.use_second_level_cache" value="true"
name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook" name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache" name="hibernate.cache.region_prefix" value="myTestRegion"
At the entity, I have mentioned to cache the entity through an annotation
@Cache(region="myRegion", usage = CacheConcurrencyStrategy.READ_ONLY)
Database connection pool size is configured for max of 5 connections. While load testing, after few requests been served, application is throwing an error related to data base connection(Connection not avaialable).
Any configuration that I am missing?
When I say cache this entity, why it is looking for the database connection, is that entity still holding back the database connection?
Thanks in advance
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212124#4212124
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212124
17 years, 2 months