[EJB3] - JPA Sequence generated value is different from Oracle sequence nextVal
by Aslam Khatri
Aslam Khatri [https://community.jboss.org/people/aslamk] created the discussion
"JPA Sequence generated value is different from Oracle sequence nextVal"
To view the discussion, visit: https://community.jboss.org/message/734231#734231
--------------------------------------------------------------
The default sequence generator of JPA (SequenceHiloGenerator with allocationSize=50 ) generates a sequence value which is different from the corresponding oracle sequence's nextVal.
We have used&…
[View More]nbsp; allocationSize=50 for performance improvement but this creates problem by generating values which are not matching with the corresponding sequence values. In my case if nextVal of the sequence is 250 then the value generated by the JPA is far more than 250. I want the generator behaviour to return database sequence values while giving me performance enhancement by calling database sequence only once for every 50 inserts.
I know setting allocationSize=1 would generate value same as database sequence nextVal but in this case it makes select query for each insert to the table. I want to get rid of the selects for the inserts and thats why I moved on approach for HiliGenerator using allocationSize=50 but in this case facing problem of generated value not having in sync with the database sequence.
I would appreciate if anyone suggest a solution for this problem.
Regards
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/734231#734231]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
12 years, 8 months
[JBoss Tools] - Deployment problem with Eclipse + JBoss Tools
by Lukas Kalinski
Lukas Kalinski [https://community.jboss.org/people/sfish] created the discussion
"Deployment problem with Eclipse + JBoss Tools"
To view the discussion, visit: https://community.jboss.org/message/733627#733627
--------------------------------------------------------------
Ok, I've been on this for like 10 hours now, and neither Google nor my attempts to find a solution have helped. So here's the problem, I hope somebody can help, or at least tell me whether this should be reported as a bug …
[View More]or not.
I recently installed Eclipse 3.7.2 on Mac OSX 10.7.3 (Lion), together with the latest JBoss Tools package. As I am new to JBoss Tools (and Apache Maven that it's using in my projects) I decided to get familiar with it before going on with something serious. So I created a new JBoss Central/Spring MVC Project. After that I added a server instance (JBoss AS 7.1.1) inside Eclipse, and deployed this unmodified project template using the Project/Run As/Run on server way. This works perfectly! However, if I for some reason decide that I would like to undeploy the project, and then deploy it again (i.e. undeploy using JBoss Management, then delete the exploded war-dirs, restart the server, and finally deploy as described above), I end up with everything being deployed, EXCEPT for everything that is in the webapp directory (the one that's created by default in this project template). As a consequence, the web application won't run anymore.
Now this is what I've tried without any success:
- Restart Eclipse;
- Delete every possible file in the JBoss AS directory, that could have something cached inside it;
- Committed the whole project tree into GIT, in order to check whether Eclipse changes some config setting (it doesn't);
- Various combinations of the above, together with a lot of other not-remembered steps ...
/Lukas
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/733627#733627]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
12 years, 8 months
Interference between JAX-RS providers across WARs in JBoss6?
by Jan Algermissen
Hi,
I have two WARs deployed in a JBoss 6.
The wars both include a JAR that contains some code common to both applications. (Each WAR has its own copy of the JAR)
The applications access the classes in the JARs using CDI and EJB injection.
The JARs do not contain JAX-RS providers.
When I deploy the two applications alongside each other I get some weird interference between JAX-RS provider classes in the applications. In one application, the JAX-RS runtime does not find any of my providers …
[View More]in the other it iterates over the providers of both applications when it tries to find an appropriate provider.
Is this to be expected behavior due to class loader configuration issues?
Is there something I might be doing wrong?
Do I have to configure JBoss 6 in a special way to ensure isolation between WARs?
Note: it might be that at times I have had different versions in the JAR of the 'shared' classes. Could that have caused JBoss to screw the JAX_RS runtime up?
Jan
[View Less]
12 years, 8 months