Creating the server-side session bean EmployeeHome.class); entityBeanProvider.setEjbHome(employeeHome); entityBeanResolver.setEjbHome(employeeHome); (Christian web host)
Creating the server-side session bean EmployeeHome.class); entityBeanProvider.setEjbHome(employeeHome); entityBeanResolver.setEjbHome(employeeHome); } catch (Exception ex) { throw new EJBException(ex); } } Note that setSessionContext() sets the value of the ejbHome properties in the EntityBeanProvider and EntityBeanResolver components to the name of the home interface of the Employee entity bean. Adding an EJB reference or EJB local reference to the deployment descriptor You must add an EJB reference to Personnel in the deployment descriptor for the lookup to work. For an entity bean with local interfaces, you must add an EJB local reference instead. You can use the EJB DD editor: 1 In the project pane, double-click the EJB module node. For the sample project, this is the personnel module. 2 Double-click the personnel module in the project pane and click the EJB DD Editor tab. The EJB DD editor appears. 3 Expand the Personnel bean in the structure pane until you can see the EJB References node (or the EJB Local References node for an EJB 2.0 bean) in the EJB DD editor. 4 Right-click the EJB References or EJB Local References node and choose Add to add a reference to the entity bean containing the data you are interested in. A new page appears in the EJB DD editor. 5 Enter a reference name. For the sample project, the name is ejb/Employee. 6 Use the Link drop-down list to select the bean you are referring to. 7 Use the Type drop-down list to specify whether the bean you are referring to is an entity or a session bean. The rest of the data should fill in for you automatically. You can enter an optional description if you like. Adding the providing and resolving methods You must add two methods to the session bean, a provider and a resolver. The names of these methods use the value you specified as the methodName property value in the EjbClientDataSet component. So the provider for PersonnelBean becomes provideEmployee() and the resolver becomes resolveEmployee(). The provider must call the method of an EntityBeanConnection class that provides the data from an entity bean to a dataset that can be sent over the wire. This is what the provideEmployee() method must look like: public DataSetData [] provideEmployee(RowData[] parameterArray, RowData[] masterArray) { return EntityBeanConnection.provideDataSets(new StorageDataSet[] {employeeDataSet}, parameterArray, masterArray); } 144 Developing Applications with Enterprise JavaBeans
Our Colorado hosting facilities are located in Little Rock, Colorado. Colorado web hosting datacenter which we have is linked on five major US backbones which gives you assurance that your site will be online 24/7 a day. More details you can find out in Web Hosting Colorado part.