ObjectDB Database Search

1-50 of 106 results

jakarta.persistence.EntityManagerFactory

Jakarta Persistence (JPA) Interface jakarta.persistence. EntityManagerFactory Super Interfaces ... . An EntityManagerFactory with a lifecycle managed by the application may be created using the static operations ... , there is exactly one EntityManagerFactory for each persistence unit: // create a factory at initialization time

EntityManagerFactory objects being locked during EntityManager creation

wherein the EntityManagerFactory objects are being locked during EntityManager object creation.  Please refer ... to understand any underlying EntityManagerFactory locking mechanism to get deeper insight into ... with ObjectDB wherein the EntityManagerFactory objects are being locked during EntityManager object

Memory Leak in EntityManagerFactory ?

don't understand. 1. the server is running in embedded mode 2. the static EntityManagerFactory (m ... and static EntityManagerFactory Object (i.e. m_manager_factory ) as you can see in the screenshot ... is, that there are 248 com.objectdb.jdo.PMImpl Objects left, and the root gc is as well the EntityManagerFactory

Objectdb EntityManagerFactory problem

gupta Your question is unclear. You can close each EntityManagerFactory by using the close method. By the way, creating an  EntityManagerFactory is relatively slow. It is usually better to use one  EntityManagerFactory per application, with multiple  EntityManager instances for multiple database connections. support Support

Database Replication and Clustering

this case, you can access the master database as follows: EntityManagerFactory emf = Persistence ... database requires a slightly different URL: EntityManagerFactory emf = Persistence ... , you can also use a composite URL: EntityManagerFactory emf = Persistence.createEntityManagerFactory( "objectdb

Setting and Tuning of JPA Queries

: For an EntityManagerFactory , use the createEntityManagerFactory method: Map properties = new HashMap(); properties.put("jakarta.persistence.query.timeout", 4000); EntityManagerFactory emf = Persistence

JPA Named Queries Annotations

. Retrieve it by result type from EntityManagerFactory .getNamedQueries , and use it to get a TypedQuery instance via EntityManager.createQuery .

jakarta.persistence.EntityManager

must be obtained from an EntityManagerFactory , and is only able to manage persistence of entities belonging ... via a call to EntityManagerFactory .createEntityManager . The EntityManager must be explicitly closed ... , and is thus considered quite error-prone. It is much safer to use the methods EntityManagerFactory .runInTransaction

Step 3: Add a Context Listener Class

EntityManagerFactory instance with a global application scope. We have to register ... if not existing yet) when the web application starts, by instantiating an EntityManagerFactory ... the EntityManagerFactory . To register a ServletContextListener : Open the [New Listener] dialog box

jakarta.persistence.EntityGraph

.createEntityGraph(String) EntityManager.getEntityGraph(String) EntityManagerFactory ... descriptor element, or added by means of the EntityManagerFactory .addNamedEntityGraph method

Step 4: Add a Servlet Class

, IOException { // Obtain a database connection: EntityManagerFactory emf = ( EntityManagerFactory ... ); } } GuestServlet performs the following operations on every http request: The EntityManagerFactory

Database 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

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

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

ObjectDB License Error I got

.EnableTransactionManagement; import javax.persistence. EntityManagerFactory ; import java.util.Properties ... ", // your Spring Data JPA repos entityManagerFactoryRef = " entityManagerFactory ", transactionManagerRef = "transactionManager" ) public class ObjectDbConfig { @Bean(name = " entityManagerFactory ") public

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

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

CriteriaQuery .where() for multiple conditions

(String name, String surname, ServletContext servletContext) { EntityManagerFactory emf = ( EntityManagerFactory ) servletContext.getAttribute("emf"); EntityManager em = emf.createEntityManager(); Person

Online backup problem

the backup. support Support This is the code I used in my servlet : EntityManagerFactory emf = null;   ... - with the same result.   EntityManagerFactory emf = Persistence.createEntityManagerFactory

Bug: ClassCastException by retrieval

; import javax.persistence. EntityManagerFactory ; import javax.persistence.EntityTransaction; import javax ... ; */ public static void main(String[] args) {   EntityManagerFactory emf = Persistence

Schema-Update: Rename superclass and remove one subclass

: Generate Database public static void main(String[] args) { EntityManagerFactory emf = Persistence ... EntityManagerFactory emf = Persistence.createEntityManagerFactory("objectdb:test.tmp"); EntityManager em = emf

javax.persistence.PersistenceException: No Persistence provider for EntityManager named in Karaf 4.0.7 and OSGi DS test

(); Thread.currentThread().setContextClassLoader( EntityManagerFactory .class.getClassLoader()); then it works ... in order to support e.g. Declarative Services and possibly provide  EntityManagerFactory as

Optimistic locking: prevent version increment on entity collection attribute

.Test public void test() throws IOException { EntityManagerFactory emf = Persistence ... document; } } @org.junit.Test public void test() throws IOException { EntityManagerFactory emf

Performance and memory usage of queries

; import javax.persistence.EntityManager; import javax.persistence. EntityManagerFactory ; import ... ; public static void main(String[] args) {   EntityManagerFactory emf = Persistence   

Attempt to begin a new transaction when a transaction is active

The code I have a RecordDao stateless java bean :  @Stateless public class RecordDao { private EntityManagerFactory emf; private EntityManager em; public RecordDao() { } @PostConstruct public ... the EntityManagerFactory and the EntityManager explicitly, but let the application server

persisting object with long[][] arrays of array

) {         EntityManagerFactory EMF = Persistence ... ;       EntityManagerFactory EMF = Persistence.createEntityManagerFactory

connection pooling

THUFIR THUFIR Every EntityManagerFactory instance manages a pool of connections and reuses ... with EntityManagerFactory  (which manages the connection pool) and EntityManager (which represents

Problem with distinct select, order by and equivalent alias/attribute path

. EntityManagerFactory ; import javax.persistence.Persistence; /** * * @author Benjamin Klink, SOLVIT GmbH */ public ... static void main(String[] args) {         EntityManagerFactory emf

EntityManager refresh problem

javax.persistence. EntityManagerFactory ; import javax.persistence.Persistence; import javax ... ;  odbFile.delete();         EntityManagerFactory emf

Persist not working when ObjectDB and another db is used in the same application (through spring) with different tx managers

EntityManagerFactory " entityManagerFactory ", which is associated with the MySQL/Hibernate

General Performance Issues Illustrated with a Specific Method

;dbUrl += ";drop";          EntityManagerFactory emf = Persistence ... static void store( EntityManagerFactory emf) throws Exception {         

Cast exception?

EntityManagerFactory createEntityManagerFactory(String paramString, Map paramMap) /* */ { /* 73 */ EntityManagerFactory localEntityManagerFactory = null; /* 74 */ PersistenceProviderResolver

Need help to make this test work and define proper annotations for entities Lists

.EntityManager; import javax.persistence. EntityManagerFactory ; import javax.persistence.GeneratedValue; import ... ;         EntityManagerFactory emf;       

Storing objects problem

that you have described. support Support Main class:       EntityManagerFactory emf ... (switch1);   router.getChildren().add(switch2);     EntityManagerFactory emf =  

Does ObjectDB support lazy loading?

void main(String[] args)   { String path = "test.odb"; EntityManagerFactory emf = Persistence ... ; String path = "test.odb";     EntityManagerFactory emf = Persistence

Join performance in Objectdb

;  EntityManagerFactory emf =             ... ; EntityManagerFactory emf =             Persistence

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

"is not null" queries not working with index

.persistence. EntityManagerFactory ; import javax.persistence.GeneratedValue; import javax.persistence.Id ... [] args) {         EntityManagerFactory emf = Persistence

Strange Error with Criteria API and Sorting

; import javax.persistence.EntityManager; import javax.persistence. EntityManagerFactory ; import javax ... (String[] args) {   EntityManagerFactory emf = Persistence.createEntityManagerFactory

Unexpected exception (Error 990) com.objectdb.o.InternalException

main(String[] args) {         EntityManagerFactory emf =   ... ;      EntityManagerFactory emf =        

Server crash - Mismatch client-server protocol prefix

.fastmodel.fastplan.db. EntityManagerFactory .doFilter( EntityManagerFactory .java:202) at org.apache

[ObjectDB 2.2.6_02] Unexpected exception (Error 990) at com.objectdb.o.OBC.aJ(OBC.java:961)

.persistence.EntityManager; import javax.persistence. EntityManagerFactory ; import javax.persistence ... .getName()).log(Level.SEVERE, null, ex); } } private EntityManagerFactory emf; public ReproduceTest

Close() Method of EMF throwing "PersistenceException: Connection is closed" on first attempt to close.

to close the EntityManagerFactory associated with these ODBs by calling the EMF’s close() method.  ... Thanks, Clinton Moore CAPdev CAP Dev The exception indicates that the EntityManagerFactory