Skip to content
Advertisement

Tag: ejb

Getting javax.servlet.ServletException: javax.naming.NamingException: Lookup failed for ‘java:global/ShoppingCart-1.0-SNAPSHOT/ShoppingCartRemote’

I am new to JAVA EE. I am trying to implement stateful session Bean via IntelliJ IDEA and glassfish server 4.0 while running the code getting below exception. Attaching the code and glassfish configuration as well. Error is coming as the lookup has been failed. Can anyone help regarding the lookup? Glassfish Configuration Remote Interface Stateful Session Bean JSP Code

Interface CDI wildfly external projects

So my idea is to have 3 projects: com.tests.interfaces com.tests.services com.tests.schedulers com.tests.interfaces basically is: com.tests.services is: I am deploying the “services” project and it works fine using wildfly 24.0.0. Then I am trying to have another .war project called: com.tests.schedulers which looks like this: But it cant be deployed and this is the relevant part of wildfly’s (same server to

@RequestScoped + new thread

We use javaEE RequestScoped with OpenLiberty and new threads via EJB @Asynchronous. I am just curious what the actual value comes from when we inject RequestScoped bean inside a new thread? Will the RequestScoped bean be freshly initialized? Or will it be pulled from the latest request? Answer In OpenLiberty, you’ll get a new request scope every time you make

TOMEEE – Can’t lookup ejb

I have implemented a basic EJB Object in my code. Then I created a jar for this ejb. The jar file contains: package containing the ejb classes (home interface/remote bean interface/bean implementaion) META-INF folder containing the ejb-jar.xml ejb-jar.xml Then I deployed the EJB by placing the jar in webapps folder and from the server logs it seems to have been

UserTransaction jndi lookup failed when using CompletableFuture

I have a code which does context lookup to get UserTransaction JNDI as ctx.lookup(“java:comp/UserTransaction”). When I run this code without using CompletableFuture, it works as expected. When working with CompletableFuture in async thread, it gives exception saying jndi lookup failed. I tried to check if I can get the required JNDI from global scope, but no luck. Answer The problem

Jboss (6.4 EAP) to WebSphere (7.x)

I am attempting to make a EJB call from Jboss (6.4 EAP) to WebSphere (7.x). I have a working example from WebSphere (WAS) to WAS, however, the same location and lookup name returns a name not found exception. I’m currently doing this testing inside of a web application deployed as a WAR into Jboss. I do not have the EJB

Selecting class by Maven build profile

I am quite new to Maven and Java EE programming all-together. I would like to create a stub class for authentication testing which should be activated in the default Maven build profile. Currently I have two classes with same name but in different packages. Is it possible to somehow select the correct class to use in the build phase by

Advertisement