<?xml version="1.0"?>
<!-- RSS generated by Radio UserLand v8.2.1 on Fri, 11 Aug 2006 18:50:51 GMT -->
<rss version="2.0">
	<channel>
		<title>Inside Scoop on Java EE</title>
		<link>http://radio.weblogs.com/0135826/</link>
		<description>Tips and tricks on enterprise java, middleware technologies and Oracle Application Server</description>
		<copyright>Copyright 2006 Debu Panda</copyright>
		<lastBuildDate>Fri, 11 Aug 2006 18:50:51 GMT</lastBuildDate>
		<docs>http://backend.userland.com/rss</docs>
		<generator>Radio UserLand v8.2.1</generator>
		<managingEditor>debabrata.panda@oracle.com</managingEditor>
		<webMaster>debabrata.panda@oracle.com</webMaster>
		<category domain="http://www.weblogs.com/rssUpdates/changes.xml">rssUpdates</category> 
		<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc"/>
		<ttl>60</ttl>
		<item>
			<title>Same house and same job but a new blog! </title>
			<link>http://radio.weblogs.com/0135826/2006/08/11.html#a209</link>
			<description>Changes are part of our life! New car, new computer or new kids are always fun! They bring excitement to life. &lt;br&gt;But sometime we have emotional attachment to old things, old houses, etc. &lt;br&gt;And I had the same with this blog-site and was resisting for a change. &lt;br&gt;&lt;p&gt;Finally I decided to desert it.&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;Please visit my new blog site: &lt;span style=&quot;font-weight: bold; color: rgb(51, 102, 255);&quot;&gt;&lt;a href=&quot;http://debupanda.com&quot;&gt;http://debupanda.com&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;RSS: &lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;a href=&quot;http://debupanda.blogspot.com/rss.xml&quot;&gt;http://debupanda.blogspot.com/rss.xml&lt;/a&gt;&lt;/span&gt;</description>
			<guid>http://radio.weblogs.com/0135826/2006/08/11.html#a209</guid>
			<pubDate>Fri, 11 Aug 2006 18:50:51 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=135826&amp;amp;p=209&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0135826%2F2006%2F08%2F11.html%23a209</comments>
			</item>
		<item>
			<title>Price for Carelessness</title>
			<link>http://radio.weblogs.com/0135826/2006/08/08.html#a207</link>
			<description>My laptop crashed about a month back and I&apos;m still trying to recover. I&apos;ve been very careless about backing up my stuffs and I had to price for carelessness. Lack of time in past one year is one of the primary drivers for my carelessness though. The last time I took backup of my laptop was about two months back and I lost many documents, articles, presentations, test cases, and samples that I wrote in last two months. A high stressed PM job and night book authoring does not mesh well (:&amp;nbsp; One good thing was that I used a different machine for book writing and backed up my work almost every day. Probably this incident will teach me a lesson to be little more careful next time.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;The worst effect was on my blogs. I did not realize that if you use Radio Userland all blog entries are stored on your local drives and recovery is not easy and I was almost decommissioned from blogging for about a month. However the folks in Radio Userland helped me recover my old posts and hope I&apos;m back in business again. I think I should seriously plan out a transition of blogs. I like Google&apos;s blogger. But now that it is blocked from India does not excite me. Got any suggestions for a good blog site that is reliable and that will not leave out of blogging for weeks?&lt;BR&gt;</description>
			<guid>http://radio.weblogs.com/0135826/2006/08/09.html#a208</guid>
			<pubDate>Wed, 09 Aug 2006 20:54:28 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=135826&amp;amp;p=208&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0135826%2F2006%2F08%2F09.html%23a208</comments>
			</item>
		<item>
			<link>http://radio.weblogs.com/0135826/2006/07/11.html#a206</link>
			<description>
      &lt;br&gt;&lt;div class=&quot;itemTitle&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://radio.weblogs.com/0135826/2006/07/11.html#a206&quot; class=&quot;weblogItemTitle&quot;&gt;Accessing EJB 3.0 Session beans from Spring&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;P&gt;EJB 3.0 is now final and many projects have started using EJB 3.0. The good news is that Spring is building some EJB 3.0 support as part of &lt;A href=&quot;http://springide.org/project/wiki/UsingJsr220inWebContainer&quot;&gt;Pitchfork&lt;/A&gt; project that will widen acceptance of EJB 3.0. There may be some projects you want to use both EJB 3.0 Session beans and Spring-managed beans.&amp;nbsp; For example you may have a Stateless EJB that you want to access in your POJO in your web module.&lt;/P&gt;
&lt;P&gt;If you have used EJB 2.1 Session beans from Spring then you remember that you had to use a business interface and Spring&amp;#146;s proxy classes that helped avoid writing Service locator and repetitive JNDI code.&amp;nbsp; Unfortunately Spring documentation has not been updated how-to access EJB 3.0 Session beans from Spring. Hence&amp;nbsp;this information in not from the source and result of my trial. I could make this to work and in this blog I will outline the steps that&amp;nbsp; to access EJB 3.0 Session beans from Spring Applications.&lt;/P&gt;
&lt;H2&gt;&lt;FONT color=blue&gt;The Stateless EJB&lt;/FONT&gt;&amp;nbsp;&lt;/H2&gt;
&lt;P&gt;Let us assume that you have an EJB 3.0 Session bean named &lt;FONT face=&quot;Courier, Monospace&quot;&gt;EmployeeFacade&lt;/FONT&gt; that is used to create and update employees as in the following code:&lt;/P&gt;&lt;PRE&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;@Remote&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;public interface EmployeeFacade {&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;Employee addEmployee(String name, double salary);&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;Employee findEmployeeByEmpNo(Long empNo);&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;}&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;@Stateless&lt;BR&gt;public class EmployeeFacadeBean&amp;nbsp; implements EmployeeFacade {&lt;BR&gt;@PersistenceContext&lt;BR&gt;&amp;nbsp;&amp;nbsp; private EntityManager em;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Employee addEmployee(String empName, double sal) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Employee emp = new Employee();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emp.setName(empName);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emp.setSal(sal);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; em.persist(emp);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return emp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;&amp;nbsp; public Employee findEmployeeByEmpNo(Long empNo){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return em.find(Employee.class,empNo);&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Remember that EJB 3.0 Session beans are POJOs and interfaces are business interfaces and hence you do not have to add an extra business interface as use of EJB 2.1 with Spring required.&lt;/P&gt;
&lt;H2&gt;&lt;FONT color=blue&gt;Spring POJOs&lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;You want to use the&amp;nbsp;EmployeeFacade&amp;nbsp;Session bean in your Spring bean and you can use setter injection to inject an instance of the EJB 3.0 Session bean as follows:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;public class EmployeeFacadeServiceBean implements EmployeeFacadeService&amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;protected EmployeeFacade employeeFacade ;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp; &lt;a href=&quot;//setter&quot;&gt;&lt;a href=&quot;//setter&quot;&gt;//setter&lt;/a&gt;&lt;/a&gt; Injection&lt;BR&gt;&amp;nbsp; public void setEmployeeFacade(EmployeeFacade employeeFacade) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.employeeFacade = employeeFacade;&lt;BR&gt;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;&amp;nbsp;&amp;nbsp; public Employee addEmployee(String empName, Double sal){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (Employee) this.employeeFacade.addEmployee(empName, sal);&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Employee findEmployeeByEmpNo(Long empNo) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (Employee) this.employeeFacade.findEmployeeByEmpNo(empNo);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This Spring bean is accessed from the web module.&lt;/P&gt;
&lt;H2&gt;&lt;FONT color=blue&gt;Spring Configuration&lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;Now let us see the Spring configuration that does the magic:&lt;/P&gt;
&lt;P&gt;1. First EJB 3.0 does not require the proxy classes and related configure that you need for EJB 2.x. This is due to the fact that EJB 3.0 does not require a home interface. You can use the&amp;nbsp; &lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;JndiObjectFactoryBean to&lt;/FONT&gt; wire the EJB in Spring configuration as follows:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;&amp;lt;bean id = &quot;employeeFacade&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp; class = &quot;org.springframework.jndi.JndiObjectFactoryBean&quot;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name = &quot;jndiName&quot;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value = &quot;java:comp/env/ejb/EmployeeFacade&quot;/&amp;gt;&lt;BR&gt;&amp;lt;/bean&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Note that I&amp;#146;ve used a name in the ENC to make it portable. If you want to use a global JNDI name for your EJB, you can do that too. Also note that there is no difference in using either a remote or local interface for EJB 3.0 Session bean because the interfaces are POJIs and what differs is references defined for the interface used that we will see next.&lt;/P&gt;
&lt;P&gt;2. You have to make sure that the EJB is referenced from the web module either using &lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;ejb-ref&lt;/FONT&gt; or &lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;ejb-local-ref&lt;/FONT&gt; in the web.xml or using @EJB annotation in the class level as follows:&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;@EJB(name=&quot;ejb/EmployeeFacade&quot;, beanInterface=oracle.ejb30.EmployeeFacade.class)&lt;BR&gt;public class InsertServlet extends HttpServlet &lt;BR&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;..}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;3. You configure the POJO using the EJB (EmployeeFacade) as follows:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=&quot;Courier, Monospace&quot; color=teal&gt;&amp;lt;bean id=&quot;employeeFacadeService&quot; class=&quot;oracle.ejb30.EmployeeFacadeServiceBean&quot;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name = &quot;employeeFacade&quot;&amp;nbsp; ref = &quot;employeeFacade&quot;/&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Is this simple enough? You can combine the power of Spring and EJB 3.0 without much complexity. In my next blog I will discuss how you can develop a Spring-enabled EJB 3.0 Session bean.&lt;/P&gt;&lt;br&gt;
      </description>
			<guid>http://radio.weblogs.com/0135826/2006/07/11.html#a206</guid>
			<pubDate>Tue, 11 Jul 2006 16:40:29 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=135826&amp;amp;p=206&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0135826%2F2006%2F07%2F11.html%23a206</comments>
			</item>
		<item>
			<link>http://radio.weblogs.com/0135826/2006/06/08.html#a205</link>
			<description>
      &lt;br&gt;&lt;div class=&quot;itemTitle&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://radio.weblogs.com/0135826/2006/06/08.html#a205&quot; class=&quot;weblogItemTitle&quot;&gt;Using EJB3 JPA to Map multi-level entity inheritance to a single table&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;EJB3 specification was finalized few weeks back and now EJB3 and JPA are in action and many companies have developing their next generation applications using EJB3 and JPA. &lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;OnJava published &lt;A href=&quot;http://www.onjava.com/pub/a/onjava/2006/05/17/standardizing-with-ejb3-java-persistence-api.html&quot;&gt;my article on&lt;/A&gt; EJB3 JPA few weeks back and I got some follow up questions from readers and customers.&amp;nbsp; Can you map an entire hierarchy of objects with multi-level inheritance into a single table?&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;In &lt;A href=&quot;http://www.onjava.com/pub/a/onjava/2006/05/17/standardizing-with-ejb3-java-persistence-api.html&quot;&gt;my article&lt;/A&gt;, I discussed a single level of inheritance and will use the same domain model to add another level.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;Let us start with a simple top-level domain object &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Employee&lt;/FONT&gt;. There may be two type of employees: &lt;FONT face=&quot;Courier, Monospace&quot;&gt;FullTime&lt;/FONT&gt; and &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Contractor&lt;/FONT&gt; and hence &lt;FONT face=&quot;Courier, Monospace&quot;&gt;FullTime &lt;/FONT&gt;and &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Contractor&lt;/FONT&gt; inherit from &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Employee&lt;/FONT&gt; object. Let us assume that there are two types of contractors: &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Consultant&lt;/FONT&gt; who charges&amp;nbsp;hefty amount&amp;nbsp;and &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Voluntee&lt;/FONT&gt;r who works for free and hence &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Consultant&lt;/FONT&gt; and &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Volunteer&lt;/FONT&gt; inherit from Contractor object and hence the inheritance will look like follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;Let us assume that you want to map the entire hierarchy of objects into a single table named &lt;FONT face=&quot;Courier, Monospace&quot;&gt;EMP &lt;/FONT&gt;table. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;Assuming you do not to persist an instance of &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Employee&lt;/FONT&gt; as is, we defined it to be an abstract entity and defined that it is mapped to &lt;FONT face=&quot;Courier, Monospace&quot;&gt;EMP &lt;/FONT&gt;table and we have defined the inheritance strategy to SINGLE_TABLE.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;We have defined the discriminator column to be &lt;FONT face=&quot;Courier, Monospace&quot;&gt;EMPLOYEE_TYPE&lt;/FONT&gt; that stores the employee type: F for fulltime, C for Consultant and V for volunteer. Note that &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Id&lt;/FONT&gt; and Table mapping can be defined only in the top-level entity in a hierarchy as follows when using SINGLE_TABLE inheritance strategy:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@Entity&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@Table(name=&quot;EMP&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@Inheritance(strategy=InheritanceType.SINGLE_TABLE)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@DiscriminatorColumn(name=&quot;EMPLOYEE_TYPE&quot;,discriminatorType=DiscriminatorType.STRING, length=1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;public abstract class Employee implements Serializable {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@Id&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@GeneratedValue(strategy=GenerationType.AUTO)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@Column(nullable=false)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;protected Long empNo;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@Column(name=&quot;ENAME&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;protected String name;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;protected Timestamp hireDate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;protected String job;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;The &lt;FONT face=&quot;Courier, Monospace&quot;&gt;FullTime&lt;/FONT&gt; entity extends the employee and can be persisted on its own. We define the DiscriminatorValue for this entity to be &apos;F&apos;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@Entity&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@DiscriminatorValue(value=&quot;F&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;public class FullTime extends Employee {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;public FullTime() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@Column(name = &quot;SAL&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;private Double salary;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@Column(name = &quot;COMM&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;private Double commission;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@Column(name = &quot;DESIG&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;private String designation;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;The &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Contractor&lt;/FONT&gt; entity extends &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Employee &lt;/FONT&gt;but is not persistence on its own, instead its sub-type &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Consultant&lt;/FONT&gt; and &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Volunteer &lt;/FONT&gt;are persisted. Hence there is no discriminator value defined for the &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Contractor&lt;/FONT&gt; entity:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@Entity&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;public abstract class Contractor extends Employee &lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;@Column(name = &quot;END_DATE&quot;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;private Timestamp endDate;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;The discriminator value for &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Consultant &lt;/FONT&gt;and &lt;FONT face=&quot;Courier, Monospace&quot;&gt;Volunteer &lt;/FONT&gt;entities are defined as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;FONT color=teal&gt;@Entity&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;FONT color=teal&gt;@DiscriminatorValue(value=&quot;C&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;FONT color=teal&gt;public class Consultant extends Contractor {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;FONT color=teal&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public Consultant() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;FONT color=teal&gt;..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;FONT color=teal&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;SPAN style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;@Entity&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;@DiscriminatorValue(value=&quot;V&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;public class Volunteer extends Contractor implements Serializable {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public Volunteer() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;We are done with the mapping !&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;Now let us create a session fa&amp;ccedil;ade for the Employee entity &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@Stateless(name=&quot;EmployeeFacade&quot;)&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;public class EmployeeFacadeBean implements EmployeeFacade {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;@PersistenceContext&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;private EntityManager em;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public EmployeeFacadeBean() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public Object mergeEntity(Object entity) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;return em.merge(entity);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;public Object persistEntity(Object entity) throws EmployeeCreationException{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;em.persist(entity);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;return entity;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;..&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;Let us create a&amp;nbsp;client that uses the session facade&amp;nbsp;persists each type of Employee instances and then list using a named query. You can use dependency injection to invoke the bean instance as follows:&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;@EJB&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;EmployeeFacade employeeFacade;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;a href=&quot;//&quot;&gt;&lt;a href=&quot;//&quot;&gt;//&lt;/a&gt;&lt;/a&gt; Persist a FullTime Entity&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;FullTime fte = new FullTime();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;fte.setName(&quot;PNisheet&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;fte.setSalary(new Double(1200.0));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;fte.setDesignation(&quot;Programmer&quot;); &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;employeeFacade.persistEntity(fte);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;a href=&quot;//&quot;&gt;&lt;a href=&quot;//&quot;&gt;//&lt;/a&gt;&lt;/a&gt; Persist a Consultant&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Consultant pte = new Consultant();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;pte.setName(&quot;PandaB&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;pte.setHourlyRate(new Double(100.0));&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;employeeFacade.persistEntity(pte);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;a href=&quot;//Persist&quot;&gt;&lt;a href=&quot;//Persist&quot;&gt;//Persist&lt;/a&gt;&lt;/a&gt; a Volunteer&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Volunteer vol = new Volunteer();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;vol.setName(&quot;RenuMi&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;vol.setDesignation(&quot;Trainee&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;employeeFacade.persistEntity(vol);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;a href=&quot;//&quot;&gt;&lt;a href=&quot;//&quot;&gt;//&lt;/a&gt;&lt;/a&gt; List All employees&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;List&amp;lt;Employee&amp;gt; emplist = employeeFacade.findAllEmployee();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;FONT face=Arial color=#000000&gt;We are done. After running the&amp;nbsp;the client&amp;nbsp;you will see&amp;nbsp;each&amp;nbsp;entity&amp;nbsp;instance persisted&amp;nbsp;to the EMP table with appropriate&amp;nbsp;EMPLOYEE_TYPE column set.&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;EMPNO ENAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EMPLOYEE_TYPE&lt;BR&gt;----- ---------- -------------&lt;BR&gt;&amp;nbsp;1506 RenuMi&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V&lt;BR&gt;&amp;nbsp;1504 PNisheet&amp;nbsp;&amp;nbsp; F&lt;BR&gt;&amp;nbsp;1505 PandaB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT color=teal&gt;&lt;FONT face=&quot;Courier, Monospace&quot;&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-FAMILY: Arial&quot;&gt;&lt;FONT size=2&gt;&lt;FONT face=Geneva,Arial,Sans-Serif color=black&gt;&lt;o:p&gt;Hope this helps!&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;br&gt;
      </description>
			<guid>http://radio.weblogs.com/0135826/2006/06/08.html#a205</guid>
			<pubDate>Thu, 08 Jun 2006 17:28:06 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=135826&amp;amp;p=205&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0135826%2F2006%2F06%2F08.html%23a205</comments>
			</item>
		<item>
			<link>http://radio.weblogs.com/0135826/2006/05/30.html#a204</link>
			<description>
      &lt;br&gt;&lt;div class=&quot;itemTitle&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://radio.weblogs.com/0135826/2006/05/30.html#a204&quot; class=&quot;weblogItemTitle&quot;&gt;Back from Alaska Cruise, battery recharged&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;P&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &apos;Courier New&apos;; mso-fareast-font-family: &apos;Times New Roman&apos;; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA&quot;&gt;&lt;FONT face=Geneva,Arial,Sans-Serif&gt;I took a break from work last week and&amp;nbsp;went for&amp;nbsp;a weeklong cruise trip to Alaska with my family. It was a nice break from work and&amp;nbsp;relaxing. Now I feel as if I got my battery recharged!&amp;nbsp; Alaska&amp;nbsp;is beatiful too. I can&amp;#146;t believe I did not browse web or read emails (cell phone switched&amp;nbsp;off, isn&apos;t that nice?)&amp;nbsp;for six days! Now I&amp;#146;ve hundreds of emails in my Inbox. I tried the high-speed Internet on the vessel from the cruise on my final day on cruise and it was worse than a dialup. It was expensive, $16 for half-hour and all I could do is write only three e-mails!&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &apos;Courier New&apos;; mso-fareast-font-family: &apos;Times New Roman&apos;; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA&quot;&gt;&lt;FONT face=Arial&gt;Anyway back to work and will soon resume regular tech blogging!&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;br&gt;
      </description>
			<guid>http://radio.weblogs.com/0135826/2006/05/30.html#a204</guid>
			<pubDate>Tue, 30 May 2006 13:22:54 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=135826&amp;amp;p=204&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0135826%2F2006%2F05%2F30.html%23a204</comments>
			</item>
		<item>
			<link>http://radio.weblogs.com/0135826/2006/05/18.html#a203</link>
			<description>
      &lt;br&gt;&lt;div class=&quot;itemTitle&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://radio.weblogs.com/0135826/2006/05/18.html#a203&quot; class=&quot;weblogItemTitle&quot;&gt;Article: EJB3 Java Persistence API&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;P&gt;EJB3 became final few days back. OnJava just published my article &lt;A href=&quot;http://www.onjava.com/pub/a/onjava/2006/05/17/standardizing-with-ejb3-java-persistence-api.html&quot;&gt;Standardizing Java Persistence API with EJB3 JPA&lt;/A&gt;. This article&amp;nbsp;provides an introduction to what EJB3 JPA is bringing onto the table.&lt;/P&gt;&lt;br&gt;
      </description>
			<guid>http://radio.weblogs.com/0135826/2006/05/18.html#a203</guid>
			<pubDate>Thu, 18 May 2006 18:51:16 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=135826&amp;amp;p=203&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0135826%2F2006%2F05%2F18.html%23a203</comments>
			</item>
		<item>
			<link>http://radio.weblogs.com/0135826/2006/05/15.html#a202</link>
			<description>
      &lt;br&gt;&lt;div class=&quot;itemTitle&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://radio.weblogs.com/0135826/2006/05/15.html#a202&quot; class=&quot;weblogItemTitle&quot;&gt;First Taste of EJB: Sample Chapter from &quot;EJB3 In Action&quot;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 11pt; FONT-FAMILY: AGaramond-Regular; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;FONT face=&quot;Courier New&quot;&gt;&quot;&lt;/FONT&gt;&lt;FONT face=Geneva,Arial,Sans-Serif size=2&gt;In this age of hyper-competitiveness, learning a new technology by balancing a book on your lap while hacking away at the business problem on the keyboard has become the norm. But let&amp;#146;s face it&amp;#151;somewhere deep down, you probably prefer &quot;baptism by fire.&quot;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 11pt; FONT-FAMILY: AGaramond-Regular; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;FONT face=Geneva,Arial,Sans-Serif&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;?xml:namespace prefix = o ns = &quot;urn:schemas-microsoft-com:office:office&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 11pt; FONT-FAMILY: AGaramond-Regular; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;FONT face=Geneva,Arial,Sans-Serif size=2&gt;This Chapter is for the brave pioneer in all of us, who can take a quick look at all the EJB types&amp;nbsp; ..&quot;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 11pt; FONT-FAMILY: AGaramond-Regular; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;FONT face=Geneva,Arial,Sans-Serif&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 11pt; FONT-FAMILY: AGaramond-Regular; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;FONT face=Geneva,Arial,Sans-Serif size=2&gt;The early draft of Chapter 2: First Taste of EJBs of our upcoming book &lt;A href=&quot;http://manning.com/panda/&quot;&gt;&lt;EM&gt;EJB3 In Action&lt;/EM&gt;&lt;/A&gt;&lt;SPAN style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;is now available at&lt;/FONT&gt;&lt;A href=&quot;http://www.manning-source.com/books/panda/EJB3_in_Action_Draft_ch_02.pdf&quot;&gt;&lt;FONT face=Geneva,Arial,Sans-Serif size=2&gt; Manning Website&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Geneva,Arial,Sans-Serif&gt;&lt;FONT size=2&gt;. This introduces different types of EJBs: Session beans, MDBs and Entity. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; mso-layout-grid-align: none&quot;&gt;&lt;SPAN style=&quot;FONT-SIZE: 11pt; FONT-FAMILY: AGaramond-Regular; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;FONT face=Geneva,Arial,Sans-Serif&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style=&quot;MARGIN: 0in 0in 0pt; mso-layout-grid-align: none&quot;&gt;&lt;FONT size=2&gt;&lt;FONT face=Geneva,Arial,Sans-Serif&gt;&lt;SPAN style=&quot;FONT-SIZE: 11pt; FONT-FAMILY: AGaramond-Regular; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;Please review and give us your honest feedback.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-FAMILY: AGaramond-Regular; mso-bidi-font-family: &apos;Times New Roman&apos;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;br&gt;
      </description>
			<guid>http://radio.weblogs.com/0135826/2006/05/15.html#a202</guid>
			<pubDate>Mon, 15 May 2006 12:04:42 GMT</pubDate>
			<comments>http://radiocomments2.userland.com/comments?u=135826&amp;amp;p=202&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0135826%2F2006%2F05%2F15.html%23a202</comments>
			</item>
		</channel>
	</rss>
