Hi,

You can do this with the
EntityManagerFactory.createEntityManager(String puName, Map props)
signature.

Alternately, you can use XML entities to define the shared mappings
outside of your persistence units and refer to them in multiple
places.

-Patrick

On 10/29/07, Adam Hardy <[EMAIL PROTECTED]> wrote:
> Hi List,
>
> I am running JPA with a set of mapping files, one for each table in the 
> database
>   plus a few for queries, and in my test environment I have additional mapping
> files that aren't required in container and in fact I would like to exclude.
>
> So I made a second test persistence.xml and now I find though that I have to
> maintain 2 lists of mapping files.
>
> I would like to initialize the entity manager factory programmatically to add
> the main list of mapping files, and then in testing, to add the extra mapping
> files as well.
>
> There seems to be no method on the API where I do that programmatically 
> though.
> Is that correct or have I overlooked something?
>
>
> Regards
> Adam
>


-- 
Patrick Linskey
202 669 5907

Reply via email to