Entries from October 2008
October 21, 2008
Following are the example from the chapter “Mapping Persistent Objects” from the book “Enterprise JavaBeans 3.0″ by Bill Bruke & Richard Monson-Haefel. This example I have tried it out on JBoss AS 5.0.0.CR1. I have used Postgresql as the database. And I have used eclipse WTP as IDE.
Example 5: Embeddable Classes
This example shows the use […]
Posted in JBoss, Java / Java EE 1 Comment »
October 21, 2008
Following are the example from the chapter “Mapping Persistent Objects” from the book “Enterprise JavaBeans 3.0″ by Bill Bruke & Richard Monson-Haefel. This example I have tried it out on JBoss AS 5.0.0.CR1. I have used Postgresql as the database. And I have used eclipse WTP as IDE.
Example 4: Multitable Mappings
This example shows the use […]
Posted in JBoss, Java / Java EE No Comments »
October 21, 2008
Example 3: @EmbeddedId
This example shows the use of @javax.persistence.EmbeddedId to map a primary key class to the database and also the use of @javax.persistence.Transient annotation.
Client.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.titan.clients;
import com.titan.travelagent.TravelAgentRemote;
import com.titan.domain.*;
import javax.naming.InitialContext;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
public class Client {
public static void main(String[] args) {
try {
Context jndiContext = getInitialContext();
Object ref = jndiContext
.lookup("TitanCruises/TravelAgentBean/remote");
TravelAgentRemote dao = (TravelAgentRemote) ref;
CustomerPK pk = new CustomerPK("Burke", […]
Posted in JBoss, Java / Java EE No Comments »
October 21, 2008
Following are the example from the chapter “Mapping Persistent Objects” from the book “Enterprise JavaBeans 3.0″ by Bill Bruke & Richard Monson-Haefel. This example I have tried it out on JBoss AS 5.0.0.CR1. I have used Postgresql as the database. And I have used eclipse WTP as IDE.
Example 2: @IdClass
This example shows the use of […]
Posted in JBoss, Java / Java EE No Comments »
October 21, 2008
Following are the example from the chapter “Mapping Persistent Objects” from the book “Enterprise JavaBeans 3.0″ by Bill Bruke & Richard Monson-Haefel. This example I have tried it out on JBoss AS 5.0.0.CR1. I have used Postgresql as the database. And I have used eclipse WTP as IDE.
Example 1: Basic Property Mappings
This example shows the […]
Posted in JBoss, Java / Java EE 2 Comments »