you cannot have more than one @OneToMany with EAGER fetching in a bean ->
change to LAZY. in JB4.0.4 GA you will not be able to deploy that anymore
(deployment error).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956494#3956494
Reply to the post :
http:/
this is correct behavior. it IS in the spec - don't ask me exactly where. there
have been posts here already related to that.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956493#3956493
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posti
the default jndi name is:
ReusableWeb/DataAccessBeanBean/[remote|local]
but it looks like your bean is not registered in jndi. maybe the bean is not
recognized by the ejb3 deployer if in a war.
I recommend to try the following layout (always works for me without problems):
- ReusableWeb.ear
|
Hi Thomas,
please see: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951914
The hint from Bill doesn't solve your (and mine) initial problem: programmatic
creation of ems, that can be used like the ones deployed through
persistence.xml. It is only a way for dynamic selection of a em
Thanks for your reply.
We use a similar solution for now: deploying a fix number of PUs through
persistence.xml and selecting the correct one at runtime through (Jboss
specific) JNDI lookup:
jndi.lookup( "java:/EntityManagers/" + currentClient);
(an Interceptor would have been be a solution to
Hi Thomas,
I'm working on the same issue for a while - asking this many times here without
a clear answer or solution. What I have found out so far, you can do (assuming
you have a PU "default" in your persistence.xml):
| Map map = new HashMap();
| map.put( "hibernate.hbm2d
try:
...
@MappedSuperclass
public class JbsObject implements Serializable {
private long id;
...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951852#3951852
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3951852
Any news to that? We have the same problem.
This has been a problem earlier, but was fixed in JB4.0.2 for Non-EJB3 Beans.
If I remember it correct, this was different if calling from a client (worked)
or from inside a bean (always called local instance of other bean)
View the original post :
Hi,
we have exactly the same problem now and I found your posting here.
Is this still the only solution or is there another way?
This problem has been fixed for the Non-EJB3 Stack from JB4.0.1 to JB4.0.2. I
guess it is in the EJB3 Stack again.
Thanks
View the original post :
http://www.jbos
the jndi naming convention has changed. the jndi name for beans is
"deployment_unit/bean_simple_class_name/local|remote" per default.
in your case something like:
test/MyBean/local
always use the jndi view in jmx-console to see which names are registered!
View the original post :
http://www.jbo
"Hoagiex" wrote : Also,
|
| Do you have any tips on how to preload/precreate the EMF?
|
hm, tricky. we do excatly that: call it directly from frontend (servlet) and
then set the EMF to some kind of configuration singleton. not nice but it works.
maybe someone from jboss can give a hint h
you must have jboss-cache.jar and jgroups.jar in your server/default/lib and
also ejb3-entity-cache-service.xml in server/default/deploy.
maybe copy them from the "all" config or even better use jboss installer with
option "ejb3 distributed"
you can have this setting in persistence.xml also, bu
I had the same problem creating an EMF. afaik you cannot call
createEntityManagerFactory in an already running transaction. create it
"outside" of transaction/bean and use it to create your application managed
EntityManager.
btw: you can avoid putting ehcache to classpath by setting jboss cache
not sure if I got it right, but if your parent or child relations are annotated
with "lazy", you must do all calls to parent and children in an entity context
(running transaction). this is normally in a SLSB or SFSB. maybe you should
post your Board bean code here ...
View the original post :
I guess there is a problem with the naming of your ear and jar file. see your
log output:
"bank3.ear.ear" and "bank.jar.jar" (duplicate extension)
look in you deploy directory and check your build script.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=395037
you have to use the entity returned from merge:
public Country RefreshCountryCollection(Country country)
{
country = em.merge(country);
country.getChildrenOrganizations();
return country;
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950376#3950376
Hi Joerg,
do you had any success with this?
We have exactly the same requirement: many identical dbs/datasources (ASP like
application) accessed from 1 jboss instance. we also have to create
PersistenceUnits on the fly at runtime.
I also tried with EJBConfiguration.createEntityManagerFactory(
we encounter following behaviour while optimizing our ejb3 application:
- we have an Entity X with 2 collections of other entities
- loading of a big list of X (> 8000) takes ca. 3 s
- 2 subsequent loads of smaller lists of other entites in the same transaction
take also 1-2 s
- the hibernate log
still can't get it to work.
I have an ear (mc.ear) for my application. Inside there are:
- entities.jar with entities classes and persistence.xml including 1 PUnit
- business.jar with SBs and POJOs
- web.war
all 3 packages are listed in application.xml as modules:
|
|
| mc
|
I encountered exactly the same problem. thanks for the hint.
but my jar with entities is packed inside an ear. I tried:
../mc.ear/entities.jar
but it doesn't work.
It works if I deploy mc.ear unpacked.
any hint?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic
Have you found a solution for it?
I encountered the same problem in calling a SLSB from a SFSB after migrating
from 3.2.x to 4.0.1Sp1.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3871855#3871855
Reply to the post :
http://www.jboss.org/index.html?module=
21 matches
Mail list logo