0

Here's my problem :

1 - I read a file and split a certain range in each row to extract a code.(done)

2 - I need To create a sequence for the extracted code, so I can get next value for each.

3- I need to be sure that each "nextvalue" would be unique because of the Load Balancing on two weblogic

4 - I'm using Oracle so I can't just use an auto incremente

Given all this all I can do in Database side is to create the table wich will contain all sequences, then auto increment the needed column. Maybe I got it wrong.

If you can help, thank you a lot

Fprime
  • 1
  • 1
  • what is the issue you are facing? – Jobin Nov 07 '16 at 11:00
  • http://stackoverflow.com/questions/40037062/how-to-create-a-database-sequence-which-is-different-for-different-channels isn't it what you need? One sequence per one weblogic? – Kacper Nov 07 '16 at 12:07
  • @Jobin The issue is how to create dynamicaly the sequences and then incremente the wanted field, which is in my case CURRENT_NUMBER. I know sequence must be created in database layer and managed by the database it self. But I need to create sequence for lot of codes, for instance : Code CURRENT_NUMBER 001 0001 030 0001 060 0003 I need to be able to increment the number for each of my codes My codes are also inserted in java. – Fprime Nov 07 '16 at 13:17
  • @Kacper : no :/ but thank you – Fprime Nov 07 '16 at 13:22
  • yes that is fine.. you can use @GenericGenerator or programmatically using "select SEQUENCE_NAME.nextval as num from dual" – Jobin Nov 07 '16 at 15:30
  • thank you @Jobin forget about the sequence the real problem is : **How can increment a value (update with +1) and be sure that the two servers don't get same value because the two are using one and same database.** Thank you in advance – Fprime Nov 08 '16 at 10:48

0 Answers0