Check persistence.xml under JBOSS_HOME/server/all/ejb3.deployer/META-INF.
When release_mode is on after_transaction it closes the session after each JDBC
statement.
Resolve problem by uising on_close or just comment the line containing the
following line hibernate.connection.release_mode=after
Am I the only person with this problem?
I am using Jboss 4.0.3SP1 and want to use lazy relationships on a ManyToOne
relationship. Surely I am not the only one.
Could anyone maybe suggest an alternative to use if using the relationship
directly is not possible from within a SessionBean.
This i
As far as I know you need an interface to be created manually and the container
does not create it for your.
If you have a nice IDE like Eclipse 3.1.1 you can extract an interface file
from your session bean automatically by right clicking on the Session bean and
then click on Refractor -> Extr
How to implement OneToMany LAZY relationship
I am getting a LazyInitializationException: no Session.
I have read numerous forums explaining that a client application cannot use a
lazy relationship. One forum suggested to use two Session methods, one to get
the parent object and another to get
Solution is to use java.lang.reflect.Proxy like this:
|
| Proxy element = (Proxy) iter.next();
| InvocationHandler handler = Proxy.getInvocationHandler(element);
| CreditorBean bean = (CreditorBean)
Proxy.newProxyInstance(CreditorBean.class.getClassLoader(),
| new Class[] { Credi
Solution is to use java.lang.reflect.Proxy like this:
| Proxy element = (Proxy) iter.next();
| InvocationHandler handler = Proxy.getInvocationHandler(element);
| CreditorBean bean = (CreditorBean)
Proxy.newProxyInstance(CreditorBean.class.getClassLoader(),
| new Class[] { CreditorBe
Sorry I am using JBoss 4.0.1
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3865137#3865137
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3865137
---
This SF.Net emai
Sorry for reposting but this issue is very important. It will decide if we
choose JBoss or another App server like Jonas or Sun app server.
The issue is that I create a remote object fine but when I do a findAll on the
EJB it returns a Collection. I assume that this findall method should retur
I am working with XDoclet and Eclipse 3.1 on a JBoss 4.1 server.
I have created a CMP Entity Bean that deploys fine and I can findByPrimaryKey
with success but when I do a findAll I get a collection of Proxy objects
instead of a Remote object.
I am doing something wrong? Here is my Bean Code: