[JBoss-user] [EJB 3.0] - Re: Lazy collection load

2006-06-11 Thread sierras
Obviouly is not the way because it does'nt work. I get an Exception org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: entities.Country.organizations, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.thro

[JBoss-user] [EJB 3.0] - Lazy collection load

2006-06-10 Thread sierras
In order to load a lazy collection of a detached entity I've a method in a session bean that does the work and returns the same instance of the object but with the collection loaded public Country RefreshCountryCollection(Country country) { em.merge(country); country.getChildre

[JBoss-user] [EJB 3.0] - Re: EntityManager problem

2006-05-24 Thread sierras
I also anotate the child with @Stateless. Only that I did'nt put in the text I should have done it! I'll take a look at the link and see wht happends. thanks anyway View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946186#3946186 Reply to the post : h

[JBoss-user] [EJB 3.0] - EntityManager problem

2006-05-24 Thread sierras
Hi: I've two classes like this ones @Stateless public abstract class GeneralEntity { @PersistenceContext public EntityManager em; public String _EntityName; protected void setEntityName(String str) { _EntityName = str;

[JBoss-user] [EJB 3.0] - ENTITY BEAN WITH SELF RELATIONSHIP

2006-05-16 Thread sierras
I've been looking around and around for some doc about how to make a Entity Bean with a one to many self relationship. (with a self foreign key). I've found nothing. EMPLOYEE with EMPLOYEE in a "Manager OF" relationship. Want to be able to locate both direction of the relationship. Anyone can

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - WEB - EJB3 Application

2006-04-30 Thread sierras
Has anyone been able to connect a JSP page under Tomcat 5.5 to EJB3 server 4.0.3 SP1. I've been looking for it around I havent found anything about and it does'nt work. Or at least I don't know how to make it work. Examples welcome! Thanks in advance! View the original post : http://www.

[JBoss-user] [EJB 3.0] - WEB - EJB3 Application

2006-04-30 Thread sierras
Has anyone been able to connect a JSP page under Tomcat 5.5 to EJB3 server 4.0.3 SP1. I've been looking for it around I havent found anything about and it does'nt work. Or at least I don't know how to make it work. Examples welcome! Thanks in advance! View the original post : http://www.

[JBoss-user] [JBoss Eclipse IDE (users)] - Re: ECLIPSE IDE - @JoinTable problem

2006-04-28 Thread sierras
Even though the documentations says another thing put... @JoinTable( table = @Table(name = "JOIN_ORG_ISU"), joinColumns = [EMAIL PROTECTED](name = "Organization_ID_GEN")}, inverseJoinColumns = [EMAIL PROTECTED](name = "InformationSystemUser_ID_GEN")} ) Maybe my

[JBoss-user] [JBoss Eclipse IDE (users)] - ECLIPSE IDE - @JoinTable problem

2006-04-28 Thread sierras
Writing an entity bean like this one @Entity public class .{ /* some properties */ /* CHILDREN */ private Set setInformationSystemUsers; @ManyToMany @JoinTable(name="nn") public Set getUsers() { return setInformation

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - TOMCAT - EJB3 Application problem. URGENT HELP PLEASE!

2006-04-26 Thread sierras
This is the begining code of our web application in order to access to the EJB context Hashtable props = new Hashtable(); props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); props.put(C

[JBoss-user] [EJB 3.0] - WEB - EJB3 Application PROBLEM. URGENT HELP PLEASE!

2006-04-25 Thread sierras
This is the begining code of our web application in order to access to the EJB context Hashtable props = new Hashtable(); props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); props.put(C

[JBoss-user] [EJB 3.0] - PLEASE HELP - TOMCAT - EJB3 Integration problem

2006-04-21 Thread sierras
I've a project with a piece of JSP code running like this one WorkerComment <% try { Country country;

[JBoss-user] [EJB 3.0] - Loading a database on @PostConstruct callback for SessionBea

2006-03-20 Thread sierras
I've a session bean wich on his @PostConstruct callback method tries to load the database on first time. The problem is that i'm constantly getting an error of type "EntityManager must be access within a transaction". I've tried to get a user transaction from the injected session context but I'd

[JBoss-user] [EJB 3.0] - SPECIAL CHARACTERS in a String. HELP! newbie question!

2006-03-14 Thread sierras
I've an EJB3 country bean. One of the attributes is the country's name. And there are countries in the database that have special characters in their names, like " Cote d' Ivoire ". The problem is that when persisting this country to the database his name looses everything after the ' character

[JBoss-user] [EJB 3.0] - Re: java.sql.Timestamp mapping to Oracle database

2006-02-21 Thread sierras
property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect" instead of property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" has solved the problem without doing anything else. Thanks anyway. View the original post : http://www.jboss.com/index.html?

[JBoss-user] [EJB 3.0] - Re: java.sql.Timestamp mapping to Oracle database

2006-02-21 Thread sierras
instead of has solved the problem without doing anything else. Thanks anyway. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925281#3925281 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925281

[JBoss-user] [EJB 3.0] - java.sql.Timestamp mapping to Oracle database

2006-02-10 Thread sierras
In an EJB 3.0 application... How do I get an Entity with an attribute of type java.sql.Timestamp mapped into an Oracle database as Timestamp(9) instead of as a Date as I'm getting now. Tanks in advance. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922960#3