I created a JPA project that also has a Swing project for a GUI that utilizes the JPA code to insert a record in an Oracle table via a stored procedure. The table has a trigger on it that generates a new ID via sequence.nextval. The stored procedure has OUT parameter for the new ID. The problem is, that when the code executes, two entries are made into the table with the same data.
The call to getResultList() in the executing code below is to get the OUT parameter that contains the new ID value. The message box that pops up fires only once. When I execute this code from another project like in Main().... a "stand alone" project, ( in other words not using via a GUI) everything works as expected. Meaning no double insert.
It's only when I fire it off via this GUI that I get the double insert.
posted 4 years ago
Problem solved. Changed code to....
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads