Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
16. Jul 2008, 06:03 CET | Link

Hi!

Sometimes i meet some exceptions on use of @In and @Out, because i don't know exact meaning of those and attributes.
The common exception is:
   *javax.ejb.EJBTransactionRolledbackException: could not set field value: XXX.service*
I declared like this:

        @Stateless
        @Entity("service")
        public Class Service {
        .....................
        }

        @Stateless
        @Entity("XXX")
        public Class XXX {
          @In(create=true)
          private Service service;
        }

What is the problem in this code?
And maybe, you can explain me the difference between @In and @Out including their attributes such as "create", "required".

Thanks for you help!!!

2 Replies:
16. Jul 2008, 09:43 CET | Link

As far as I know you can't do injection an Entity bean, it simply doesn't work. About the explanation, I doubt I can do it better than in the docs, I'd advice you to read carefully those and maybe ask your questions afterward.

16. Jul 2008, 10:22 CET | Link

You mix 2 things, so don't be surprised it does not work :) Stateless session beans (@Stateless) and JPA entities (@Entity) should be different objects. Maybe you ought to read a bit about ejb3 or have a look at the examples :)

Cheers, -Pawel