ejb

sessionscoped managed bean vs stateful ejb

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-28 11:57:08
问题 If I have a @ManagedBean that's @SessionScoped , why would I use a @Stateful EJB? I used it before for shopping carts and maintaining a conversational state, but since a managed bean will be kept during the user session I can store state there, then call SLSB for bussiness logic. Is that correct? If it is, then stateful ejbs will be left for more specific applications such as when you need transactions etc? 回答1: Very often stateless session beans can be used for a lot of business problems.

JPA is'nt able to create ( persist ) an EJB

青春壹個敷衍的年華 提交于 2019-12-25 16:55:52
问题 Now two days trying to fix this problem. The problem seems to come from the DAO class. Caused by: projet.helpdesk.dao.DAOException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLSyntaxErrorException: ORA-02289: sequence does not exist Error Code: 2289 Call: SELECT SEQ_GEN_IDENTITY.NEXTVAL FROM DUAL Query: ValueReadQuery(sql="SELECT SEQ_GEN_IDENTITY.NEXTVAL FROM DUAL")

Get EJB object inside rar deployed inside jboss

余生颓废 提交于 2019-12-25 14:48:45
问题 I have an activemq broker deployed within my jboss server. activemq is deployed as a rar file placed in jboss standalone/deployment repository. An other project is also deployed within my jboss as an ear file. This last is exposing some ejb objects in my jboss. I tried to get an ejb from a jar file that I put into my activemq rar file. A class placed within the jar is called when I connect a client to the broker. This is how I tried to get ejb within jar file: Context ctx; Properties

Inject EJB into JAX-RS 2.0 subresource when subresource is got via ResourceContext

断了今生、忘了曾经 提交于 2019-12-25 12:52:48
问题 I am using Jersey 2.8 with Glassfish 4.0. I have a resource locator class which looks like below @Path("/") @ManagedBean public class MyServiceLocator { @Context ResourceContext rc;//javax.ws.rs.container.ResourceContext @EJB private MyEJBHome myEJB; @Inject//javax.inject.Inject MySubService mss; @Path("/mysubservice") public MySubService getMySubService() { return rc.getResource(MySubService.class); //also tried return rc.initResource(new MySubService()); } } and a sub resource class which

Inject EJB into JAX-RS 2.0 subresource when subresource is got via ResourceContext

跟風遠走 提交于 2019-12-25 12:51:27
问题 I am using Jersey 2.8 with Glassfish 4.0. I have a resource locator class which looks like below @Path("/") @ManagedBean public class MyServiceLocator { @Context ResourceContext rc;//javax.ws.rs.container.ResourceContext @EJB private MyEJBHome myEJB; @Inject//javax.inject.Inject MySubService mss; @Path("/mysubservice") public MySubService getMySubService() { return rc.getResource(MySubService.class); //also tried return rc.initResource(new MySubService()); } } and a sub resource class which

EJB client context selector may not be changed

情到浓时终转凉″ 提交于 2019-12-25 10:31:08
问题 I am trying to access an ejb that is exposed in jbossAS7.1 from code running in an embedded jetty server: final Properties jndiProperties = new Properties(); jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); jndiProperties.put(Context.PROVIDER_URL, "remote://127.0.0.1:4447"); jndiProperties.put("jboss.naming.client.ejb.context", true); jndiProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT",

Override Spring jar in Weblogic 12c

让人想犯罪 __ 提交于 2019-12-25 08:48:42
问题 We have been facing an issue while overriding the Spring jar in Weblogic 12c. Basically we need to write a bean based on some 3rd party API calling their interfaces. Now they use Spring 2.5 jar for their own implementation. Since Weblogic inherently supports Spring 3.0 jar. As a result when we write our bean wrapping their interfaces and deploy it, it doesn't work. We replicated the issue by replacing Spring 2.5 jar with Spring 3 in local environment. If we modify the server classpath to load

How does a web server/container treat a POJO in respect to other classes like EJB's and Entities?

社会主义新天地 提交于 2019-12-25 08:23:34
问题 I'm trying to use plain old java objects(POJO)'s and regular class files where needed and only use EJBs when I need the functionality that they add such as asynchronous calls, pooling, etc. I'm wondering how the server treats this behavior once the project is deployed on a server. Since it is not managed by the container does a new instance have to be created for every stateless session bean pooled that might call one of it's methods? How do things like static methods or state affect this

Websphere 6.1: Issue in Multiple Cells Call using IIOP

北战南征 提交于 2019-12-25 07:47:55
问题 Need some help with below issue We have 2 machines, each of these machines has 2 websphere cells installed in it. Machine 1 (X1 and X2 cell) Machine 2 (Y1 and Y2 cell) We have web application installed on X1 cell, which has EJB client component, which invokes business methods on EJB component installed on each of 4 cells i.e. X1 , X2 , Y1 and Y2. EJB client component look-ups the home interface using IIOP URL look-up, using InitalContext class. Communication of EJB client component with B1

Why does a remote EJB Call throw a org.jboss.remoting.serialization.ClassLoaderUtility Exception?

£可爱£侵袭症+ 提交于 2019-12-25 06:48:15
问题 I have a login module which calls a remote EJB (JBOSS 5.1) to get a javax.security.auth.Subject: public Subject getSubject (String a, String b) throws FailedLoginException On the remote side the subject is filled as follows: MyOwnPrincipalInterface principal = (MyOwnPrincipalInterface)new MyOwnPrincipalImpl("name"); subject.getPrincipals().add(principal); The client always throws a Exception: ... Caused by: java.lang.ClassNotFoundException: my.packages.MyOwnPrincipalImpl org.jboss.remoting