Hi Michael,
Have you tried the @PersistenceUnit inside a bean:
@PersistenceUnit EntityManagerFactory emf
This should inject the EMF into the bean.
Cheers,
Milosz
> Hello,
>
> We need to use database dependent native queries ("fast lane reader
> pattern"). Therefore we need
> to load the appropriate statements stored e.g. in a properties file, the name
> of which is
> derived from the database (e.g. "sqlserver.sql")
> I wanted to determine the name by evaluating
> entityManagerFactory.getProperties ().get("Platform");
>
> Running this standalone works but within a bean I don't have access to the
> EMF, do I?
> Is there another to determine which database is in use?
>
> kind regards, Michael
>