2 * Copyright (C) 2017 RRoland Häder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.addressbook.beans.business.employee;
19 import javax.annotation.PostConstruct;
20 import javax.enterprise.context.RequestScoped;
21 import javax.faces.view.facelets.FaceletException;
22 import javax.inject.Named;
23 import javax.naming.Context;
24 import javax.naming.InitialContext;
25 import javax.naming.NamingException;
26 import org.mxchange.addressbook.beans.BaseAddressbookController;
27 import org.mxchange.jcontactsbusiness.employee.AdminCompanyEmployeeSessionBeanRemote;
30 * A request-scoped bean for administrative purposes for company employees.
32 * @author Roland Häder<roland@mxchange.org>
34 @Named ("adminCompanyEmployeeController")
36 public class AddressbookAdminCompanyEmployeeWebRequestBean extends BaseAddressbookController implements AddressbookAdminCompanyEmployeeWebRequestController {
41 private static final long serialVersionUID = 12_886_968_547_360L;
44 * EJB for administrative company employee purposes
46 private AdminCompanyEmployeeSessionBeanRemote adminCompanyEmployeeBean;
51 public AddressbookAdminCompanyEmployeeWebRequestBean () {
52 // Call super constructor
57 * Initialization method
63 // Get initial context
64 Context context = new InitialContext();
67 this.adminCompanyEmployeeBean = (AdminCompanyEmployeeSessionBeanRemote) context.lookup("java:global/addressbook-ejb/adminCompanyEmployee!org.mxchange.jcontactsbusiness.employee.AdminCompanyEmployeeSessionBeanRemote"); //NOI18N
68 } catch (final NamingException e) {
70 throw new FaceletException(e);