I have an environment java.lang.Integer value that tracks the last ID
(ID being a unique key in my db). After I create an entity I would like
to increment that number one higher so that the next time an entity
needs to be created it can use the next number. One of my solutions was
via an EJB Client
Context ctx = new InitialContext();
Object obj = ctx.lookup("java:comp/env/NextID");
int id = ((Integer)obj).getValue();
//set the id
/* These next lines of code did not work
ctx.rebind("java:comp/env/NextID",new Integer(++id));
ctx.bind("java:comp/env/NextID",new Integer(++id)); */
Can anyone help me with this problem?
--
Dan Hinojosa
Java & Lotus Notes Consultant
Java Certified Programmer
P.O. Box 4675
Albuquerque, NM 87196-4675
Telephone: (505) 262-0911
Email: [EMAIL PROTECTED]
WWW: http://www.digitalpriest.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".