[JBoss Portal] - Re: java.lang.OutofMemoryException
by thomas.heuteï¼ jboss.com
use this diff:
| diff -u conf.orig/jboss-log4j.xml conf/jboss-log4j.xml
| --- conf.orig/jboss-log4j.xml 2007-07-16 23:56:32.000000000 +0200
| +++ conf/jboss-log4j.xml 2007-07-17 09:26:16.000000000 +0200
| @@ -164,6 +164,16 @@
| <priority value="INFO"/>
| </category>
|
| + <!-- Hibernate got a bit too verbose in JBoss AS 4.2.1.GA -->
| + <category name="org.hibernate.engine.loading.LoadContexts">
| + <priority value="ERROR"/>
| + </category>
| +
| + <!-- JBoss Cache likes to talk a lot -->
| + <category name="org.jboss.cache.interceptors.CacheLoaderInterceptor">
| + <priority value="ERROR"/>
| + </category>
| +
| <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
| <category name="org.jboss.serial">
| <priority value="INFO"/>
| Common subdirectories: conf.orig/props and conf/props
| Common subdirectories: conf.orig/xmdesc and conf/xmdesc
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074336#4074336
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074336
18Â years, 11Â months
[EJB 3.0] - Re: need help for Transaction Attribute Types
by grdzeli_kaci
Hello Ta
Great Thanks for your post, i tried to this for couple of moth and could not resolve this problem.
and ok, i did what you say i got another problem when i tried to persist in one method whats ok, there is no information persisted in database, but when i tried to flush on other method i got an error : javax.persistence.TransactionRequiredException.
my example now looks like :
| package com.magti.businesslayer.ejb3Fasade;
|
| import javax.ejb.EJB;
| import javax.ejb.Remote;
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.ejb.Stateless;
| import javax.ejb.TransactionAttribute;
| import javax.ejb.TransactionAttributeType;
| import javax.ejb.TransactionManagement;
| import javax.ejb.TransactionManagementType;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
| import javax.persistence.PersistenceContextType;
| import javax.persistence.PersistenceProperty;
|
| import com.magti.businesslayer.ejb3Fasade.TestFasade;
| import com.magti.businesslayer.ejb3entity.oracle.Test;
|
| @Stateful
| @Remote(TestFasade.class)
| @TransactionManagement(TransactionManagementType.BEAN)
| public class TestFasadeBean implements TestFasade {
|
| @PersistenceContext(
| type = PersistenceContextType.EXTENDED,
| properties = @PersistenceProperty(
| name = "org.hibernate.flushMode",
| value = "MANUAL"))
| EntityManager oracleManager;
| Test test;
|
| public Long create() {
| try {
| test = new Test();
| test.setAge(21L);
| test.setName("adsdasd");
| test.setSurname("asdasd");
| oracleManager.persist(test);
| return test.getId();
| } catch (Exception e) {
| e.printStackTrace();
| return 0L;
| }
| }
|
| public void comit() {
| try {
| oracleManager.flush();
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
| }
|
when i tried to flush, i got this exception : javax.persistence.TransactionRequiredException.
i tried to use @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
and
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
but it could not resolve problem :(
have any idea ?
Thanks again ALRubinger In advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074330#4074330
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074330
18Â years, 11Â months