[JBoss-user] [EJB 3.0] - Re: Instance variables of stateless session beans
HI, take a look on this topic: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951843#3951843 The answer is yes. Instance variables can survive from one call to the next. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951844#3951844 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3951844 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: State isn't reset for stateless session beans!
OK - then it makes sense. I guesss objects isn't injected at every lookup then, but only once per session bean. So don't set an injected object (ex. spring enjected) to null, because that will affedt other sessions looking up the same stateless bean. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951843#3951843 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3951843 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - State isn't reset for stateless session beans!
HI, I'm using JBOSS 4.0.4GA. To demonstrate my question below I've done a brand new install of jboss. I thought that no state at all was kept in a stateless session bean between lookups - and is is really possible to share a stateless session bean across sessions! Take a look at this bean: | package com.jaboj.mm.dao; | | import javax.ejb.Stateless; | | import javax.persistence.EntityManager; | import javax.persistence.PersistenceContext; | | @Stateless | public class LocationDAO implements LocationDAOLocal { | | @PersistenceContext(unitName = "MM") | private EntityManager em; | | private int count = 0; | | public LocationDAO() { | count = 0; | } | | public String getHello() { | count++; | System.out.println("COUNT: " + count); | return "hello: " + count; | } | | } | It's quite simple. Everytime hello() is called, count is increased by one. So, I would expect, that the first time I invoke hello() after a bean lookup, "hello: 1" is returned. But that isn't allway the case. I use the following code to lookup the sessionbean, from a test servlet. | --- | InitialContext ctx = new InitialContext(); | LocationDAOLocal bean = | (LocationDAOLocal)ctx.lookup("mm2007/LocationDAO/local"); | out.print(bean.getHello()); | -- | When using this method to lookup the stateless session bean, the beans sometime get reused - even accross sessions! I really don't understand why it is possible to get the return values "hello: 2", "hello: 3", ... etc. from the session bean, on the first call after lookup! Below I've pasted the console-output after I've invoked the servlet 3 times from IE and Firefox - to demonstrate that the session beans also are shared accross sessions!!! | 22:46:09,763 INFO [STDOUT] COUNT: 1 (IE) | 22:46:11,235 INFO [STDOUT] COUNT: 2 (IE) | 22:46:15,591 INFO [STDOUT] COUNT: 3 (FIREFOX) | What am I doing wrong - this can't be real? Regards Jacob View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951765#3951765 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3951765 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss/Spring Integration] - Re: Spring and EJB3 EntityManager
Thank you. This is one way of doing it. But I hope to find a solution where the EntityManager setting in the dao is handled totally in spring. Then it only would be neccesary to inject the dao into the session beans. I'm thinking on a spring context like this: | | | | | . | | Has anyone tried to wire up the EntityManager in spring? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949539#3949539 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949539 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss/Spring Integration] - Spring and EJB3 EntityManager
HI In a normal stateless session bean, the entitymanager is injected like this: | @PersistenceContext(unitName = "MM") | private EntityManager em; | Is it possible to wire up the entitymanager with SPRING. Ex. I would like to get some DAO's injected into my stateless session bean, which automatically has been initialized with an entitymanager by the spring framework. Ex. how to wire up this bean in spring: | public class MyDao { | private EntityManager em; | | public void setEntityManager(EntityManager em) { | this.em = em; | } | } | When it is wired up it should be possible to inject it into a stateless bean: | @Stateless | public class myBean implements myBeanLocal { | @Spring(jndiName = "mm", bean="myDao") | private MyDao myDao; | | public void createSome() { | myDao.save(someObject); | } | } | | Does anyone have an example for this trick on JBOSS 4.0.4GA | | I have no problems wiring up POJO's but it seems to be more difficult to define the entitymanager in the spring xml file. | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949476#3949476 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949476 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: Howto fetch lazy relations before an entity is detached
It seems like JBOSS has some inexpedients about LAZY loading. We're experiencing the same problem that you describe. If I fetch a entity with a LAZY loaded relation into a statefull session bean, then I'm only able to get attributes from the lazy loaded relational object in the same call to the session bean (using CMP). In subsequent call to the sessionbean I will not be able to retrieve attributes from the LAZY loaded relation. This means that when we initialize a statefull bean we'll try to avoid lazy loaded objects by using queries instead - otherwise we'll create a transfer object for the lazy loaded objects on initialization. I've have changed a lot of em.find() to EJB queries instead, where the query (using [LEFT] JOIN FETCH) is fetching alle the neccesary relations needed to avoid lazy loading. I also think it's a problem that even after loading a LAZY loaded relation the objekt is still a proxy-class type (Ex Company will be of type [EMAIL PROTECTED]) This means that we can't use intanceof to determing the object type of inherited objects in that case. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939434#3939434 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939434 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: Slow performance releasing stateless session bean!
HI I've pasted in the method findCompanyByCvrNo below. The method uses a query to fetch the company by cvrNo. The query is also pastes below. Yes I'm completly sure that my session beans are using the Stateless annotation. I don't know if this is a stateless session bena problem or a hibernate/EM problem. I'm just using EJB3 and doesn't care about the JBOSS EJB3 implementation. Yes the two scenarios are different. Scenario A is fetching branches through the oneToMany relationship between company and branches. Scenario B is fetching branches using a query. Scenario B has far better performance than A - that is a problem, because I'll have to change all our OneToMany fetches to queries (specially when we fetch more than 100 rows). I've tried out the scenarios on Oracles OC4J and here is the performance not a problem, so I think it's a problem in Hibernate or the EJB container. | public CompanyPO FindCompanyByCvrNo(String cvrNo) throws DaoException { | CompanyPO c = null; | | try { | c = (CompanyPO)em.createNamedQuery("findCompanyByCvrNo").setParameter("cvrNo", cvrNo).getSingleResult(); | } | catch (EntityNotFoundException notFound) { | // create new company by calling CVR | c = CvrDAO.getCVRInfo(cvrNo); | } | catch (Exception e) { | throw new DaoException(e); | } | | return c; | } | EJB Query | @NamedQuery(name = "findCompanyByCvrNo", | queryString = "SELECT c FROM CompanyPO c WHERE c.cvrNo = :cvrNo") | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3937848#3937848 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3937848 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Slow performance releasing stateless session bean!
HI This issue is about performance when releasing a stateless session bean on JBOSS 4.0.1SP1. The performance problem occurs when returning from an method in a stateless session bean after selecting a large number of objects from the database. Actually the same problem is happening after inserting a large number of objects into the database. In our scenario we've a stateless session bean with a method to return branches for a given company. A company is an objectwith an one-to-many relationship to branches. See sample code below To retrieve the branchlist from a specifik company, the first step in the method (A) is to query the company and then execute the method getBranches() on the company object. In our scenario the branchlist for the company contains 1000 objects. Getting the branch list and building dto's is done in no time. But, when the method returns the branchlist (or even just the number of branches) back to the client, then the container (java.exe) process will take up 100% cpu-time for maybe a minut or more. It seems like the container is doing some heavy calculations before control is passed back to the client. If I change the way the method (B) retrieves the branches to an EJB query, then the problem is gone. The query will still return the same list of 1000 objects and we'll still transform them into dto's. When changing the way to retrieve the branches, the control is passed back to the client much more efficient - why that? The main question is - why does the release of a stateless session beans perform very bad when using one-to-many relations to retrive a large number of objects? And question number 2. I we create a new CompanyPO and assosiating 1000 branches, then persisting of the CompanyPO will take up a lot of time and cpu-power, before the control is passed back to the client. Why? The client is part of the same ear-file and used local interfaces. The java-client is looking up the stateless session bean like this: | InitialContext ctx = new InitialContext(); | CompanyManagementLocal bean = (CompanyManagementLocal)ctx.lookup(CompanyManagementLocal.class.getName()); | SAMPLE CODE! Method A below has very bad performance. It retrieves branches through the getBranches() method on the company object. | public List getCompanyBranchList(ICompanySimple companyTO) throws HvidvaskException { | CompanyDAO dao = new CompanyDAO(em); | List resultsList = null; | try { | CompanyPO company = dao.FindCompanyByCvrNo(companyTO.getCvrNo()); | Collection branches = company.getBranches(); | resultsList = DTOBuilder.createBranchList(branches); | } | catch (DaoException daoEx) { | throw new HvidvaskException("Unable to return branch list"); | } | return resultsList; | } | Method B below has very good performance. It retrives branches through a EJB query. | public List getSignedBranchList(ICompanySimple companyTO) throws HvidvaskException { | List branchList = null; | try { | CompanyPO company = em.find(CompanyPO.class, companyTO.getId()); | Query q = QueryFactory.createSignedBranchQuery(em, company); | Collection resultList = q.getResultList(); | if (resultList != null) { | branchList = DTOBuilder.createBranchList(resultList); | } | } | catch (Exception daoEx) { | throw new HvidvaskException("Unable to return branch list"); | } | return branchList; | } | CompanyPO and BranchPO persistence objects | @Entity(access=AccessType.FIELD) | public class CompanyPO implements Serializable { | | @Id private int; | private String cvrNo; | @OneToMany(mappedBy = "company" | ,fetch=FetchType.LAZY | ,cascade = {CascadeType.PERSIST, CascadeType.MERGE}) | private Collection branches; | | public CompanyPO() { | } | ... | } | | public class BranchPO implements StateObject, Serializable { | | @Id | private int id; | private String pNo; | private String name; | @ManyToOne(optional = false | ,cascade = {CascadeType.PERSIST, CascadeType.MERGE} | ,fetch=FetchType.LAZY) | private CompanyPO company; | | @OneToOne(optional=false, fetch=FetchType.EAGER, cascade={CascadeType.PERSIST, CascadeType.MERGE}) | @JoinColumn(name="ADDR_ID", unique=false, nullable=false) | private AddressPO address; | | @OneToOne(optional=true, cascade={CascadeType.PERSIST, CascadeType.MERGE}) | @JoinColumn(name="MANAGER_ID", unique=false) | private BranchManagerPO manager; | | @Column(name="currency_exchange") | private boolean currencyExchange; | ... | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935369#3935369 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=
[JBoss-user] [EJB 3.0] - Re: SQL Trace / debug
Thank you very much. Exactly what I needed View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935009#3935009 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935009 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: problem switching to 4.0.4RC1; TransactionManager not bo
did anyone find a solution for this problem? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934690#3934690 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934690 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: Container will hang when persisting a large number of ob
OK, I'll try to paste some of the entity objetcs code to this thread. Check out the Company and BranchPO below. All getter and setters omitted. We're using a webservice to fill-out CompanyPO with information. Som companies have more then 700 branches, which all are aded to the branches collection of CompanyPO. After finishing the company with all the branches, address etc. the company entity is persisted, if all rules is passed. The persists operation completes succesfully after about half a secondf, but when we then are doing a flush operation on the entitymanager the container will hang and after a while a timeout is thrown. Maybe a solution is to perstist and flush more often, which shouldn't be neccesary with the relative small data amount. But, I'll give it try anyway. If you need more information please tell me which. - Source code ** CompanyPO ** Id column is inherited. public class CompanyPO extends RegisteredEntityPO implements Serializable { @Column(name = "CVR_NO", unique = true, nullable=false) private String cvrNo; @OneToMany(mappedBy = "company", cascade = {CascadeType.PERSIST, CascadeType.MERGE}) private Collection branches; @ManyToMany(fetch=FetchType.LAZY, cascade = {CascadeType.PERSIST, CascadeType.MERGE}) @JoinTable(table = @Table(name = "HV_COMPANY_MANAGERS") ,joinColumns = [EMAIL PROTECTED](name="COMPANY_ID")} ,inverseJoinColumns = [EMAIL PROTECTED](name="MANAGER_ID")} ) private Collection managerList; //@Transient //private Collection managerList = new ArrayList(); @ManyToMany(fetch=FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST}) @JoinTable(table = @Table(name = "HV_COMPANY_OWNERS") ,joinColumns = [EMAIL PROTECTED](name="COMPANY_ID")} ,inverseJoinColumns = [EMAIL PROTECTED](name="OWNER_ID")} ) private Collection ownerList; @ManyToOne(optional=true) private AgentPO agentFor; } ** Branch PO ** @Entity(access=AccessType.FIELD) @Table(name = "HV_BRANCH") @SequenceGenerator(name="BRAN_SEQ_GEN", sequenceName="HV_BRAN_SEQ",allocationSize=1) public class BranchPO implements StateObject, Serializable { @Id (generate=GeneratorType.SEQUENCE,generator="BRAN_SEQ_GEN") private int id; @Column(name="P_NO") private String pNo; private String name; @ManyToOne(optional = false, cascade = {CascadeType.PERSIST, CascadeType.MERGE}) private CompanyPO company; @OneToOne(optional=false, cascade={CascadeType.PERSIST, CascadeType.MERGE}) @JoinColumn(name="ADDR_ID", unique=false, nullable=false) private AddressPO address; @OneToOne(optional=true, cascade={CascadeType.PERSIST, CascadeType.MERGE}) @JoinColumn(name="MANAGER_ID", unique=false) private BranchManagerPO manager; @Column(name="IS_JOINED") private boolean joined; @ManyToOne(optional=true, cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH}) @JoinColumn(name="SHIS_ID") private StatusHistoryPO currentStatus; @OneToMany(mappedBy="branch", fetch=FetchType.LAZY) private Collection statusHistory; } View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934603#3934603 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934603 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - SQL Trace / debug
HI, Is there a way to trace / debug every SQL statement executed by the EJB container against the database. I would like to debug the statements to a file or to the concole. We're using JBOSS 4.0.3 SP1 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934641#3934641 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934641 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: Container will hang when persisting a large number of ob
...and here is the complete stacktrace 10:43:35,338 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=WMLI011810/1509, BranchQ ual=, localId=1509] timed out. status=STATUS_ACTIVE 10:45:26,458 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null 10:45:26,458 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId= WMLI011810/1509, BranchQual=, localId=1509]; - nested throwable: (javax.resource.ResourceException: Transaction is not a ctive: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=WMLI011810/1509, BranchQual=, localId=1509]) 10:45:26,468 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.JDBCException.(JDBCException.java:25) at org.hibernate.exception.GenericJDBCException.(GenericJDBCException.java:19) at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:307) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:109) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:86) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:169) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2047) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2426) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:29 6) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:905) at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:185) at org.jboss.ejb3.entity.InjectedEntityManager.flush(InjectedEntityManager.java:122) at com.wmdata.hvidvask.appservices.EntityStatusChange.changeAndMerge(EntityStatusChange.java:94) at com.wmdata.hvidvask.appservices.CompanyAppService.RegisterCompany(CompanyAppService.java:54) at com.wmdata.hvidvask.facade.CompanyRegistrationSFSB.approveRegistration(CompanyRegistrationSFSB.java:524) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109) at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropa gationInterceptor.java:44) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:32) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:133) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:66) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:32) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(Meth
[JBoss-user] [EJB 3.0] - Container will hang when persisting a large number of object
HI, Our JBOSS EJB3 container (4.0.3SP1) is hanging in a few minutes followed by a timeout, when I try to persist and flush a large number of objects (actually only about 1500 objects) objects in one transaction. The overall exception is Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=WMLI011810/744, BranchQual=, localId=744] In a statefull session bean an object A is created. Afterwards about 1000 entries of another object B are added to a collection in object A - these B-objects needs to be persisted when object A is persisted. The operation em.persist(A) takes about one minute to complete - that's ok in this situation. So far no problems... Now, when the sessionbean is doing a em.flush() or returning control back to the container (after last statement in the method is succefully complated), the container is hanging for about 3 minutes before a timeout is thrown. The JBOSS java.exe process is using 100% cpu power. Why should is take so long time and so many resources to flush/commit only a few thousand objects? If I'm reducing the B objects to about 50 og 100 then anything works nice. Isn't JBOSS scaled for large transactions? Can anyone help us with this problem? --- stacktrace (just a small top-part) 15:31:13,843 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=WMLI011810/744, BranchQu al=, localId=744] timed out. status=STATUS_ACTIVE 15:33:52,225 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null 15:33:52,225 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId= WMLI011810/744, BranchQual=, localId=744]; - nested throwable: (javax.resource.ResourceException: Transaction is not act ive: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=WMLI011810/744, BranchQual=, localId=744]) 15:33:52,225 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.JDBCException.(JDBCException.java:25) ... AND A LOT MORE View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934384#3934384 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934384 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: JBoss4.0.3 + EJB3 +JDeveloper
just use ant. JDeveloper has great support for ant scripts. Our project is using the same technology and we're using ant for building and deploying the application. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3934369#3934369 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3934369 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: Datatype mapping to Oracle datatypes
It seems to work if I change hibernate.dialect in persistence.properties to Oracle9Dialect. Now the default NUMBER size is (10,0) which is ok but the default VARCHAR2 size is still 255. Maybee this isn't changeable. What datatype mapping file is in use? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922806#3922806 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922806 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Datatype mapping to Oracle datatypes
HI, We're evaluating JBOSS with EJB3 using a Oracle database. I can't get datatype mapping to work correctly. I seems like the Integer datatype i mapped to NUMBER(38) which is the maximum number size i Oracle. The Long datatype is mapped to BIGINT which isn't a datatype in Oracle and therefore an exceptino i raised. I've tried altering standardjaws.xml and standardjbosscmp-jdbc.xml in the conf-catalog and also the oracle-ds.xml in the deploy-catalog. This do not have any effect. I've also tried to change the default size of VARCHAR2 from 255 to 100 - this haven't any effect either I would like to know if this type mapping is a bug in JBOSS 4.0.3SP1 with EJB3 or what? Regards Jaboj View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921907#3921907 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921907 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user