[jboss-user] [EJB/JBoss] - Re: MDB calling a session bean, session bean not getting reu
I wanted to post some follow-up information, in case anyone had any additional thoughts. This appears to be a bug in multiple versions of JBoss AS, including apparently 5.0, where any time a stateless session bean is injected into an MDB a new instance of that stateless session bean is created, but never removed from the thread pool. Therefore, if an MDB makes 500 calls to a SLSB, the container will end up with 500 instances of that SLSB which never get removed. This could potentially be the source of a major memory leak. So, after some digging, the following information pointed to the ability to force the SLSB's into a pool of a specific maximum size: http://www.jboss.org/jbossejb3/docs/reference/build/reference/en/html/session-bean-config.html Which worked, for the specific SLSB which you annotated to use that pool, but unfortunately each subsequent SLSB that was called from that initial SLSB would still display the original behavior. Now, adding that annotation to every single bean individually down the stack did not seem like a great idea either, although it could be done if required. But the idea of controlling the pool was interesting, which lead me to research this more, and I came up with the following information: https://jira.jboss.org/jira/browse/JBAS-5345 (BUG Report!) http://www.jboss.org/index.html?module=bb&op=viewtopic&t=132763 http://www.jboss.org/index.html?module=bb&op=viewtopic&t=132331 Long story short: - EJB3 annotations are intercepted using JBoss AOP and are configured in "default/deploy/ejb3-aop-interceptors.xml". So, instead of annotating each SLSB individually, we can provide a blanket solution at this point to all SLSB's. - ThreadlocalPool isn't very strict, apparently, but StrictMaxPool appears to give us the behavior we want - As noted by wolfc in the first forum thread...It would appear that JBossMQ does not use a ThreadPool, but instantiates threads on the fly. Thus the ThreadlocalPool will keep on creating instances to match. That makes the use of StrictMaxPool mandatory. Which is the behavior we are seeing. To put all of this to the test, all of the Stateless Bean domain annotation expressions in ejb3-aop-interceptors.xml where changed from: @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=1) to @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30, timeout=1) Note: The MDB domain annotation expressions use StrictMaxPool by default! This appears to solve the problem, but will require more monitoring in the coming weeks. Any other thoughts on this issue? Concerns about contention in the StrictMaxPool? Thoughts on another, better solution? Thanks! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212417#4212417 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212417 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Hosted JBoss AS and Portal Solutions
I'm working with a start-up firm which is looking to use a hosted JBoss Application Server and JBoss Portal Server solution. Preferably, the hosted solution would also have remote source control and allow us to remote desktop/telnet into the environment to custom configure JBoss as we need. Icing on the cake would be a hosted full collaboration suite or Exchange server, but this would be a nicety, not a requirement. Any Redhat/JBoss recommended partners in this space? Thanks. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4212414#4212414 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4212414 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB/JBoss] - Re: MDB calling a session bean, session bean not getting reu
This is the EXACT behavior we have been observing as well, in JBossAS 4.2.2, which we have been trying to figure out how to work-around. We have observed that any stateless session bean called from an MDB is never released or any SLSB called from those SLSB's down the line. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210853#4210853 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210853 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Re: Why does em.persist resets the Query cache?
Here is some documentation for you to read concerning Query caching: http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Clustering_Guide/4/html/ch04s02s03.html Also, you really need to make sure your cache configuration is correct and that you are actually using the cache as designed. Which includes accurate and comprehensive unit tests, which it does not look like you are doing. Manually controlling the query cache is not required for what you are doing. Honestly, the only manual query cache configuration you should need to do is manually evicting queries before their normal eviction period has expired, but you really only need to do that under very specific circumstances. Which brings up another point...if you mark the queries as READ_ONLY then you would be guaranteed the database is only read once. But then you will need to make sure you inject the session manager and evict the query or query region in your entity facade whenever a save, update or delete occurs to a queried entity. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4208218#4208218 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4208218 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Re: Why does em.persist resets the Query cache?
Well, first of all, query caching is only for named queries. So, you will need to create an entity which has the following annotation (or XML configuration): @NamedQueries( { @NamedQuery(name = "Book.findByIdCustom", query = "select b from Book b where b.id < :id") }) Where Book is your entity and id is a field in your entity. Then you will need to create the following code in your facade: Query query = entityManager.createNamedQuery("Book.findByIdCustom"); | query.setParameter("id", id); | query.setHint("org.hibernate.cacheable", true); | return query.getResultList(); Now, you will need to be careful to evict the query results appropriately to avoid getting stale data in your results. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4208052#4208052 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4208052 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - TreeCache ClassCastException with Isolated Classloader
Hello, We need to use an isolated classloader for our EAR and we have configured Hibernate to use JBoss Cache as a second-level cache. The problem is that once we configure isolated classloading, either at the EAR level or the JBoss ejb loader level, we are getting JBoss TreeCache classloader exceptions being thrown on deployment. How do we use JBoss Cache and specifically Hibernate second-level cache with isolated classloaders? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4208050#4208050 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4208050 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Re: Why does em.persist resets the Query cache?
[list=]Do you have Hibernate second-level configured and enabled? [list=]What are doing to test that #1 is true? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4208019#4208019 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4208019 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Re: Cache service not registered on cold start EAR persisten
jaikiran, Our deployment scenario excludes Option #1, but Option #2 worked perfectlty!!! Thank you!!! I searched for hours for that information. Where is that located in the documentation? Again, thank you!!! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199417#4199417 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199417 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Re: Cache service not registered on cold start EAR persisten
I changed the following line with no change in behavior: | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199312#4199312 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199312 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Re: Cache service not registered on cold start EAR persisten
Here is my persistence.xml file: | http://java.sun.com/xml/ns/persistence"; | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; | xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"; version="1.0"> | | | java:/testDS | | | | | | | | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199311#4199311 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199311 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Re: Cache service not registered on cold start EAR persisten
I tried placing the MBean definition in the default/conf/jboss-service.xml file instead of a standalone cache-config.xml file in /default/deploy but got a different error relating to TransactionManager being NULL at runtime. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199310#4199310 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199310 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Re: Cache service not registered on cold start EAR persisten
Caused by: javax.management.InstanceNotFoundException: jboss.cache:service=EJB3EntityCache is not registered. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199309#4199309 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199309 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Cache: Core Edition] - Cache service not registered on cold start EAR persistent un
I have been working to enable Hibernate second-level entity caching for use with our detached entities. Server: JBossAS 4.2.2 Cache: 1.4.1 (included version in JBossAS 4.2.2) The behavior that I am seeing is that if I cold start the container with no EAR deployed, everything starts fine, including the cache. Then I deploy the EAR and the persistence unit deploys fine and finds the cache service MBean. Now, if deploy the EAR and cold start the container the persistence unit fails to load because it cannot find the cache service. The exception is as follows: javax.persistence.PersistenceException: org.hibernate.cache.CacheException: java.lang.RuntimeException: Error creating MBeanProxy: jboss.cache:service=EJB3EntityCache Hot deploy the EAR and the persistence unit will be found. How do I configure either JBoss or my EAR/persistence to depend on the cache being completed deployed before the EAR? If you need me to post any files, please let me know. Thanks! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199304#4199304 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199304 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: duplicate method: _getAdvisor
Thank you for the JIRA report. Do you need me to give you any more information to resolve this bug? I am currently working on our AOP implementation within JBoss AS 4.2.2 as we speak. Thank you. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109452#4109452 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109452 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: Possible to advise EJB3 EntityBeans?
We are currently having the exact same issue with JBoss AS 4.2.1 and JBoss AS 4.2.2. Having to define each and every EntityBean in our entire development and production environment in an AOP XML file is out of the question. This is a showstopper for us. Does anyone have a solution or a fix? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109450#4109450 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109450 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: duplicate method: _getAdvisor
We are experiencing the exact same bug in both JBoss 4.2.1 AS and JBoss 4.2.2 AS which has become a showstopper for us. I can provide any kinds of stack traces, AOP XML files or any other code you will require to fix this major bug. Does Redhat have any suggestions or a timeline for resolution of this major bug? Thank you. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109443#4109443 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109443 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user