Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] RE POST: Why does eclipselink consume the whole allocationSize each time it's rebooted? Bug?

But I need all ids of an entity to be varying only by 1 number.

On 3 November 2010 09:24, James Sutherland <jamesssss@xxxxxxxxx> wrote:

By default EclipseLink (and JPA in general) uses a sequence pre-allocation
size of 50.  This will improve performance by avoiding accessing the
database on every insert.  You can use a id generator to set your
pre-allocation size to 1 if you desire.  This will have a very negative
impact on your applications performance.  I would always strongly recommend
using sequence pre-allocation.

See,
http://en.wikibooks.org/wiki/Java_Persistence/Identity_and_Sequencing#Sequencing



simpatico_qa wrote:
>
> http://stackoverflow.com/questions/4037669/why-does-eclipselink-consume-the-whole-allocationsize-each-time-its-rebooted
>
> Hello, I've just noticed that for my entity's id, eclipselink assigns an
> id
> 1 + the previously greated assigned IN THE SAME SESSION (1), as opposed to
> in the element table (2). This goes against my application expectations.
>
> What's the easiest way to tell it to do 2?
>
>  @Id
> @GeneratedValue(strategy = GenerationType.AUTO)
> private int objId;
>
>
>
> ij> connect 'jdbc:derby:db';
>
> ij> set schema memo; 0 Zeilen eingef?gt/aktualisiert/gel?scht ij> select *
> from meaning;
> OBJID |LASTPUBLI&|USR_EMAIL
>
> 1 |NULL |NULL
> 2 |2010-10-27|NULL
> 51 |NULL |NULL
> 101 |NULL |NULL
>
>
> --
> Regards,
> K. Gabriele
>
> --- unchanged since 20/9/10 ---
> P.S. If the subject contains "[LON]" or the addressee acknowledges the
> receipt within 48 hours then I don't resend the email.
> subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧
> time(x)
> < Now + 48h) ⇒ ¬resend(I, this).
>
> If an email is sent by a sender that is not a trusted contact or the email
> does not contain a valid code then the email is not received. A valid code
> starts with a hyphen and ends with "X".
> ∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
> L(-[a-z]+[0-9]X)).
>
>


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://old.nabble.com/REPOST%3A-Why-does-eclipselink-consume-the-whole-allocationSize-each-time-it%27s-rebooted--Bug--tp30072262p30122707.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
Regards,
K. Gabriele

--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x) < Now + 48h) ⇒ ¬resend(I, this).

If an email is sent by a sender that is not a trusted contact or the email does not contain a valid code then the email is not received. A valid code starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈ L(-[a-z]+[0-9]X)).


Back to the top