Bug #4
IdentityPool usage out of session context
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
History
#1 Updated by Stanislav Lomany almost 14 years ago
@44897 - issue:
1. Register this server hook: public class ServerHook implements InitTermListener { public void initialize() { Persistence persistence = PersistenceFactory.getInstance("p2j_test"); try { persistence.nextPrimaryKey("book"); } catch (PersistenceException e) { e.printStackTrace(); } } public void terminate(Throwable t) { } } 2. Start server 3. You will get the following exception: (com.goldencode.p2j.persist.id.SequenceIdentityManager:SEVERE) Identity pool has been stopped because of an error. java.lang.NullPointerException at com.goldencode.p2j.ui.LogicalTerminal.<init>(LogicalTerminal.java:644) at com.goldencode.p2j.ui.LogicalTerminal.<init>(LogicalTerminal.java:495) at com.goldencode.p2j.ui.LogicalTerminal$1.initialValue(LogicalTerminal.java:535) at com.goldencode.p2j.ui.LogicalTerminal$1.initialValue(LogicalTerminal.java:532) at com.goldencode.p2j.security.ContextLocal.get(ContextLocal.java:158) at com.goldencode.p2j.ui.LogicalTerminal.locate(LogicalTerminal.java:5459) at com.goldencode.p2j.ui.LogicalTerminal.access$100(LogicalTerminal.java:495) at com.goldencode.p2j.ui.LogicalTerminal$2.createScopeable(LogicalTerminal.java:6081) at com.goldencode.p2j.util.TransactionManager$ContextContainer.obtain(TransactionManager.java:5398) at com.goldencode.p2j.util.TransactionManager.isTransaction(TransactionManager.java:3230) at com.goldencode.p2j.persist.id.IdentityPool.nextPrimaryKey(IdentityPool.java:291) at com.goldencode.p2j.persist.id.SequenceIdentityManager.nextPrimaryKey(SequenceIdentityManager.java:142) at com.goldencode.p2j.persist.Persistence.nextPrimaryKey(Persistence.java:2588) at com.goldencode.testcases.ServerHook.initialize(ServerHook.java:24) at com.goldencode.p2j.main.StandardServer.hookInitialize(StandardServer.java:1174) at com.goldencode.p2j.main.StandardServer.bootstrap(StandardServer.java:513) at com.goldencode.p2j.main.ServerDriver.start(ServerDriver.java:319) at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:450) at com.goldencode.p2j.main.ServerDriver.process(ServerDriver.java:126) at com.goldencode.p2j.main.ServerDriver.main(ServerDriver.java:576) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) This happens because identity pool cannot return keys out of a session context.
#2 Updated by Redmine Admin over 12 years ago
@45193 - Status changed from WIP to Hold
#3 Updated by Stanislav Lomany about 12 years ago
Imported from JPRM on 2012-04-12 11:22:56.691:
TASKID = 5988 PROJECTID = 124 STATUS = 3 (Hold) DESCRIPTION = IdentityPool usage out of session context OWNER = SVL ASSIGNEE = BILLABLE = false PRIORITY = 5 (Normal) PHASE = 52 (Problem Resolution) COMPONENT = 0 ESTEFFORT = 0.000000 ESTSTART = 2010-05-31 ESTSTOP = ACTSTOP = CASENUM = VENDORID = COMMENT = '' LASTWIP = 2011-09-18