0 Replies Latest reply on Feb 10, 2006 5:28 AM by Stefan Kanev

    Default persistence context in an .ejb3

    Stefan Kanev Newbie

      Hi. Here's the problem:

      I want to pack my session beans in .ejb3 file, while my entities are in .par. The .par will be mapped to a persistence context (say "foo") whose datasource is a PostgreSQL database. I would like all my session beans in that .ejb3 file to use that persistence context, but the only way it could be done (that I've found so far) is to add unitName="foo" in every @PersistenceContext injection in each session bean. My question is: Can I say "All @PersistenceContext injections in this .ejb3 file would use this persistence context if none is specified"?