[jboss-user] [EJB 3.0] - Re: Share entity bean between stateless session beans

2008-11-20 Thread kstrunk
Wolfgang Knauf wrote : Hi, | | Here is something from chapter 5.6.1, but this does not make it much clearer: | anonymous wrote : A new persistence context begins when the container-managed entity manager is invoked in the scope of an active JTA transaction, and there is no current

[jboss-user] [EJB 3.0] - Re: Share entity bean between stateless session beans

2008-11-20 Thread kstrunk
Rhodan76 wrote : Please check, that you are using the only the LOCAL-Interface from the bean as reference The local and the remote interfaces are the same interface at the moment. But I'll try it with separate interfaces and get back to you. View the original post :

[jboss-user] [EJB 3.0] - Re: Share entity bean between stateless session beans

2008-11-20 Thread kstrunk
Rhodan76 wrote : Please check, that you are using the only the LOCAL-Interface from the bean as reference Ah, it works! Thank you very much. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4191022#4191022 Reply to the post :

[jboss-user] [EJB 3.0] - Share entity bean between stateless session beans

2008-11-18 Thread kstrunk
Hi! I have a problem with two local stateless session beans and an EntityManager which is used in one of the SLSBs. I want the first SLSB to do basic database operations like finding entities and the other one to work with the resulting entities. I attached a small example: @Stateless

[jboss-user] [Installation, Configuration Deployment] - Re: log4j configuration in ear file

2007-05-29 Thread kstrunk
jwcone wrote : kstrunk wrote : | | Except for that part about Using your own log4j.xml file (with EJB JAR files )... | | You're right. I found it. Just needed to scroll down a bit more. | | I added the ContextRepositorySelector to my ejb.jar and altered it to use property files

[jboss-user] [Installation, Configuration Deployment] - Re: log4j configuration in ear file

2007-05-29 Thread kstrunk
Ups, quoting went wrong a little bit in my last posting but hmm, no edit button... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049472#4049472 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049472

[jboss-user] [Installation, Configuration Deployment] - Re: log4j configuration in ear file

2007-05-28 Thread kstrunk
jwcone wrote : See the Wiki: | http://wiki.jboss.org/wiki/Wiki.jsp?page=ScopedLoggingConfig | I found this before but the description is for web application only. My WebApp is working fine, but I want to get my ejb application to log properly. How can I do that? View the original post :

[jboss-user] [Installation, Configuration Deployment] - log4j configuration in ear file

2007-05-27 Thread kstrunk
Hello, I'm using JBoss 4.2.0 and I want to add a custom log4j.properties to my ejb.jar and web.war. I'd like to do the following: application.ear | web.war | ejb.jar | log4j.jar I put the log4j.properties in my web.war and in my ejb.jar. Both of them uses log4j.jar referenced from

[jboss-user] [EJB 3.0] - Re: Entity relationship and remove operations

2007-04-09 Thread kstrunk
fhh wrote : Another problem might be that your entityManager is not in sync with the database. You were right. I simply had to refresh the parent and then hibernate could delete all references. So it's working now. Conclusion: Hibernate does the cascading delete itself and does not use

[jboss-user] [Installation, Configuration Deployment] - Re: startup error PSQLException

2007-04-09 Thread kstrunk
Hi! I'm facing the same problem with JBoss 4.0.5 and Postgres 8.2. Does anybody know what's going wrong? Strunker View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4035690#4035690 Reply to the post :

[jboss-user] [EJB 3.0] - Re: Entity relationship and remove operations

2007-04-04 Thread kstrunk
fhh wrote : Have you looked up which entity the error message refers to and to which constraint? | | Another problem might be that your entityManager is not in sync with the database. | | | Regards | | Felix Hi Felix, the error message refers to member sender of entity

[jboss-user] [EJB 3.0] - Re: Entity relationship and remove operations

2007-04-04 Thread kstrunk
Hi! I've just altered the table to enable cascading: | CONSTRAINT fk278c74e4b6f3dc65 FOREIGN KEY (sender) | REFERENCES users (id) MATCH SIMPLE | ON UPDATE NO ACTION ON DELETE CASCADE, | And now deleting users works fine, but why is the schema not created automatically

[jboss-user] [EJB 3.0] - Re: Entity relationship and remove operations

2007-04-04 Thread kstrunk
fhh wrote : anonymous wrote : | | And now deleting users works fine, but why is the schema not created automatically this way? | | | | I'm not sure whether javax persitence uses the on delete cascade functionality of the underlying database or whether the entitymanager will

[jboss-user] [EJB 3.0] - Re: CMP Entity and foreign keys

2007-04-03 Thread kstrunk
abhinav19 wrote : | I will check this out in my DB and reply again. | Have you found out anything? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4033907#4033907 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4033907

[jboss-user] [EJB 3.0] - Re: Entity relationship and remove operations

2007-04-03 Thread kstrunk
Nobody an idea? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4033908#4033908 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4033908 ___ jboss-user mailing list

[jboss-user] [EJB 3.0] - Re: Entity relationship and remove operations

2007-04-03 Thread kstrunk
Thanks for your reply. I tried it out. I removed the name and/or the referencedColumn, but it didn't work. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4034270#4034270 Reply to the post :

[jboss-user] [EJB 3.0] - Entity relationship and remove operations

2007-03-20 Thread kstrunk
Hello, I have a problem with entity relationships and foreign key constraints. I want to get all child entities deleted when the parent entity is deleted. Therefore I used the CasecadeType.REMOVE, but it doesn't work. Here is code fragment: | @Entity | @Table(name = Users) | public

[jboss-user] [EJB 3.0] - CMP Entity and foreign keys

2007-03-20 Thread kstrunk
Hi, I'm just wondering how JBoss handles foreign key constraints. I have an entity with a OneToOne-Mapping and CascaseType.ALL set, but in the database schema no cascade delete is set. Here's a code fragement: | @Entity | @Table(name = Users) | public class User implements Serializable

[jboss-user] [EJB/JBoss] - Solved!

2007-02-08 Thread kstrunk
I solved my problem. The problem was that my Java IDE (idea) started a redeployment automatically when I started the JUnits tests. So there were no beans I could access. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4013195#4013195 Reply to the post :

[jboss-user] [EJB/JBoss] - Re: Remote not bound

2007-02-06 Thread kstrunk
It is getting strange. When I run my client code (JUnitTest) in debug mode with a breakpoint set, everything works fine now. But in normal mode I still get the exception: javax.naming.NameNotFoundException: remote not bound I really don't understand what's going on. What's different in

[jboss-user] [EJB/JBoss] - Re: Remote not bound

2007-02-05 Thread kstrunk
Thank you for your answers, but I still have the same problems. @jaikiran: When I do like you've posted, I get the following exception: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource

[jboss-user] [Beginners Corner] - UndeclaredThrowableException and duplicate primary key

2006-10-14 Thread kstrunk
Hello! I'm really new to JBoss and I hope somebody can help me with my first problem I can't solve myself. When I call create on a locale EntityBean with a primary key which already exists, I get an UndeclaredThrowableException which is caused by a DuplicateKeyException, but I really don't