Last Modified : 2010.03.01

CMR

C:/ejb ¿öÅ©½ºÆäÀ̽º¿¡ »õ·Î¿î ÇÁ·ÎÁ§Æ® mall ¸¦ »ý¼ºÇϰí, Add External JARs.. ¹öưÀ» ÀÌ¿ëÇÏ¿© weblogic.jar ¸¦ Build Path ¿¡ Ãß°¡ÇÕ´Ï´Ù.
¾Æ·¡ SQL¹®À» ÀÌ¿ëÇØ¼­ ¿¹Á¦¿¡ »ç¿ëµÉ Å×À̺íÀ» »ý¼ºÇÕ´Ï´Ù.

create table customer (
  id varchar2(8) primary key,
  password varchar2(8) not null,
  name varchar2(20) not null);

create table moreinfo (
  id varchar2(8) primary key,
  point number(4) not null,
  constraint moreinfo_id_fk foreign key(id) references customer(id));

create table selectitem (
  id varchar2(8),
  itemid varchar2(8),
  itemname varchar2(10),
  constraint selectitem_id_fk foreign key(id) references customer(id));

create table interestitem (
  itemid varchar2(8) primary key,
  itemname varchar2(10));

create table customer_interestitem (
  id varchar2(8),
  itemid varchar2(8),
  constraint ci_id_fk foreign key(id) references customer(id),
  constraint ci_itemid_fk foreign key(itemid) references interestitem(itemid));

»ý¼ºÇÑ Å×À̺í°ú ¿¬°üÀ» ¸Î°í ÀÖ´Â ¿£Æ¼Æ¼ ºóÀ» ÀÛ¼ºÇÕ´Ï´Ù.
°í°´°ú °ü½É¹°Ç°ÀÌ ´Ù´ë´Ù °ü°èÀ̱⠶§¹®¿¡ Ãß°¡µÈ customer_interestitem Å×ÀÌºí¿¡ ´ëÇÑ ¿£Æ¼Æ¼ ºóÀº ÀÛ¼ºÇÏÁö ¾Ê½À´Ï´Ù.
´Ù¸¸ ¹èÄ¡ µð½ºÅ©¸³ÅÍ ÆÄÀÏ¿¡¼­ °í°´ ¿£Æ¼Æ¼ ºó°ú °ü½É¹°Ç° ¿£Æ¼Æ¼ ºóÀÌ ´Ù´ë´Ù °ü°è¸¦ ¸Î±â ¶§¹®¿¡ ÇÊ¿äÇÑ Å×À̺íÀ̶ó´Â °ÍÀ» ÁöÁ¤ÇØ¾ß ÇÕ´Ï´Ù.

°í°´ ¿£Æ¼Æ¼ ºó ÀÛ¼º

1. ¿ø°Ý ÀÎÅÍÆäÀ̽º ÀÛ¼º

Customer.java

package kr.co.hanbitbook.ejb.examples.mall;

import java.util.*;

import javax.ejb.EJBLocalObject;

public interface Customer extends EJBLocalObject {
	
	public String getId();
	
	public void setPassword(String password);
	public String getPassword();
	
	public void setName(String name);
	public String getName();
	
	public void setSelectitem(Collection selectitem);
	public Collection getSelectitem();
	
	public void setMoreinfo(Moreinfo moreinfo);
	public Moreinfo getMoreinfo();
	
	public void setInterestitem(Collection interestitem);
	public Collection getInterestitem();
	
}
2. Ȩ ÀÎÅÍÆäÀ̽º ÀÛ¼º

CustomerHome.java

package kr.co.hanbitbook.ejb.examples.mall;

import javax.ejb.*;

public interface CustomerHome extends EJBLocalHome {
	
	public Customer create(String id) throws CreateException;
	
	public Customer create(String id, String password, String name) throws CreateException;
	
	public Customer findByPrimaryKey(String id) throws FinderException;

}
3. ºó Ŭ·¡½º ÀÛ¼º

CustomerEJB.java

package kr.co.hanbitbook.ejb.examples.mall;

import java.util.Collection;

import javax.ejb.*;

abstract public class CustomerEJB implements EntityBean {
 
	private static final long serialVersionUID = -7869685241435209583L;
	
	EntityContext entityContext;
	
	public String ejbCreate(String id) throws CreateException {
		setId(id);
		return null;
	}
	
	public String ejbCreate(String id, String password, String name) throws CreateException  {
		setId(id);
		setPassword(password);
		setName(name);
		return null;
	}
  
	public void ejbPostCreate(String id) throws CreateException {}
	
	public void ejbPostCreate(String id, String password, String name) throws CreateException  {}
	
	public void ejbRemove() throws RemoveException {}
	
	public abstract void setId(String id);
	public abstract String getId();

	public abstract void setPassword(String password);
	public abstract String getPassword();
	
	public abstract void setName(String name);
	public abstract String getName();
	
	public abstract void setSelectitem(Collection selectitem);
	public abstract Collection getSelectitem();

	public abstract void setMoreinfo(Moreinfo moreinfo);
	public abstract Moreinfo getMoreinfo();
	
	public abstract void setInterestitem(Collection interestitem);
	public abstract Collection getInterestitem();
	
	public void ejbLoad() {}
	public void ejbStore() {}
	public void ejbActivate() {}
	public void ejbPassivate() {}
	public void unsetEntityContext() {
		this.entityContext = null;
	}
	public void setEntityContext(EntityContext entityContext) {
		this.entityContext = entityContext;
	}
	
}

°í°´ Ãß°¡ Á¤º¸ ¿£Æ¼Æ¼ ºó ÀÛ¼º

1. ¿ø°Ý ÀÎÅÍÆäÀ̽º

Moreinfo.java

package kr.co.hanbitbook.ejb.examples.mall;

import javax.ejb.*;

public interface Moreinfo extends EJBLocalObject {

	public String getId();
	
	public void setPoint(int point);
	public int getPoint();
	
	public void setCustomer(Customer customer);
	public Customer getCustomer();

}
2. Ȩ ÀÎÅÍÆäÀ̽º

MoreinfoHome.java

package kr.co.hanbitbook.ejb.examples.mall;

import javax.ejb.*;

public interface MoreinfoHome extends EJBLocalHome {

	public Moreinfo create(String id) throws CreateException;
	
	public Moreinfo create(String id, int point) throws CreateException;
	
	public Moreinfo findByPrimaryKey(String id) throws FinderException;

}
3. ºó Ŭ·¡½º

MoreinfoEJB.java

package kr.co.hanbitbook.ejb.examples.mall;

import java.rmi.RemoteException;

import javax.ejb.*;

abstract public class MoreinfoEJB implements EntityBean {

	private static final long serialVersionUID = 7033483739969214177L;
	
	EntityContext ctx;
	
	public String ejbCreate(String id) throws CreateException {
		setId(id);
		return null;
	}
	
	public String ejbCreate(String id, int point) throws CreateException {
		setId(id);
		setPoint(point);
		return null;
	}
	
	public void ejbPostCreate(String id) throws CreateException {}
	public void ejbPostCreate(String id, int point) throws CreateException {}

	public void ejbActivate() throws EJBException, RemoteException {}
	public void ejbLoad() throws EJBException, RemoteException {}
	public void ejbPassivate() throws EJBException, RemoteException {}
	public void ejbRemove() throws RemoveException, EJBException, RemoteException {}
	public void ejbStore() throws EJBException, RemoteException {}
	public void setEntityContext(EntityContext ctx) throws EJBException, RemoteException {
		this.ctx = ctx;
	}
	public void unsetEntityContext() throws EJBException, RemoteException {
		ctx = null;
	}

	public abstract void setId(String id);
	public abstract void setPoint(int point);
	public abstract void setCustomer(Customer customer);
	public abstract String getId();
	public abstract int getPoint();
	public abstract Customer getCustomer();
	
}

¼±Åà ¹°Ç° ¿£Æ¼Æ¼ ºó ÀÛ¼º

1. ¿ø°Ý ÀÎÅÍÆäÀ̽º

Selectitem.java

package kr.co.hanbitbook.ejb.examples.mall;

import javax.ejb.EJBLocalObject;

public interface Selectitem extends EJBLocalObject {

	public String getId();

	public void setItemid(String itemid);
	public String getItemid();

	public void setItemname(String itemname);
	public String getItemname();

	public void setCustomer(Customer customer);
	public Customer getCustomer();

}
2. Ȩ ÀÎÅÍÆäÀ̽º

SelectitemHome.java

package kr.co.hanbitbook.ejb.examples.mall;

import javax.ejb.*;

public interface SelectitemHome extends EJBLocalHome {

	public Selectitem create(String id) throws CreateException;
	public Selectitem create(String id, String itemid, String itemname) throws CreateException;
	public Selectitem findByPrimaryKey(String id) throws FinderException;

}
3. ºó Ŭ·¡½º

SelectitemEJB.java

package kr.co.hanbitbook.ejb.examples.mall;

import java.rmi.RemoteException;

import javax.ejb.*;

abstract public class SelectitemEJB implements EntityBean {

	private static final long serialVersionUID = 9171897727213760357L;
	EntityContext ctx;
	
	public String ejbCreate(String id) throws CreateException {
		setId(id);
		return null;
	}
	
	public String ejbCreate(String id, String itemid, String itemname) throws CreateException  {
		setId(id);
		setItemid(itemid);
		setItemname(itemname);
		return null;
	}
	
	public void ejbPostCreate(String id) throws CreateException {}
	public void ejbPostCreate(String id, String itemid, String itemname) throws CreateException  {}
	
	public abstract void setId(java.lang.String id);
	public abstract java.lang.String getId();

	public abstract void setItemid(java.lang.String itemid);
	public abstract String getItemid();
	public abstract void setItemname(java.lang.String itemname);
	public abstract String getItemname();
	public abstract void setCustomer(Customer customer);
	public abstract Customer getCustomer();

	public void ejbActivate() throws EJBException, RemoteException {}
	public void ejbLoad() throws EJBException, RemoteException {}
	public void ejbPassivate() throws EJBException, RemoteException {}
	public void ejbRemove() throws RemoveException, EJBException, RemoteException {}
	public void ejbStore() throws EJBException, RemoteException {}
	public void setEntityContext(EntityContext ctx) throws EJBException, RemoteException {
		this.ctx = ctx;
	}
	public void unsetEntityContext() throws EJBException, RemoteException {
		ctx = null;
	}

}

°ü½É ¹°Ç° ¿£Æ¼Æ¼ ºó ÀÛ¼º

1. ¿ø°Ý ÀÎÅÍÆäÀ̽º

Interestitem.java

package kr.co.hanbitbook.ejb.examples.mall;

import javax.ejb.*;
import java.util.*;

public interface Interestitem extends EJBLocalObject {

	public String getItemid();
	
	public void setItemname(String itemname);
	public String getItemname();
	
	public void setCustomer(Collection customer);
	public Collection getCustomer();

}
2. Ȩ ÀÎÅÍÆäÀ̽º

InterestitemHome.java

package kr.co.hanbitbook.ejb.examples.mall;

import javax.ejb.*;

public interface InterestitemHome extends EJBLocalHome {

	public Interestitem create(String itemid) throws CreateException;
	public Interestitem create(String itemid, String itemname) throws CreateException;
	public Interestitem findByPrimaryKey(String itemid) throws FinderException;

}
3. ºó Ŭ·¡½º

InterestitemEJB.java

package kr.co.hanbitbook.ejb.examples.mall;

import java.rmi.RemoteException;
import java.util.Collection;

import javax.ejb.*;

abstract public class InterestitemEJB implements EntityBean {
	
	private static final long serialVersionUID = 6861636975595764813L;
	EntityContext ctx;
	
	public String ejbCreate(String itemid) throws CreateException {
		setItemid(itemid);
		return null;
	}
	
	public String ejbCreate(String itemid, String itemname) throws CreateException  {
		setItemid(itemid);
		setItemname(itemname);
		return null;
	}
	
	public void ejbPostCreate(String itemid) throws CreateException {}
	public void ejbPostCreate(String itemid, String itemname) throws CreateException  {}
	
	public abstract void setItemid(String itemid);
	public abstract void setItemname(String itemname);
	public abstract void setCustomer(Collection customer);
	public abstract String getItemid();
	public abstract String getItemname();
	public abstract Collection getCustomer();

	public void ejbActivate() throws EJBException, RemoteException {}
	public void ejbLoad() throws EJBException, RemoteException {}
	public void ejbPassivate() throws EJBException, RemoteException {}
	public void ejbRemove() throws RemoveException, EJBException, RemoteException {}
	public void ejbStore() throws EJBException, RemoteException {}
	public void setEntityContext(EntityContext ctx) throws EJBException, RemoteException {
		this.ctx = ctx;
	}
	public void unsetEntityContext() throws EJBException, RemoteException {
		ctx = null;
	}
	
}

¹èÄ¡ µð½ºÅ©¸³ÅÍ ÀÛ¼º(À¥·ÎÁ÷ ºô´õ ÀÌ¿ë) ¹× ¹èÄ¡

À¥·ÎÁ÷ ºô´õ¸¦ ½ÇÇàÇϰí ÄÄÆÄÀÏµÈ °æ·ÎÀÎ C:\ejb\mall\bin ¸¦ ¼±ÅÃÇÕ´Ï´Ù.
ÁÂÃø¸Þ´º¿¡¼­ Customer Ç׸ñÀ» ¼±ÅÃÇϰí General ÅÇ¿¡¼­ Local JNDI Name: Ç׸ñÀ» È®ÀÎÇÕ´Ï´Ù.
CMRÀ» Àû¿ëÇÑ ¿£Æ¼Æ¼ ºóÀº ·ÎÄà ÀÎÅÍÆäÀ̽º¸¦ »ó¼Ó¹Þ½À´Ï´Ù.
À¥·ÎÁ÷ ºô´õ Customer ¿£Æ¼Æ¼ ºó General ÅÇ È­¸é
Classes ÅÇÀ» ¼±ÅÃÇÏ¿© ·ÎÄà Ȩ ÀÎÅÍÆäÀ̽º, ·ÎÄà ¿ø°Ü ÀÎÅÍÆäÀ̽º, ºó Ŭ·¡½º°¡ Á¦´ë·Î ÀԷµǾú´ÂÁö È®ÀÎÇÕ´Ï´Ù.
À¥·ÎÁ÷ ºô´õ Customer ¿£Æ¼Æ¼ ºó Classes ÅÇ È­¸é
Persistence ÅÇÀ» ¼±ÅÃÇϰí DataSource name: Ç׸ñÀÇ °ªÀº ora9, Table name: Ç׸ñÀÇ °ªÀº CUSTOMER °¡ µÇµµ·Ï Browse.. ¹öưÀ» ÀÌ¿ëÇØ¼­ ¼³Á¤ÇÕ´Ï´Ù. (À̶§ À¥·ÎÁ÷ ¼­¹ö°¡ ½ÇÇàÁßÀ̾î¾ß ÇÕ´Ï´Ù.)
À¥·ÎÁ÷ ºô´õ Customer ¿£Æ¼Æ¼ ºó Persistence ÅÇ È­¸é
Interestitem ºó¿¡ ´ëÇØ¼­ ¾Æ·¡ ±×¸²Ã³·³ ¼³Á¤ÇÕ´Ï´Ù.
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
Moreinfo ºó¿¡ ´ëÇØ¼­ ¾Æ·¡ ±×¸²Ã³·³ ¼³Á¤ÇÕ´Ï´Ù.
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
Selecteditem ºó¿¡ ´ëÇØ¼­ ¾Æ·¡ ±×¸²Ã³·³ ¼³Á¤ÇÕ´Ï´Ù.
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
°¢°¢ÀÇ ¿£Æ¼Æ¼ ºó¿¡ ´ëÇÑ General ÅÇ, Classes ÅÇ, Persistence ÅÇ¿¡ ´ëÇÑ ¼³Á¤À» ¸¶¹«¸®Çß´Ù¸é °¢ ºóÀÇ Çʵ忡 ´ëÇÑ ¼³Á¤À» ÇÕ´Ï´Ù.
°¢ ºóÀÇ CMP Fields ¸¦ ¼±ÅÃÇÏ°í ¿À¸¥ÂÊÀÇ Field name ¼±ÅÃÇϸé Edit ¹öưÀÌ È°¼ºÈ­ µË´Ï´Ù. Edit ¹öưÀ» Ŭ¸¯ÇÏ¿© Çʵå ŸÀÔÀ» ¸ðµÎ LongString Çü½ÄÀ¸·Î ÁöÁ¤ÇÕ´Ï´Ù.
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
À¥·ÎÁ÷ ºô´õÀÇ ¿ÞÂÊ ¸Þ´º¿¡¼­ Relations ¸¦ ¼±ÅÃÇÕ´Ï´Ù.
°í°´°ú °ü½É¹°Ç°(´Ù´ë´Ù °ü°è) ¸¦ ¼±ÅÃÇϰí Edit ¹öưÀ» Ŭ¸¯ÇÕ´Ï´Ù.
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
Role name:, CMR field for CustomerEJB:, CMR field type: Ç׸ñÀÇ °ªÀº µðÆúÆ® °ªÀ¸·Î µÓ´Ï´Ù.
Table name: Ç׸ñ¿¡ ´Ù´ë´Ù °ü°èÀ̹ǷΠÃß°¡ÇÑ Å×À̺íÀ» ÀÔ·ÂÇÕ´Ï´Ù. ¿©±â¼­´Â CUSTOMER_INTERESTITEM À̾î¾ß ÇÕ´Ï´Ù.
PKField for InterestitemEJB Ç׸ñ°ú Columns in table CUSTOMER_INTERESTITEM Ç׸ñÀÇ °ªÀº »ý¼ºÇÑ Å×À̺íÀÇ Çʵå¸í°ú °°ÀÌ ¸ðµÎ itemid ·Î ¼³Á¤ÇÕ´Ï´Ù.
PKField for CustomerEJB Ç׸ñ°ú Columns in table CUSTOMER_INTERESTITEM Ç׸ñÀÇ °ªÀº »ý¼ºÇÑ Å×À̺íÀÇ Çʵå¸í°ú °°ÀÌ ¸ðµÎ id ·Î ¼³Á¤ÇÕ´Ï´Ù.
(Relations ¸Þ´º ¼³Á¤¿¡¼­ ´Ù´ë´Ù °ü°è¿¡ ´ëÇØ¼­´Â À¥·ÎÁ÷ ºô´õ·Î ¼³Á¤ÀÌ µÇÁö ¾Ê½À´Ï´Ù.
µû¶ó¼­ ÀÌ ºÎºÐ¿¡ ´ëÇØ¼­´Â À¥·ÎÁ÷ ºô´õÀÇ ¼³Á¤ÀÌ ¸ðµÎ ¸¶¹«¸®µÈ ´ÙÀ½ À¥·ÎÁ÷ ºô´õ°¡ »ý¼ºÇÑ XMLÆÄÀÏÀ» ¿­¾î¼­ ¼öÁ¤Çؾ߸¸ ÇÕ´Ï´Ù.)
General ÅÇ ¼³Á¤
µðÆúÆ® °ªÀ» ±×´ë·Î µÎ°í Finish ¹öưÀ» Ŭ¸¯ÇÕ´Ï´Ù.
General ÅÇ ¼³Á¤
CustomerEJB ¿Í MoreinfoEJB ¿£Æ¼Æ¼ ºó°£ÀÇ °ü°è¸¦ ¼³Á¤ÇÕ´Ï´Ù.
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
CustomerEJB ¿Í SelectitemEJB ¿£Æ¼Æ¼ ºó°£ÀÇ °ü°è¸¦ ¼³Á¤ÇÕ´Ï´Ù.
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
General ÅÇ ¼³Á¤
¿©±â±îÁö ¸ðµÎ ¼³Á¤ÀÌ µÇ¾ú´Ù¸é Save ¹öưÀ» Ŭ¸¯ÇÏ¿© ¹èÄ¡ µð½ºÅ©¸³ÅÍ ÆÄÀÏÀ» »ý¼ºÇÕ´Ï´Ù.
weblogic-cmp-rdbms-jar.xml ÆÄÀÏÀ» ¿­°í table-name ¿¤¸®¸ÕÆ®ÀÇ °ªÀ» CUSTOMER_INTERESTITEM ·Î, foreign-key-column °ú key-column ¿¤¸®¸ÕÆ®ÀÇ °ªÀ» ¾Æ·¡Ã³·³ ¼öÁ¤ÇÕ´Ï´Ù.

<weblogic-rdbms-relation>
	<relation-name>CustomerEJB_interestitem-InterestitemEJB_customer</relation-name>
	<table-name>CUSTOMER_INTERESTITEM</table-name>

	<weblogic-relationship-role>
		<relationship-role-name>CustomerEJB_interestitem-Have-InterestitemEJB_customer</relationship-role-name>
			<relationship-role-map>
				<column-map>
					<foreign-key-column>id</foreign-key-column>
					<key-column>id</key-column>
				</column-map>
			</relationship-role-map>
	</weblogic-relationship-role>

  <weblogic-relationship-role>
		<relationship-role-name>InterestitemEJB_customer-Have-CustomerEJB_interestitem</relationship-role-name>
			<relationship-role-map>
				<column-map>
					<foreign-key-column>itemid</foreign-key-column>
					<key-column>itemid</key-column>
				</column-map>
		</relationship-role-map>
	</weblogic-relationship-role>

</weblogic-rdbms-relation>

¿©±â±îÁö ¸¶ÃÆÀ¸¸é À¥·ÎÁ÷ ºô´õ¸¦ ÀÌ¿ëÇØ¼­ mall.jar ÆÄÀÏÀ» C:\ejb\mall µð·ºÅ丮¿¡ »ý¼ºÇÕ´Ï´Ù.

Å×½ºÆ®

C:/ejb ¿öÅ©½ºÆäÀ̽º¿¡ »õ·Î¿î ÇÁ·ÎÁ§Æ® mall_client ¸¦ »ý¼ºÇϰí, Add External JARs.. ¹öưÀ» ÀÌ¿ëÇÏ¿© weblogic.jar ¸¦ Build Path ¿¡ Ãß°¡ÇÕ´Ï´Ù.
Å×½ºÆ®¿ë JSP ÆÄÀÏÀ» ÀÛ¼ºÀ» À§ÇØ C:\ejb\mall\mall.jar ÆÄÀÏ ¿ª½Ã Build Path ¿¡ Ãß°¡ÇÕ´Ï´Ù.
Å×½ºÆ®¿ë JSP ÆÄÀÏÀº ÀÌÁ¦±îÁö ¸¸µé¾ú´ø "CMR À» Àû¿ëÇÑ ¿£Æ¼Æ¼ ºó"À» ÀÌ¿ëÇÕ´Ï´Ù.
mall_client ÇÁ·ÎÁ§Æ®°¡ À¥ ¾ÖÇø®ÄÉÀ̼ÇÀÇ µð·ºÅ丮 ±¸Á¶¸¦ µû¸£µµ·Ï ÀÌŬ¸³½º ¼³Á¤À» ÇÕ´Ï´Ù.
C:\ejb\mall_client ¿¡ ÇÏÀ§ µð·ºÅ丮 WEB-INF ¸¦ ¸¸µì´Ï´Ù. WEB-INF ÆÄÀÏ¿¡ web.xml ÆÄÀÏÀ» À§Ä¡½Ãŵ´Ï´Ù. Áö±ÝºÎÅÍ ÀÛ¼ºÇÒ À¥ ¾ÖÇø®ÄÉÀ̼ǿ¡´Â ¼­ºí¸´°ú Àڹ٠Ŭ·¡½º ÆÄÀÏÀÌ ¾øÀ¸¹Ç·Î À̰ÍÀ¸·Î ¼³Á¤À» ¸¶¹«¸®ÇÕ´Ï´Ù.
JSPÆÄÀÏÀ» ´Ù¿î·ÎµåÇÏ¿© ¾ÐÃàÀ» Ç®°í mall_client µð·ºÅ丮¿¡ JSP ÆÄÀÏÀ», WEB-INF µð·ºÅ丮¿¡ web.xml ÆÄÀÏÀ» À§Ä¡½Ãŵ´Ï´Ù.
¸í·É ÇÁ·ÒÇÁÆ®¿¡¼­ C:\ejb\mall_client ·Î À̵¿ÇÑ ÈÄ mall.war ÆÄÀÏÀ» »ý¼ºÇÕ´Ï´Ù.
jar cvf mall.war *.jsp WEB-INF
mall.war ÆÄÀÏÀ» C:\ejb\mall ¿¡ º¹»çÇÕ´Ï´Ù.
C:\ejb\mall ¿¡´Â À¥·ÎÁ÷ ºô´õ°¡ ¸¸µç mall.jar ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù.
¸í·É ÇÁ·ÒÇÁÆ®¿¡¼­ C:\ejb\mall ·Î À̵¿ÇÑ ´ÙÀ½ mall.war ¿Í mall.jar ÆÄÀÏÀ» mall.ear ÆÄÀÏ·Î ¹­½À´Ï´Ù.
jar cvf mall.ear mall.jar mall.war
À¥·ÎÁ÷ ºô´õ¸¦ ½ÃÀÛÇϰí C:\ejb\mall\mall.ear ¸¦ ¼±ÅÃÇÕ´Ï´Ù.
¿ÞÂÊ ¸Þ´º¿¡¼­ mall.war À» ¼±ÅÃÇÑ ´ÙÀ½ Context Path ÅÇ¿¡¼­ mall À̶ó°í ÀÔ·ÂÇÕ´Ï´Ù.
Save ¹öưÀ» Ŭ¸¯ÇÑ ÈÄ À¥·ÎÁ÷ ºô´õÀ» Á¾·áÇÕ´Ï´Ù.
mall.war À» ¼±ÅÃÇÑ ´ÙÀ½ Context Path ÅÇ¿¡¼­ mall À̶ó°í ÀÔ·ÂÇÕ´Ï´Ù.
Save ¹öưÀ» Ŭ¸¯ÇÑ ÈÄ À¥·ÎÁ÷ ºô´õÀ» Á¾·áÇÕ´Ï´Ù.
À¥·ÎÁ÷ ÄÜ¼Ö mydomain - Deployments - Applications ¸Þ´ºÀ» ÀÌ¿ëÇØ¼­ mall.ear ¸¦ ¹èÄ¡ÇÕ´Ï´Ù.
http://localhost:7001/mall/mallinsert.jsp, http://localhost:7001/mall/mallselect.jsp ¸¦ Â÷·Ê·Î ¹æ¹®ÇÏ¿© Å×½ºÆ®ÇÕ´Ï´Ù.

Âü°í ¹®¼­

¾Ë±â½±°Ô Ç®¾î ¾´ À¥·ÎÁ÷°ú EJB 10Àå -ÇѺû¹Ìµð¾î,±è¼º¹Ú Àú-
¿¹Á¦¿¡ ¾²¿´´ø jar,war,ear ÆÄÀÏ (¹èÄ¡½Ã ÀÍ¼Ê¼Ç ¹ß»ýÇÒ ¶§ Âü°í¿ë)