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
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
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
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;
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
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.
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.
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
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
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
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
I've a project with a piece of JSP code running like this one
WorkerComment
<%
try
{
Country country;
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
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
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?
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
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
17 matches
Mail list logo