toplink

Derby SQL Timestamp Arithmetic and JDBC escape syntax

…衆ロ難τιáo~ 提交于 2019-12-14 01:55:14
问题 I have two columns in my table, Created(TIMESTAMP) and lifetime(BIGINT). Lifetime is represented as seconds. I would like to add the lifetime column to the timestamp column and compare that result to another date. I referenced the derby manual and found support for TIMESTAMPADD in the "JDBC escape syntax for fn keyword" section: {fn functionCall} TIMESTAMPADD( interval, integerExpression, timestampExpression ) Okay so I tried: SELECT i.messageId FROM ServerMessageEntity i WHERE {fn

@MappedSuperclass static weaving with EclipseLink and multiple jars

…衆ロ難τιáo~ 提交于 2019-12-13 07:31:18
问题 My entities objects are scattered in multiple jars. In jar A I have a base class name MyBase which is annotated with @MappedSuperclass. In jar B there is an entity class which derives from MyBase. The problem is that because the weaving is done in the context of the jar file (I'm using the maven plugin) the base class (MyBase) isn't instrumented (although it should). If I move the derived class from jar B to A then the weaving process will handle the base as well. Since I'm working on a large

One table is not being created by toplink

断了今生、忘了曾经 提交于 2019-12-13 04:44:33
问题 I'm feeling really stupid having to ask this. But I've been looking at my code for 4 hours and can't figure it out. I have rebuild my database several times and can't get it to work. One of my tables isn't being created for some reason. I have 4 tables game, developer, gameimage and user. User isn't being created but the other are being created perfectly and working. I'm sure it's a stupid mistake but I just don't see it. If someone could just tell me why this might be happening that would be

Calling Remote EJB in EJB 3.1

北城以北 提交于 2019-12-12 12:13:55
问题 I need to call Remote stateless EJB from another Web application with in same glassfish( 3.1 final version) which return Entity Bean( JPA 2/Eclipselink).Iam getting ejb referance in web application through Dependancy Injection ( @EJB ) but entity becoming null.I google it and found that it is might be Serializable issue. Somewhere I found this TopLink either modifies entity classes ("weaves" them) on load or substitutes collection access at runtime to be able to detect lazily accessed or

problem with updating application with new data from database

别说谁变了你拦得住时间么 提交于 2019-12-11 12:45:38
问题 I have a web application that pulls data from the database then displays it. Now the problem I'm having is that every hour I want to do updates on the data in the database; this is done by a separate app, this all works fine. However, once this has happened and the user refreshes their web page, the new data isn't being displayed. I hope this makes sense. I'll provide some code from the app so that you see it better. My web app is written in netbeans using java and I have a persistence unit

Get the persistence-unit name [duplicate]

我与影子孤独终老i 提交于 2019-12-11 10:17:25
问题 This question already has answers here : Finding the current persistence unit for the current EntityManagerFactory (2 answers) Closed 5 years ago . How do you get the name of a persistence-unit in Java? I have a persistence.xml with many units, so I want to control which unit is used to create my EntityManager. There's method like getPersistenceName or smth ? I have searched for a while but did not find anything useful. 回答1: Please check this thread: Finding the current persistence unit for

SQL query from Toplink expression

[亡魂溺海] 提交于 2019-12-10 20:41:39
问题 I have a oracle.toplink.expressions.Expression expression object with me which has been created using oracle.toplink.expressions.ExpressionBuilder. I want to find its equivalent SQL query(say select emp.empname,emp.empId from employee emp) which will be fired eventually in order to fetch data. I want to find its equivalent Statement/PreparedStatement or anything which will help me obtain the raw SQL statement about to be fired. For e.g. Following is the toplink expression: expressionBuilder

Unknown entity class error message even though the entity is marked with @Entity annotation

耗尽温柔 提交于 2019-12-04 21:59:15
问题 I am building REST web app using Netbean6.9.1 and JPA EclipseLink. The issue I'm facing is even though my entity class MasatoTable is marked with Entity annotation, I get error: (java.lang.IllegalArgumentException: Unknown entity bean class: class entity.MasatoTable, please verify that this class has been marked with the @Entity annotation.) The thing is when I restart the GlassFish3 server from NetbeanIDE, it works for a while and somehow at some point, the error start showing up. I used to

how to display toplinks at footer in magento?

自作多情 提交于 2019-12-04 17:10:18
How can i display below toplinks in footer, i used below code in Footer.phtml file, <?php echo $this->getChildHtml('topLinks'); ?> but the links are not displayed?. How can i do this? Thanks in advance footer.phtml <div class="footer-container"> <div class="footer"> <?php echo $this->getChildHtml() ?> <?php echo $this->getChildHtml('newsletter') ?> <?php //echo $this->getLayout()->createBlock('cms/block')->setBlockId('sample_links')->toHtml() ?> <?php echo $this->getChildHtml('samplelinks') ?> <?php echo $this->getChildHtml('top.links'); ?> <p class="bugs"><?php echo $this->__('Help Us to Keep

JPA with Multiple Servers

别等时光非礼了梦想. 提交于 2019-12-03 17:31:12
I am currently working on a project that uses JPA (Toplink, currently) for its persistence. Currently, we are running a single application server, but, for redundancy, we would like to add a load balancer and another application sever (and possibly more as it grows). First, I'm running into the issue of JPA caching. Since two processes will be updating the same database, the JPA cache returns the cached value rather than going to the database. I see how to turn that off, and the database itself implements a level of caching. Is turning off the cache completely the way to go here? I see the