Internal Website Search
51-100 of 200 resultsDatabase is erased after deploying a new web application version? When should I use the close method of EntityManagerFactory and EntityManager? As long as ... the close method of EntityManagerFactory and EntityManager? You can close the EntityManagerFactory when the web application is closed (see this example ). Usually EntityManager | |
Persist error @ManyToMany how to define correct entities relationships.persistence. EntityManagerFactory ; import javax.persistence.Id; import javax.persistence.ManyToMany; import ... t = new Test(); t.test(); } public static class Test{ EntityManagerFactory emf; EntityManager em ... javax.persistence.EntityManager; import javax.persistence. EntityManagerFactory ; import javax | |
Multi-tenant capability with hierarchies here . You will have to configure the EntityManagerFactory creation to accept a parameter, if you want ... the entityManagerFactory bean which I don't use. public EntityManager getEntityManger () { String tenantId = ThreadContext ... to create the entityManagerFactory bean for startup or else I am getting an error "Caused by: org | |
Cannot save or update entity on Spring App( entityManagerFactory ().getNativeEntityManagerFactory()); transactionManager.afterPropertiesSet ... LocalContainerEntityManagerFactoryBean entityManagerFactory () throws ClassNotFoundException ... { // Injected database connection: @PersistenceUnit(unitName="pu") EntityManagerFactory | |
Configure ObjectDB in spring context be able to inject EntityManagerFactory to my beans. Could you help me on this? vachagan Vachagan ... (" entityManagerFactory "); } @Bean public JpaTransactionManager transactionManager() throws ... .setEntityManagerFactory( entityManagerFactory ()); return transactionManager; } @Bean public | |
multi EntityManager with Spring Boot, but 'Too many persistable types (>10) LocalContainerEntityManagerFactoryBean entityManagerFactory ( @Qualifier("dataSource") DataSource ... ") LocalContainerEntityManagerFactoryBean entityManagerFactory ) { JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory( entityManagerFactory .getObject()); return | |
@Unique member combination not working) { EntityManagerFactory emf = ( EntityManagerFactory ... .persistence.*; public final class T1522 { static EntityManagerFactory emf =   ... have updated my code to just use a static EntityManagerFactory so I don't think | |
Filename.odb$ Persisting Issue Jared Hinze This may happen if the EntityManagerFactory (or PersistenceManagerFactory if you use JDO ... this is the only EntityManagerFactory instance in your application verify that emf.close is indeed reached and executed (e.g ... simple as I can make it. public class Main extends Application { private static EntityManagerFactory | |
Internal exception when updating date filed (TemporalType.DATE) GENERATE_PERSONS_COUNT = 1000; private EntityManagerFactory entityManagerFactory ; private EntityManager entityManager ... ; entityManagerFactory = Persistence | |
openejb jpa jaas module.persistence.EntityManager; import javax.persistence. EntityManagerFactory ; import javax.persistence ... Subject subject; private CallbackHandler callbackHandler; private EntityManagerFactory entityManagerFactory ; private EntityManager entityManager; protected Map sharedState = new HashMap (); private | |
Null returned by Persistence.createEntityManagerFactory EntityManagerFactory emf; private EntityManager em;   ... EntityManagerFactory emf; private EntityManager em; public ... EntityManagerFactory createEntityManagerFactory(String persistenceUnitName) { return createEntityManagerFactory | |
How force always recreate database on redeployment. Support Thanks for feedback, I have read the provided links. From EntityManagerFactory ... ) the drop parameter has to be specified: EntityManagerFactory emf =   ... EntityManagerFactory from EntityManager.getEntityManagerFactory, but by then it is constructed and I can't | |
Remove an entity which attributes were changed - OptimisticLockException one plugin or several plugins seems to be using one or more EntityManagerFactory / EntityManager ... that the same EntityManager (not just the same EntityManagerFactory ) is used by ... void main(String[] args) { EntityManagerFactory emf =   | |
Weird behaviour with enhanced classes and embedded entities.EntityManager; import javax.persistence. EntityManagerFactory ; import javax.persistence.FetchType; import javax ... ; EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("objectdbsscce.odb"); entityManager = entityManagerFactory .createEntityManager | |
Empty temporary dat files in the temp folder to which we continuously have a connection (open EntityManagerFactory ). For each user action we create an EntityManager ... . EntityManagerFactory ; import javax.persistence.FlushModeType; import javax.persistence.Persistence ... static void createDB(String db) { EntityManagerFactory emf = Persistence | |
ObjectDB CRUD Examples Would this be correct? public List read() { EntityManagerFactory emf ... () { EntityManagerFactory emf = Persistence.createEntityManagerFactory(   ... and see if it works. It would be more efficient to avoid creating and closing EntityManagerFactory instances | |
Guessbook tutorial: Java EE 6 JPA Tutorial - Maven Project to obtain a connection from a closed EntityManagerFactory at com.objectdb.o._PersistenceException.b ... a connection from a closed EntityManagerFactory at com.objectdb.o.MSG.d(MSG.java:61) at com.objectdb.o.OMF ... : Attempt to obtain a connection from a closed EntityManagerFactory at com.objectdb.o | |
Unable to persist TreeMap.EntityManager; import javax.persistence. EntityManagerFactory ; import javax.persistence.LockModeType; import ... ; EntityManagerFactory emf = Persistence.createEntityManagerFactory ... javax.persistence.EntityManager; import javax.persistence. EntityManagerFactory ; import javax | |
Schema Update: class hierarchy change. EntityManagerFactory ; import javax.persistence.Persistence; public final class Test { public static void main(String[] args) { System.out.println("start"); EntityManagerFactory emf = Persistence   ... .EntityManager; import javax.persistence. EntityManagerFactory ; import javax.persistence.Persistence; public | |
Left join fetch behaviour doesn't retrieve children?. EntityManagerFactory ; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax ... ; EntityManagerFactory emf = Persistence.createEntityManagerFactory ... ; EntityManagerFactory emf = Persistence.createEntityManagerFactory("objectdb:$objectdb/db/test.tmp;drop");   | |
Feature Request for database.obj$ file when everything is done after closing the database? Closing the EntityManagerFactory should complete ... scenarios in which after ordinary close (of the EntityManagerFactory , not just ... after flush that is not closed). It is a good practice to use a long-lived EntityManagerFactory | |
client server mod of communication with server, in client server mode. 1) EntityManagerFactory emf = Persistence ... ) EntityManagerFactory emf = Persistence.createEntityManagerFactory("objectdb://localhost:6137 ... ; EntityManagerFactory emf = Persistence.createEntityManagerFactory("objectdb:testmemory.mem");   | |
ODB IndexActivation NullPointerException and closing the creation of EntityManagerFactory or of EntityManager? Is it possible to ask if the ODB ... EmbeddedSystems We can add the following code block after creating the EntityManagerFactory . this. entityManagerFactory = createEntityManagerFactory(....); //trigger the ODB IndexActivation. It failed | |
mapping file is not being loaded with the Persistence api: EntityManagerFactory emf = Persistence.createEntitManagerFactory("project.odb"); //this set ... ; This simple program: import javax.persistence.Entity; import javax.persistence. EntityManagerFactory ... (String[] args) { EntityManagerFactory emf =   | |
Memory leak when the user logs out, as well as EntityManagerFactory . We use em.clear() after every commit ... The heap dump indicates that 9 EntityManagerFactory instances have been created and have not been closed, and ObjectDB is very sensitive for closing every opened EntityManagerFactory . Please try build | |
ObjectDB within a resource adapter module and Java EE Connector Architecture an EntityManagerFactory . But when using ObjectDB you can either define a standard persistence unit in ... :' EntityManagerFactory emf = Persistence.createEntityManagerFactory("$objectdb/db/points.odb"); But if you are not using an explicit EntityManagerFactory it is not clear to me how to "inject" easily specs | |
Connect to objectdb database EntityManagerFactory EntityManagerFactory emf = Persistence . createEntityManagerFactory ( "objectdb-unit ... : EntityManagerFactory emf = Persistence . createEntityManagerFactory (   | |
Memory consumption of empty Strings[] args) { EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("sscce.odb"); EntityManager entityManager = entityManagerFactory | |
ArrayIndexOutOfBoundsException at com.objectdb.o.ALS.c(ALS.java:89) ArpMonitor.scala: val emf: EntityManagerFactory = Persistence.createEntityManagerFactory("./DB/arp.odb") I ... EntityManagerFactory with multiple EntityManager instances. It is uncommon to create multiple EntityManagerFactory instances as demonstrated by your code. support Support | |
Entity factory; ... } } public interface EntityFactory { T create(Class entityClass); } EntityManagerFactory entityManagerFactory = (...); entityManagerFactory .setEntityFactory(myFactory); The JPA listeners | |
objectdb-2.6.9_02 (with "objectdb.temp.no-enhancement-crc-check") vs. generic classes with interfaces: detailed investigation; EntityManagerFactory emf = Persistence ... EntityManagerFactory .. 2016-08-23 00:12:32.946 INFO Main []: *** Create Project and Element model *** 2016-08-23 00 ... : protected void createProject( EntityManagerFactory emf) { log_info("*** Create Project and Element model | |
objectdb speed hii i have one problem . as you said close EntityManagerFactory to restore database its works ... to store data that is not happening when EntityManagerFactory not closed prateek Prateek gupta You can proceed with loading the csv file as usual after reopening the EntityManagerFactory . support Support | |
ObjectDB and Spring Boot - sharing a simple working example (). build (); } @Bean (name = " entityManagerFactory ") public EntityManagerFactory ... ( EntityManagerFactory emf) { JpaTransactionManager txManager = new JpaTransactionManager | |
Finding out the JPA provider and EntityManagerFactory , but its not. So I am left with EntityManager.getDelegate() instanceof com.objectdb.jdo.PMImpl or EntityManagerFactory instanceof com.objectdb.jpa.EMF. Or putting something in my properties ... the EntityManagerFactory : boolean isObjectDB = emf.getProperties | |
UserException: Invalid configuration in 'internal' - Check permissions: EntityManagerFatory entityManagerFactory = Persistence.createEntityManagerFactory(filePath); EntityManager = entityManagerFactory .createEntityManager(); However I get the following error com.objectdb.o ... if the EntityManagerFactory class can't be initialized because it can't find the database. I have tried with several input | |
Persistence.createEntityManagerFactory(persistenceUnitName) - JPA Static Method JPA Static Method in javax.persistence.Persistence EntityManagerFactory createEntityManagerFactory ( String persistenceUnitName ) Create and return an EntityManagerFactory for the named persistence unit. Parameters: persistenceUnitName the - name of the persistence unit Return | |
EntityManager.getEntityManagerFactory() - JPA Method JPA Method in javax.persistence.EntityManager EntityManagerFactory getEntityManagerFactory () Return the entity manager factory for the entity manager. Return: EntityManagerFactory instance Throws: IllegalStateException - if the entity manager has been closed Since: JPA 2.0 | |
javax.persistence.PersistenceUnit JPA Annotation PersistenceUnit Target: TYPE, METHOD, FIELD Implemented Interfaces: Annotation Expresses a dependency on an EntityManagerFactory and its associated persistence unit. Since: JPA 1.0 Public Annotation Attributes String name default "" (Optional) The name by which the entity manager | |
Unexpected Exception during commit. EntityManagerFactory .doFilter( EntityManagerFactory .java:158) at org.apache.catalina.core ... .persistence. EntityManagerFactory emf = Persistence ... .fastmodel.fastplan.db. EntityManagerFactory .contextInitialized( EntityManagerFactory .java:55) at org.apache | |
Issues with JDO Casting & Full Qualified Names.persistence. EntityManagerFactory ; import javax.persistence.Persistence; public final class F328 { public static void main(String[] args) { EntityManagerFactory emf = Persistence ... ; import javax.persistence. EntityManagerFactory ; import javax.persistence.Persistence; public final | |
combined index not used(String[] args) throws Exception { EntityManagerFactory emf = Persistence.createEntityManagerFactory ... ; entityManager = entityManagerFactory .createEntityManager ... .no-schema-upgrade", "true"); EntityManagerFactory emf = Persistence.createEntityManagerFactory("D:\\odb | |
Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabled.EntityManager; import javax.persistence. EntityManagerFactory ; import javax.persistence.FetchType; import ... ; EntityManagerFactory emf = Persistence.createEntityManagerFactory("objectdb:$objectdb/db/test.tmp;drop");   ... ; EntityManagerFactory emf =   | |
Memory leak in com.objectdb.o.CST; Thanks! Trianglehead Json Error You have 168 EntityManagerFactory instances. Do you access 168 ... one EntityManagerFactory instance, use it for creating multiple EntityManager instances, and remember to close each EntityManagerFactory and EntityManager instance at the end of use. support Support Hi I think | |
Unexpected exception when execute query without enhanced entities; EntityManagerFactory emf = Persistence ... (); } private static void store( EntityManagerFactory emf ... (); } private static void retrieve( EntityManagerFactory emf) {   | |
Best practise loading big data the database (i.e. the EntityManagerFactory ) . If you need an advice regarding tuning cache ... .persistence . EntityManager ; import javax.persistence . EntityManagerFactory ; import javax ... = new File (fileName); if (f. exists ()) { f. delete (); } EntityManagerFactory emf = Persistence | |
Tracking changes to new collections (in enhancement mode) after flush"; EntityManagerFactory emf = Persistence ... ) { EntityManagerFactory emf = Persistence .createEntityManagerFactory("objectdb:c:\\test.tmp;drop ... "; EntityManagerFactory emf = Persistence | |
ObjectDB-2.6.9: Failed to commit transaction: Failed to set numeric value of field property Element.id using reflection createProject( EntityManagerFactory emf): protected void createProject( EntityManagerFactory emf) { format ... .getTransaction().commit(); ... On attempting to persist it get error: Create EntityManagerFactory | |
JDOHelper.getPersistenceManagerFactory(overrides,name,resourceLoader,pmfLoader) - JDO Static Method. EntityManagerFactory cast to a PersistenceManagerFactory . If the name given is null or consists ... PersistenceManagerFactory} or javax.persistence. EntityManagerFactory classes Return: the {@link | |
PersistenceManagerFactory.setTransactionType(name) - JDO Method EntityManagerFactory . Parameters: name - the TransactionType Throws: JDOUserException - if the parameter is not | |
javax.jdo.PersistenceManagerFactory the same-named property in JSR-220 EntityManagerFactory . Parameters: name - the TransactionType Throws |