Create the InheritanceClient a standalone Java test client as described in Writing A Standalone Java Test Client section:
Source folder: InheritanceHierarchies/src
Package: by.iba.client
Name: InheritanceClient
Check the public static void main method checkbox.
Copy-paste the following code in the method:
try { Context jndiContext = new InitialContext(); Object ref = jndiContext.lookup("ManagerBean/remote"); Manager manager = (Manager) PortableRemoteObject.narrow(ref, Manager.class); manager.populate(); } catch (NamingException ne) { ne.printStackTrace(); }
NOTE: To resolve imports problems press Shift + Ctrl + O. Press Ctrl + S to save the Java class.
Run the Java class (as Java application). New entites had been created and persisted in database.
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |