Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Antwort: Re: Retrieving PU properties with Eclispelink 2.4.0

Hello Tom,

your assumption was right and your hint works fine.

Thanks you!

Best regards

Jürgen


eclipselink-users-bounces@xxxxxxxxxxx schrieb am 02.10.2012 14:07:32:

> Von: Tom Ware <tom.ware@xxxxxxxxxx>

> An: eclipselink-users@xxxxxxxxxxx,
> Datum: 02.10.2012 14:09
> Betreff: Re: [eclipselink-users] Retrieving PU properties with
> Eclispelink 2.4.0

> Gesendet von: eclipselink-users-bounces@xxxxxxxxxxx
>
> I assume you are hoping to get a "javax.persistence.jdbc.user" that
> is defined
> in persistence.xml?
>
> Does the code work better if add the following persistence unit
> property to your
> persistence.xml?
>
> eclipselink.deploy-on-startup=true
>
> On 02/10/2012 5:25 AM, Juergen.Wieners@xxxxxxxxx wrote:
> > Hello,
> >
> > This code used for years returned the currently used persistence
> unit properties
> > e.g. username, url and so on
> >
> > Map<String, String> properties= *new*HashMap<String, String>();
> > emf= Persistence./createEntityManagerFactory/("myPUname", properties);
> > Map<String, Object> map = emf.getProperties();
> > String jdbcuser = map.get("javax.persistence.jdbc.user")+"";
> >
> > After switching from EclispeLink 2.3.2 to 2.4.0 the map is empty.
> >
> > Did I miss something in changelog for 2.4.0 or is there any other
> new way for
> > retrieving this properties now?
> >
> > Best regards
> >
> > Jürgen
> >
> >
> >
> > _______________________________________________
> > eclipselink-users mailing list
> > eclipselink-users@xxxxxxxxxxx
> >
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top