ejb

Database Communication in JSF/EJB (theoretically) [closed]

女生的网名这么多〃 提交于 2019-12-23 06:28:07
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I'm currently writing my diploma thesis and I'm stuck at the Database Communication topic. My problem is not the implementation, but rather the architecture behind JSF . I read a lot about it, but don't really

Same stateless bean in two ears

无人久伴 提交于 2019-12-23 06:07:33
问题 I have the same EJB module with a bean inside an EAR that is server side and an EAR that is the client side. Can I have this situation? Because I'm getting this error http://justpaste.it/gfs3 without understand how to fix it. 回答1: You have answer in the stack trace: The short-form default binding 'com.demo.view.RitornaPersonaRemote' is ambiguous because multiple beans implement the interface : [RitornaPersonaSenzaClientEAR#RitornaPersonaSenzaClient.jar#RitornaPersona,

how to commit a transaction in EJB?

余生颓废 提交于 2019-12-23 05:47:11
问题 I have the following scenario, public void someEjbMethod1() { for (int i=0; i=10; i++) { em.merge(arr[i]); em.flush(); } } I need to merge each object of ( arr[i] ) separately. as the above code will commit all the arr[i] instances at the end of the function. I am thinking to do the following: public void someEjbMethod1() { for (int i=0; i=10; i++) { saveObj(arr[i]); } } // should I use a transaction attribute here?? public void saveObj(SomeObject obj) { em.merge(arr[i]); em.flush(); } 回答1:

TomEE on eclipse, How to call a remote EJB from a JSF Managed bean?

我的未来我决定 提交于 2019-12-23 05:25:30
问题 I want to have JSF 2.0 page in one instance of TomEE server calling a Remote EJB running under a different TomEE server, (both obviously running on different ports). This is what I have done in eclipse... AppEJB - is a EJB project that contains all the ejb code. AppEJBInterfaces - This project contains all the remote interfaces, the idea is that this jar will be added to the class path of the web application project containing JSF front end. AppWeb - is the Dynamic Web Application project

Error on client side while calling a business method on server side returning managed entity

北慕城南 提交于 2019-12-23 05:15:58
问题 My client application is a standalone java application using Netbeans RCP. The client application connect to a remote EJB mounted on a Glassfish server. On the server side, i have a business method (i made for testing) that's supposed to take an instance of an entity (this entity is not persisted or managed yet), persist it (using the persit of the EntityManager ). Here is how this method looks like: @Override public TestLinkEntity test(TestLinkEntity c) { em.persist(c); return c; } Called

Correct Usage of Stateful Session Bean in EJB

风流意气都作罢 提交于 2019-12-23 03:29:10
问题 I am trying to construct a test website that display various information about a student with JSF 2.0, EJB 3.1 and JPA 2.0. After a student login, the student can browse different pages for displaying different kind of information, which is what a usual registration management system does. Say displaying a timetable according to enrollment information in one page, and display the assignments in another page. Information that will be displayed include attributes of the student, mapped entities

Create EJB with two interfaces. @Local interface for web module and @Remote interface for local app client

可紊 提交于 2019-12-23 03:11:55
问题 I have a EAR package that contains a web module and EJB. The EJB is currently exposed its contains to local app client via Remote interface @Stateless public class CoreEJB implements CoreEJBRemote { @PersistenceContext(unitName = "CoreWeb-ejbPU") private EntityManager em; @Override public void packageProcess(String configFileName) throws Exception { //Process logics } @Override public <T> T create(T t) { em.persist(t); return t; } @Override public <T> T find(Class<T> type, Object id) { return

PrimeFaces Chart From Database

百般思念 提交于 2019-12-23 01:40:09
问题 I already have a CRUD webApp (JSF+EJB+JPA) and I'm trying to develop a chartBean class so I can use it in the View layer. The data to be rendered (through Primefaces-4 BarChart) should be read from a database. In the Chart, I have 2 chartSeries to be displayed: chartSeries1: the employeeGoal -> the 'valor' float column mapped in the Orc entity class below; chartSeries2: the employeeAccomplished -> the 'Realizado' integer column mapped in the hr_capacit30h entity class below. The X-Axis should

Can't get Remote EJB to work with EJB Client API on Wildfly

旧城冷巷雨未停 提交于 2019-12-23 01:36:22
问题 I'm currently struggling with getting remote EJB invocation to work on wildfly (8.x and 9.x). In detail it's about remote invocation from a standalone client application (not from another app server) using the EJB Client API approach. The remote naming approach works for me but isn't applicable in my scenario because I need to use client-side interceptors for passing context data to a server-side interceptor for the remote invocations. But for now I try to get remote invocations with the

Java injection inside @Asynchronous bean

徘徊边缘 提交于 2019-12-22 18:34:24
问题 I have 2 beans that use Injection to "pass" UserData info that is extracted from HttpRequest . If I remove @Asynchronous from WorkerBean then its all working and WorkerBean can access UserInfo thats injected down. However if I use @Asynchronous on WorkerBean then injection stops working. What is the best way to manually create/pass UserInfo into WorkerBean if it has to be asynchronous? // resource class @Stateless class MainRs { @Context protected HttpServletRequest request; @Inject protected