The MyEntity is:
/*
* Banco.java
*
*/
package myentitypack;
import java.util.HashSet;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name = "mylittleenity")
public class MyEntity implements java.io.Serializable {
@Id
@Column(name = "bc_id", nullable = false)
private Integer bcId;
@Column(name = "bc_nome", nullable = false)
private String bcNome;
@Column(name = "bc_cnpj", nullable = false)
private String bcCnpj;
@Column(name = "bc_obs", nullable = false)
private String bcObs;
/** Creates a new instance of Banco */
public MyEntity () {
}
public MyEntity (Integer bcId, String bcNome, String bcCnpj, String
bcObs) {
this.bcId = bcId;
this.bcNome = bcNome;
this.bcCnpj = bcCnpj;
this.bcObs = bcObs;
}
public Integer getBcId() {
return this.bcId;
}
public void setBcId(Integer bcId) {
this.bcId = bcId;
}
public String getBcNome() {
return this.bcNome;
}
public void setBcNome(String bcNome) {
this.bcNome = bcNome;
}
public String getBcCnpj() {
return this.bcCnpj;
}
public void setBcCnpj(String bcCnpj) {
this.bcCnpj = bcCnpj;
}
public String getBcObs() {
return this.bcObs;
}
public void setBcObs(String bcObs) {
this.bcObs = bcObs;
}
public int hashCode() {
int hash = 0;
hash += (this.bcId != null ? this.bcId.hashCode() : 0);
return hash;
}
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id
fields are not set
if (!(object instanceof Banco)) {
return false;
}
Banco other = (Banco)object;
if (this.bcId != other.bcId && (this.bcId == null ||
!this.bcId.equals(other.bcId))) return false;
return true;
}
public String toString() {
return "myentitypack.MyEntity[bcId=" + bcId + "]";
}
}
Ken Cavanaugh escreveu:
> Dyego Souza Dantas Leal wrote:
>> Any help ? i'm going crazy !!!
>>
>>
>>
>> Dyego Souza Dantas Leal escreveu:
>>> Hello GlassFish guys !!!
>>>
>>> GlassFishVersion : v2 b08
>>>
>>>
>>> I have a problem... i write a JEE 5 Application with SessionBeans
>>> and client Swing...
>>>
>>> i run this query in my sessionbean
>>>
>>>
>>> em.createQuery("select m from MyEntity m").getResultList();
>>>
>>> This query return's 292 entitys in 95 ms (good time...)
>>>
>>> BUT , in the client...(swing) this query returns in 795ms ....
>>>
>>> 700ms for serialization ? is a bad time...
>>>
>>> exists way to optimize it ?
>>>
>>>
> Please send the details of the exact data types returned from this call.
> I need to know what Java type MyEntity is, and how it is returned in the
> result. The details are critical: for example, returning data types as
> java.lang.Object instead of their actual type (when the actual type is
> known)
> is very expensive over RMI-IIOP.
>
> Certainly we would expect some remote overhead, but this seems excessive.
>
> Ken.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>
--
-------------------------------------------------------------------------
++ Dyego Souza Dantas Leal ++ Dep. Desenvolvimento -------------------------------------------------------------------------
E S C R I B A I N F O R M A T I C A
*** http://javacoffe.blogspot.com ***
-------------------------------------------------------------------------
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
-- ICQ : 1647350
$ look into "my eyes" Phone : +55 041 2106-1212
look: cannot open my eyes Fax : +55 041 3296-6640 -------------------------------------------------------------------------
Reply: dyego_at_escriba.com.br