-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: JPA Annotations, Fetch, Cascade
PostPosted: Thu May 01, 2014 10:42 am 
Newbie

Joined: Thu May 01, 2014 10:28 am
Posts: 1
Hello,

I have a postgreSQL Database on my server at home and I access it via java. From my own network, everything works fine and quick, but from a remote machine, it takes about 150 ms per Entity.

We have nested Objects in those entities like this:

Series.java:

Code:
@Entity
public class Series implements Serializable {

@Id
private int id;

@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
private Set<Player> players;

....

}


The datasource is configured in a JBoss 7.1.1. We use JTA-Transaction type.

Why does the query take so long? Is there something we could configure or annotate better?

This is our persistence.xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="PlayerService" transaction-type="JTA">
    <jta-data-source>java:jboss/PlayerService</jta-data-source>
      <properties>
          <property name="hibernate.show_sql" value="false"/>
        <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
        <property name="hibernate.query.jpaql_strict_compliance" value="false" />
       
        <!--  EntityManager-Zugriff per JNDI aktivieren -->
        <property name="jboss.entity.manager.jndi.name" value="java:jboss/PlayerService" />
      </properties>
  </persistence-unit>
</persistence>


Greetings,
Wanroto


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.