Skip to main content

Dynamic persistence unit name

I'd like to know if it's possible to inject from a custom resource, the persistence unit name into EJB's. I'd like to do something like this: @Resource (name="my_jndi_name") public static String myPUName; and then: @PersistenceContext (unitName = myPUName) protected EntityManager em. The problem is...

Community: GlassFish