geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Selvaraj, Saraswathi \(Cognizant\)" <Saraswathi.Selva...@cognizant.com>
Subject RE: Java Adventure Builder Reference 1.0.3 webapp deployed
Date Thu, 08 Dec 2005 12:48:45 GMT

Hi,
      I have successfully deployed Java Adventure Builder Reference 1.0.1 application on Geronimo
and purchase order & order tracking is working.
	But I have made few changes to the EJB classes due to automatic-key generation for unknown
primary key field issue that I have faced.

	Instead of automatically generating the key I have generated the key in the Bean class itself
using the random key generator and the issue has been fixed time being.
	The EJB's that I have modified are
		(1) ActivityDetailsBean
		(2) AddressBean
		(3) ContactInfoBean
		(4) LodgingBean
		(5) CreditCardBean
		(6) TransportationBean
		(7) ActivityBean

Herewith I have attached the latest plans without using automatic primary key generation.


EAR Plans:

(1) ActivitySupplier Plan

<?xml version="1.0" encoding="UTF-8"?>

<openejb-jar  configId=""
  xmlns="http://www.openejb.org/xml/ns/openejb-jar"
  xmlns:naming="http://geronimo.apache.org/xml/ns/naming" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment">
 
	<cmp-connection-factory>
		<resource-link>MysqlDataSource</resource-link>
	</cmp-connection-factory>

  <enterprise-beans>
    <entity>
      <ejb-name>ActivityPurchaseOrderBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.activitysupplier.purchaseorder.ejb.ActivityPurchaseOrderLocalHome</jndi-name>
      <table-name>ActivityPurchaseOrder</table-name>
      <cmp-field-mapping>
        <cmp-field-name>poId</cmp-field-name>
        <table-column>poId</table-column>
      </cmp-field-mapping>
       <ejb-local-ref>
        <ref-name>ejb/local/activitysupplier/ActivityDetails</ref-name>	
        <name>ActivityDetailsBean</name>
      </ejb-local-ref> 

	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>

    <entity>
      <ejb-name>ActivityDetailsBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.activitysupplier.purchaseorder.ejb.ActivityDetailsLocalHome</jndi-name>
      <table-name>ActivityDetails</table-name>
      <cmp-field-mapping>
        <cmp-field-name>activityId</cmp-field-name>
        <table-column>activityId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>startDate</cmp-field-name>
        <table-column>startDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>endDate</cmp-field-name>
        <table-column>endDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>headCount</cmp-field-name>
        <table-column>headCount</table-column>
      </cmp-field-mapping>
	<cmp-field-mapping>
	  	<cmp-field-name>activityDetailsBean_upk</cmp-field-name>
	  	<table-column>ActivityDetailsBean_upk</table-column>	 
     </cmp-field-mapping>

	<resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>

    <session>
      <ejb-name>ActivityPOEndpointBean</ejb-name>
      <jndi-name>ActivityPOEndpointBean</jndi-name>
      <resource-ref>
        <ref-name>jms/activity/QueueConnectionFactory</ref-name>
        <resource-link>JmsXA</resource-link>  
      </resource-ref>
	<web-service-address>http://localhost:8080/webservice/ActivityPOService</web-service-address>
    </session>

    <message-driven>
      <ejb-name>ActivityMessageEJB</ejb-name>
	<resource-adapter>
        	<resource-link>ActiveMQ AdventureBuilder</resource-link>
        </resource-adapter>   	   
    </message-driven>
    
  </enterprise-beans>


 <relationships>
	<ejb-relation>
		<ejb-relation-name>ActivityRelations</ejb-relation-name>
		<ejb-relationship-role>
			<ejb-relationship-role-name>ActivityPurchaseOrderBean</ejb-relationship-role-name>
			<relationship-role-source>
		             <ejb-name>ActivityPurchaseOrderBean</ejb-name>
		      </relationship-role-source>
		      <cmr-field>
		          <cmr-field-name>activities</cmr-field-name>
		      </cmr-field>
			<role-mapping>
			    <cmr-field-mapping>
				<key-column>poId</key-column>
				<foreign-key-column>ActivityPurchaseOrderBean_activities</foreign-key-column>
 			    </cmr-field-mapping>
			</role-mapping>
		</ejb-relationship-role>
	</ejb-relation>
 </relationships>

</openejb-jar>


(2) AirlineSupplier Plan

<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar configId=""
  xmlns="http://www.openejb.org/xml/ns/openejb-jar"
  xmlns:naming="http://geronimo.apache.org/xml/ns/naming" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment">
 
<cmp-connection-factory>
	<resource-link>MysqlDataSource</resource-link>
</cmp-connection-factory>
  <enterprise-beans>
    <entity>
      <ejb-name>AirlineOrderBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.airlinesupplier.purchaseorder.ejb.AirlineOrderLocalHome</jndi-name>
      <table-name>AirlineOrder</table-name>
      <cmp-field-mapping>
        <cmp-field-name>orderId</cmp-field-name>
        <table-column>orderId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>depFlightId</cmp-field-name>
        <table-column>depFlightId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>depFlightDate</cmp-field-name>
        <table-column>depFlightDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>retFlightId</cmp-field-name>
        <table-column>retFlightId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>retFlightDate</cmp-field-name>
        <table-column>retFlightDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>headCount</cmp-field-name>
        <table-column>headCount</table-column>
      </cmp-field-mapping>

	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>
    <session>
      <ejb-name>AirlinePOEndpointBean</ejb-name>
      <jndi-name>AirlinePOEndpointBean</jndi-name>
      <resource-ref>
        <ref-name>jms/airline/QueueConnectionFactory</ref-name>
	  <resource-link>JmsXA</resource-link>
      </resource-ref>
	<web-service-address>http://localhost:8080/webservice/AirlinePOService</web-service-address>
    </session>
    <message-driven>
      <ejb-name>AirlineMessageEJB</ejb-name>

	<resource-adapter>
		<resource-link>ActiveMQ AdventureBuilder</resource-link>
	</resource-adapter>
    </message-driven>

  </enterprise-beans>

</openejb-jar>

(3) Bank Plan

<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar configId=""
  xmlns="http://www.openejb.org/xml/ns/openejb-jar"
  xmlns:naming="http://geronimo.apache.org/xml/ns/naming" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment">
  <enterprise-beans>
    <session>
      <ejb-name>CreditCardEndpointBean</ejb-name>
      <jndi-name>CreditCardEndpointBean</jndi-name>
	<web-service-address>http://localhost:8080/webservice/CreditCardService</web-service-address>
    </session>
  </enterprise-beans>

</openejb-jar>

(4) LodgingSupplier Plan

<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar configId=""
  xmlns="http://www.openejb.org/xml/ns/openejb-jar"
  xmlns:naming="http://geronimo.apache.org/xml/ns/naming" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment">
 
<cmp-connection-factory>
	<resource-link>MysqlDataSource</resource-link>
</cmp-connection-factory>
  <enterprise-beans>
    <entity>
      <ejb-name>LodgingOrderBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.lodgingsupplier.purchaseorder.ejb.LodgingOrderLocalHome</jndi-name>
      <table-name>LodgingOrder</table-name>
      <cmp-field-mapping>
        <cmp-field-name>orderId</cmp-field-name>
        <table-column>orderId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>lodgingId</cmp-field-name>
        <table-column>lodgingId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>startDate</cmp-field-name>
        <table-column>startDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>endDate</cmp-field-name>
        <table-column>endDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>headCount</cmp-field-name>
        <table-column>headCount</table-column>
      </cmp-field-mapping>
    </entity>
    <session>
      <ejb-name>LodgingPOEndpointBean</ejb-name>
      <jndi-name>LodgingPOEndpointBean</jndi-name>
      <resource-ref>
        <ref-name>jms/lodging/QueueConnectionFactory</ref-name>
        <resource-link>JmsXA</resource-link>
      </resource-ref>
	<web-service-address>http://localhost:8080/webservice/LodgingPOService</web-service-address>
    </session>
    <message-driven>
      <ejb-name>LodgingMessageEJB</ejb-name>

	<resource-adapter>
        	<resource-link>ActiveMQ AdventureBuilder</resource-link>
        </resource-adapter>  
    </message-driven>
  </enterprise-beans>

</openejb-jar>

(5) OPC Plan

<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar configId=""
  xmlns="http://www.openejb.org/xml/ns/openejb-jar"
  xmlns:naming="http://geronimo.apache.org/xml/ns/naming" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment">
 
<cmp-connection-factory>
	<resource-link>MysqlDataSource</resource-link>
</cmp-connection-factory>
  <enterprise-beans>
    <entity>
      <ejb-name>PurchaseOrderBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.opc.purchaseorder.ejb.PurchaseOrderLocalHome</jndi-name>
      <table-name>PurchaseOrder</table-name>
      <cmp-field-mapping>
        <cmp-field-name>locale</cmp-field-name>
        <table-column>locale</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>totalPrice</cmp-field-name>
        <table-column>totalPrice</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>startDate</cmp-field-name>
        <table-column>startDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>userId</cmp-field-name>
        <table-column>userId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>departureCity</cmp-field-name>
        <table-column>departureCity</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>endDate</cmp-field-name>
        <table-column>endDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>orderDate</cmp-field-name>
        <table-column>orderDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>headCount</cmp-field-name>
        <table-column>headCount</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>poId</cmp-field-name>
        <table-column>poId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>emailId</cmp-field-name>
        <table-column>emailId</table-column>
      </cmp-field-mapping>
      <ejb-local-ref>
        <ref-name>ejb/local/CreditCard</ref-name>
        <name>CreditCardBean</name>
      </ejb-local-ref>
      <ejb-local-ref>
        <ref-name>ejb/local/ContactInfo</ref-name>
        <name>ContactInfoBean</name>
      </ejb-local-ref>
      <ejb-local-ref>
        <ref-name>ejb/local/Activity</ref-name>
        <name>ActivityBean</name>
      </ejb-local-ref>
      <ejb-local-ref>
        <ref-name>ejb/local/Lodging</ref-name>
        <name>LodgingBean</name>
      </ejb-local-ref>
      <ejb-local-ref>
        <ref-name>ejb/local/Transportation</ref-name>
        <name>TransportationBean</name>
      </ejb-local-ref>

	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>
    <entity>
      <ejb-name>CreditCardBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.opc.purchaseorder.ejb.CreditCardLocalHome</jndi-name>
      <table-name>CreditCard</table-name>
      <cmp-field-mapping>
        <cmp-field-name>cardNumber</cmp-field-name>
        <table-column>cardNumber</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>cardType</cmp-field-name>
        <table-column>cardType</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>cardExpiryDate</cmp-field-name>
        <table-column>cardExpiryDate</table-column>
      </cmp-field-mapping>
	<cmp-field-mapping>
		<cmp-field-name>creditCardBean_upk</cmp-field-name>
		<table-column>CreditCardBean_upk</table-column>
	</cmp-field-mapping>

   
	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>
    <entity>
      <ejb-name>ActivityBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.opc.purchaseorder.ejb.ActivityLocalHome</jndi-name>
      <table-name>Activity_Bean</table-name>
      <cmp-field-mapping>
        <cmp-field-name>activityId</cmp-field-name>
        <table-column>activityId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>startDate</cmp-field-name>
        <table-column>startDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>price</cmp-field-name>
        <table-column>price</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>endDate</cmp-field-name>
        <table-column>endDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>headCount</cmp-field-name>
        <table-column>headCount</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>location</cmp-field-name>
        <table-column>location</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>name</cmp-field-name>
        <table-column>name</table-column>
      </cmp-field-mapping>
	<cmp-field-mapping>
		<cmp-field-name>activityBean_upk</cmp-field-name>
		<table-column>ActivityBean_upk</table-column>
	</cmp-field-mapping>


	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>
    <entity>
      <ejb-name>TransportationBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.opc.purchaseorder.ejb.TransportationLocalHome</jndi-name>
      <table-name>Transportation_Bean</table-name>
      <cmp-field-mapping>
        <cmp-field-name>transportationId</cmp-field-name>
        <table-column>transportationId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>departureDate</cmp-field-name>
        <table-column>departureDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>destination</cmp-field-name>
        <table-column>destination</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>travelClass</cmp-field-name>
        <table-column>travelClass</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>price</cmp-field-name>
        <table-column>price</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>carrier</cmp-field-name>
        <table-column>carrier</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>origin</cmp-field-name>
        <table-column>origin</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>departureTime</cmp-field-name>
        <table-column>departureTime</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>headCount</cmp-field-name>
        <table-column>headCount</table-column>
      </cmp-field-mapping>
	<cmp-field-mapping>
		<cmp-field-name>transportationBean_upk</cmp-field-name>
		<table-column>TransportationBean_upk</table-column>
	</cmp-field-mapping>


	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>

    </entity>
    <entity>
      <ejb-name>ContactInfoBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.opc.purchaseorder.ejb.ContactInfoLocalHome</jndi-name>
      <table-name>ContactInfo</table-name>
      <cmp-field-mapping>
        <cmp-field-name>phone</cmp-field-name>
        <table-column>phone</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>email</cmp-field-name>
        <table-column>email</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>givenName</cmp-field-name>
        <table-column>givenName</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>familyName</cmp-field-name>
        <table-column>familyName</table-column>
      </cmp-field-mapping>
	<cmp-field-mapping>
		<cmp-field-name>contactInfoBean_upk</cmp-field-name>
		<table-column>ContactInfoBean_upk</table-column>
	</cmp-field-mapping>

      <ejb-local-ref>
        <ref-name>ejb/local/Address</ref-name>
        <name>AddressBean</name>
      </ejb-local-ref>

	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>
    <entity>
      <ejb-name>AddressBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.opc.purchaseorder.ejb.AddressLocalHome</jndi-name>
      <table-name>Address</table-name>
      <cmp-field-mapping>
        <cmp-field-name>streetName1</cmp-field-name>
        <table-column>streetName1</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>streetName2</cmp-field-name>
        <table-column>streetName2</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>city</cmp-field-name>
        <table-column>city</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>state</cmp-field-name>
        <table-column>state</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>postalCode</cmp-field-name>
        <table-column>postalCode</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>country</cmp-field-name>
        <table-column>country</table-column>
      </cmp-field-mapping>
	<cmp-field-mapping>
		<cmp-field-name>addressBean_upk</cmp-field-name>
		<table-column>AddressBean_upk</table-column>
	</cmp-field-mapping>


	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>
    <entity>
      <ejb-name>LodgingBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.opc.purchaseorder.ejb.LodgingLocalHome</jndi-name>
      <table-name>Lodging_Bean</table-name>
      <cmp-field-mapping>
        <cmp-field-name>startDate</cmp-field-name>
        <table-column>startDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>lodgingId</cmp-field-name>
        <table-column>lodgingId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>noNights</cmp-field-name>
        <table-column>noNights</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>endDate</cmp-field-name>
        <table-column>endDate</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>location</cmp-field-name>
        <table-column>location</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>noRooms</cmp-field-name>
        <table-column>noRooms</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>name</cmp-field-name>
        <table-column>name</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>pricePerNight</cmp-field-name>
        <table-column>pricePerNight</table-column>
      </cmp-field-mapping>
	<cmp-field-mapping>
		<cmp-field-name>lodgingBean_upk</cmp-field-name>
		<table-column>LodgingBean_upk</table-column>
	</cmp-field-mapping>

	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>
    <session>
      <ejb-name>PoEndpointBean</ejb-name>
      <jndi-name>PoEndpointBean</jndi-name>
      <resource-ref>
        <ref-name>jms/opc/QueueConnectionFactory</ref-name>
  	  <resource-link>JmsXA</resource-link>
      </resource-ref>
      <web-service-address>http://localhost:8080/webservice/PoEndpointBean</web-service-address>
    </session>
    <session>
      <ejb-name>BrokerServiceBean</ejb-name>
      <jndi-name>BrokerServiceBean</jndi-name>
      <resource-ref>
        <ref-name>jms/opc/QueueConnectionFactory</ref-name>
	  <resource-link>JmsXA</resource-link>        
      </resource-ref>
      <web-service-address>http://localhost:8080/webservice/WebServiceBroker</web-service-address>
    </session>
    <session>
      <ejb-name>OtEndpointBean</ejb-name>
      <jndi-name>OtEndpointBean</jndi-name>
      <ejb-local-ref>
        <ref-name>ejb/local/processmanager/ProcessManager</ref-name>
        <name>ProcessManagerBean</name>
      </ejb-local-ref>
      <ejb-local-ref>
        <ref-name>ejb/local/purchaseorder/PurchaseOrder</ref-name>
        <name>PurchaseOrderBean</name> 
      </ejb-local-ref>
      <web-service-address>http://localhost:8080/webservice/OtEndpointBean</web-service-address>
    </session>
    <message-driven>
      <ejb-name>WorkFlowManagerBean</ejb-name>

      <resource-adapter>
	  <resource-link>ActiveMQ AdventureBuilder</resource-link>
      </resource-adapter>
	<resource-ref>
        <ref-name>jms/opc/QueueConnectionFactory</ref-name>
	  <resource-link>JmsXA</resource-link>
      </resource-ref>
    </message-driven>
    <message-driven>
      <ejb-name>OrderFillerBean</ejb-name>
    
      <resource-adapter>
	  <resource-link>ActiveMQ AdventureBuilder</resource-link>
      </resource-adapter>	

      <resource-ref>
        <ref-name>jms/opc/QueueConnectionFactory</ref-name>
	  <resource-link>JmsXA</resource-link>     
      </resource-ref>
    </message-driven>
    <message-driven>
      <ejb-name>BrokerRequestorBean</ejb-name>
    
      <resource-adapter>
	  <resource-link>ActiveMQ AdventureBuilder</resource-link>
      </resource-adapter>
	<resource-ref>
        <ref-name>jms/opc/QueueConnectionFactory</ref-name>
	  <resource-link>JmsXA</resource-link>     
      </resource-ref>
    </message-driven>
    <message-driven>
      <ejb-name>CRMBean</ejb-name>     
      <resource-adapter>
	  <resource-link>ActiveMQ AdventureBuilder</resource-link>
      </resource-adapter>
      <resource-ref>
        <ref-name>jms/opc/QueueConnectionFactory</ref-name>
	 <resource-link>JmsXA</resource-link>
      </resource-ref>
    </message-driven>
  </enterprise-beans>

   <relationships>
        <ejb-relation>
		<ejb-relation-name>ContactAddressRelations</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>ContactInfoBean</ejb-relationship-role-name>
		    <relationship-role-source>
                    <ejb-name>ContactInfoBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>address</cmr-field-name>
                </cmr-field>
		    <foreign-key-column-on-source/>
		    <role-mapping>
			    <cmr-field-mapping>
		    		  <key-column>AddressBean_upk</key-column>
				  <foreign-key-column>address</foreign-key-column>
			    </cmr-field-mapping>
		    </role-mapping>	  
	       </ejb-relationship-role>
	   </ejb-relation>

	 <ejb-relation>
		<ejb-relation-name>PurchaseTransportationRelations</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>PurchaseOrderBean</ejb-relationship-role-name>
		    <relationship-role-source>
                    <ejb-name>PurchaseOrderBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>returnFlightInfo</cmr-field-name>
                </cmr-field>
	          <foreign-key-column-on-source/>	
		    <role-mapping>
			    <cmr-field-mapping>
		    		  <key-column>TransportationBean_upk</key-column>
				  <foreign-key-column>returnFlightInfo</foreign-key-column>
			    </cmr-field-mapping>
		    </role-mapping>	  
	       </ejb-relationship-role>
	   </ejb-relation>

	 <ejb-relation>
		<ejb-relation-name>PurchaseLodgingRelations</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>PurchaseOrderBean</ejb-relationship-role-name>
		    <relationship-role-source>
                    <ejb-name>PurchaseOrderBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>lodging</cmr-field-name>
                </cmr-field>
		    <foreign-key-column-on-source/>
		    <role-mapping>
			    <cmr-field-mapping>
		    		  <key-column>LodgingBean_upk</key-column>
				  <foreign-key-column>lodging</foreign-key-column>
			    </cmr-field-mapping>
		    </role-mapping>	  
	       </ejb-relationship-role>
	   </ejb-relation>

	 <ejb-relation>
		<ejb-relation-name>PurchaseActivityRelations</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>PurchaseOrderBean</ejb-relationship-role-name>
		    <relationship-role-source>
                    <ejb-name>PurchaseOrderBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>activities</cmr-field-name>
                </cmr-field>
		    <role-mapping>
			    <cmr-field-mapping>
		    		  <key-column>poId</key-column>
				  <foreign-key-column>PurchaseOrderBean_activities</foreign-key-column>
			    </cmr-field-mapping>
		    </role-mapping>	  
	       </ejb-relationship-role>
	   </ejb-relation>

	  <ejb-relation>
		<ejb-relation-name>PurchaseTransportationRelations1</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>PurchaseOrderBean</ejb-relationship-role-name>
		    <relationship-role-source>
                    <ejb-name>PurchaseOrderBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>departureFlightInfo</cmr-field-name>
                </cmr-field>
		    <foreign-key-column-on-source/>
		    <role-mapping>
			    <cmr-field-mapping>
		    		  <key-column>TransportationBean_upk</key-column>
				  <foreign-key-column>departureFlightInfo</foreign-key-column>
			    </cmr-field-mapping>
		    </role-mapping>	  
	       </ejb-relationship-role>
	   </ejb-relation>

	   <ejb-relation>
		<ejb-relation-name>PurchaseContactRelations</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>PurchaseOrderBean</ejb-relationship-role-name>
		    <relationship-role-source>
                    <ejb-name>PurchaseOrderBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>billingInfo</cmr-field-name>
                </cmr-field>
		    <foreign-key-column-on-source/>
		    <role-mapping>
			    <cmr-field-mapping>
		    		  <key-column>ContactInfoBean_upk</key-column>
				  <foreign-key-column>billingInfo</foreign-key-column>
			    </cmr-field-mapping>
		    </role-mapping>	  
	       </ejb-relationship-role>
	   </ejb-relation>
	
 	 <ejb-relation>
		<ejb-relation-name>PurchaseContactRelations1</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>PurchaseOrderBean</ejb-relationship-role-name>
		    <relationship-role-source>
                    <ejb-name>PurchaseOrderBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>shippingInfo</cmr-field-name>
                </cmr-field>
		    <foreign-key-column-on-source/>
		    <role-mapping>
			    <cmr-field-mapping>
		    		  <key-column>ContactInfoBean_upk</key-column>
				  <foreign-key-column>shippingInfo</foreign-key-column>
			    </cmr-field-mapping>
		    </role-mapping>	  
	       </ejb-relationship-role>
	   </ejb-relation>

        <ejb-relation>
		<ejb-relation-name>PurchaseCreditRelations</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>PurchaseOrderBean</ejb-relationship-role-name>
		    <relationship-role-source>
                    <ejb-name>PurchaseOrderBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>creditCard</cmr-field-name>
                </cmr-field>
	         <foreign-key-column-on-source/>
		    <role-mapping>
			    <cmr-field-mapping>
		    		  <key-column>CreditCardBean_upk</key-column>
				  <foreign-key-column>creditCard</foreign-key-column>
			    </cmr-field-mapping>
		    </role-mapping>	  
	       </ejb-relationship-role>
	   </ejb-relation>

    </relationships>
</openejb-jar>

(6) Process Manager Plan

<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar configId=""
  xmlns="http://www.openejb.org/xml/ns/openejb-jar"
  xmlns:naming="http://geronimo.apache.org/xml/ns/naming" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment">
 
<cmp-connection-factory>
	<resource-link>MysqlDataSource</resource-link>
</cmp-connection-factory>
  <enterprise-beans>
    <session>
      <ejb-name>ProcessManagerBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.processmanager.ejb.ProcessManagerLocalHome</jndi-name>
      <local-jndi-name>com.sun.j2ee.blueprints.processmanager.ejb.ProcessManagerLocalHome</local-jndi-name>
      <ejb-local-ref>
        <ref-name>ejb/local/processmanager/Manager</ref-name>
        <name>ManagerBean</name>
      </ejb-local-ref>
    </session>
    <entity>
      <ejb-name>ManagerBean</ejb-name>
      <jndi-name>com.sun.j2ee.blueprints.processmanager.manager.ejb.ManagerLocalHome</jndi-name>
      <local-jndi-name>com.sun.j2ee.blueprints.processmanager.manager.ejb.ManagerLocalHome</local-jndi-name>
      <table-name>Manager</table-name>
      <cmp-field-mapping>
        <cmp-field-name>lodgingOrderStatus</cmp-field-name>
	  <cmp-field-class>String</cmp-field-class>
        <table-column>lodgingOrderStatus</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>orderError</cmp-field-name>
	  <cmp-field-class>boolean</cmp-field-class>
        <table-column>orderError</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>orderId</cmp-field-name>
	  <cmp-field-class>String</cmp-field-class>
        <table-column>orderId</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>status</cmp-field-name>
	  <cmp-field-class>String</cmp-field-class>
        <table-column>status</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>activityOrderStatus</cmp-field-name>
	  <cmp-field-class>String</cmp-field-class>
        <table-column>activityOrderStatus</table-column>
      </cmp-field-mapping>
      <cmp-field-mapping>
        <cmp-field-name>airlineOrderStatus</cmp-field-name>
	  <cmp-field-class>String</cmp-field-class>
        <table-column>airlineOrderStatus</table-column>
      </cmp-field-mapping>

      <primkey-field>orderId</primkey-field>


	 <resource-ref>
		  <ref-name>jdbc/adventure/AdventureDB</ref-name>
		  <resource-link>MysqlDataSource</resource-link>
	 </resource-ref>
    </entity>
  </enterprise-beans>

</openejb-jar>



	Currently working on using GBean's for automatic key generation so that changes related to
key generation are not necessary in the EJB classes. If there is any other way to resolve
the automatic primary key generation issue kindly let me know.




Thanks & Regards,
S.Saraswathi



-----Original Message-----
From: Jakob Roesgaard Færch [mailto:jrf@trifork.com]
Sent: Wednesday, December 07, 2005 3:05 PM
To: dev@geronimo.apache.org
Subject: Re: Java Adventure Builder Reference 1.0.3 webapp deployed

Jacek Laskowski wrote:
> Whow! Thanks for sharing them with us. With them all I think we can
> achieve the goal of deploying PetStore and Adventure Builder on time
> *before* 1.0 is announced.

I'm a little uneasy about the fact that we still need to add CMP fields
to the CMP beans to make the application deploy - with this limitation,
will we able to claim that Geronimo is compatible with the adventure
builder app?

The EJB spec (section 10.8.3) suggests that the
Container Provider will provide a tool to add these special field(s) to
hold the primary key value without having to actually add them to the
EJB's implementation and deployment descriptors.
What Saraswathi has done is - as far as I can tell - what is described
at the Wiki at
<http://wiki.apache.org/geronimo/Working_with_Enterprise_JavaBeans?highlight=%28primary%29%7C%28unknow%29%7C%28key%29#head-d3c8257af5f8402c0d47c6a3dc47ad73972d2aa0>

Does anyone know whether Geronimo/OpenEJB supports the
"behind-the-curtains" generation of fields to hold the primary key?

If this support is not present, what should the strategy be for
packaging the Adventure Builder App with Geronimo; should we
a) Distribute a copy of the entire app with the necessary changes
    incorporated
b) Let the maven script modify the adventure app sources and rebuild
    the ear's before distributing the app?

For the time being, would it be possible for someone (I guess that means
Saraswathi) to share the modified beans - this would save me the time to
add the fields myself.

Kindly,
Jakob

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s)
and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy
all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of
this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

Mime
View raw message