[JBoss Seam] - Re: help with EntityList
by terryb
cut down version of entities involved. I guess I am not sure how to build ejb
for my case and how to use it in restrictions and eventually how to access it in jsf
| @Entity
| @Table(name = "Client")
| public class Client implements java.io.Serializable {
|
| private String id;
| private String username;
| private Set<Contact> contacts = new HashSet<Contact>(0);
| private Set<Applicant> applicants = new HashSet<Applicant>(0);
|
| public Client() {
| }
|
| .....
|
| @Id
| @Column(name = "ID", unique = true, nullable = false, length = 20)
| @NotNull
| @Length(max = 20)
| public String getId() {
| return this.id;
| }
|
| public void setId(String id) {
| this.id = id;
| }
|
| @Column(name = "Username", length = 20)
| @Length(max = 20)
| public String getUsername() {
| return this.username;
| }
|
| public void setUsername(String username) {
| this.username = username;
| }
|
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "client")
| public Set<Contact> getContacts() {
| return this.contacts;
| }
|
| public void setContacts(Set<Contact> contacts) {
| this.contacts = contacts;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "client")
| public Set<Applicant> getApplicants() {
| return this.applicants;
| }
|
| public void setApplicants(Set<Applicant> applicants) {
| this.applicants = applicants;
| }
|
| }
|
| @Entity
| @Table(name = "Contact")
| public class Contact implements java.io.Serializable {
|
| private String id;
| private Client client;
| private String surname;
| private Set<Address> addresses = new HashSet<Address>(0);
|
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "ClientID")
| public Client getClient() {
| return this.client;
| }
|
| public void setClient(Client client) {
| this.client = client;
| }
|
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact")
| public Set<Address> getAddresses() {
| return this.addresses;
| }
|
| public void setAddresses(Set<Address> addresses) {
| this.addresses = addresses;
| }
| }
|
| @Entity
| @Table(name = "Address")
| public class Address implements java.io.Serializable {
|
| private String id;
| private Contact contact;
|
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "ContactID")
| public Contact getContact() {
| return this.contact;
| }
|
| public void setContact(Contact contact) {
| this.contact = contact;
| }
|
|
| }
|
|
| JSF
| ...
| <h:dataTable id="clientList" var="client" value="#{clientList.resultList}" rendered="#{not empty clientList.resultList}" border="1">
|
| <h:column>
| #{client....????}
| </h:column>
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100502#4100502
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100502
17Â years, 2Â months
[JBoss Seam] - Minimal JBoss Installation for Seam Application
by yj4jboss
Hi all,
I have been using JBoss for the past 1 1/2 years both for dev and production. The most frequent complaint that i get is that the server is very slow.
To speed up hot deployment during development, I modified by ant build file to deploy only files that are relevant for the feature i am developing.
In production, we have disabled debug level logs and allocated more perm Gen memory to the process.
Still, there is not much gain in performance. We would like to
(1) Minimize the deploy, run and test cycle during development
(2) Increase speed of execution in production
Any suggestions about how to achieve this ?
Is there any a minimal installation guide of a jboss server to run a seam application which includes, ejb3.0 and hibernate.
Regards,
Jankee Yogesh
M-ITC LTD
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100498#4100498
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100498
17Â years, 2Â months