dev@glassfish.java.net

Re: Sniffer resolution

From: Mitesh Meswani <mitesh.meswani_at_oracle.com>
Date: Wed, 05 Jan 2011 17:03:55 -0800

Hi Lee,

You should be able to use a sniffer/deployer pair to wire up new
deployer that can handle stuff from new archive. You should aim to
reuse code from PersistenceUnitLoade and to do that you will need to
construct PersistenceUnitDescriptor for your pu and provide and impl of
ProviderContainerContractInfo.

HTH,
Mitesh

On 1/5/2011 5:16 AM, Lee Chuk Munn wrote:
> Hi
>
> I would like to get JPA support in my custom container. My container
> deploys XAR file, which is basically a JAR file with a renamed suffix.
>
> What I would like to do is to get JPA supported in the XAR. I've been
> looking at the JPA container source. The JPADeployer.java seem to only
> recognize JavaEE application types.
>
> My question is that can I write another JPA sniffer (that looks for
> META-INF/persistance.xml) for my application type?
>
> If I do this, will it clash with the existing JPASniffer? How do I
> resolve this?
>
> Thanks
>
> Regards
> Chuk
>