95 questions
0
votes
0
answers
45
views
Why Stateful bean is showing the opposite behavior
I am getting different instances (on clicking Test then going back and repeating) of the Demo. I was expecting the same instance. Can someone explain what I am missing here?
Bean
@Stateful
@LocalBean
...
0
votes
1
answer
156
views
How can I reach JSF @Singleton Bean from inside @SessionScoped Bean and vice versa?
My purpose is to have a @Singleton class which runs automated scheduled methods throughout the application on a cloud server. But I also have @SessionScoped beans which I would like to communicate ...
0
votes
1
answer
52
views
Java EE Entity session bean best practices and where to find them - Where does a retrieveAfromB method go to?
This may not entirely be an appropriate question to ask, but why not I'm curious and I do not know the right places to look for these answers (If y'all have links to said places please do drop them ...
0
votes
0
answers
334
views
Cannot resolve reference Local ejb-ref. Communication between 2 EJB modules
I have 2 EJB modules and I want to make communication between them.
EJB module has EB (Entity Bean) and SB (Stateless Sesssion Bean) (With Local Facades)
EJB module has a simple public class Test ...
0
votes
1
answer
213
views
How to keep a bean alive for the through session accessible from filter and EJB
I am trying to set a property to a bean ModelBean in a Filter and access this property in a JSF controller IndexController.
The ModelBean is annotated @SessionScoped and it is used in the filter and ...
0
votes
1
answer
130
views
which way is best and worst to find and display customer lived in newyork? stateful or stateless or singleton?
I am trying to get the number of customer who lived in newyork and display on my page. But some doubt in my mind, which way is best to worst, Like stateless, stateful and singleton ejb? Any idea, ...
-2
votes
1
answer
423
views
What is the default type of a Session Bean?
I was reading best practices related to JavaEE APIs and came across a suggestion to use @Stateless and @Path together to make thread safe. That prompted me to inquire that when we do not mention ...
0
votes
1
answer
869
views
Java EE Transactional Type across various types of Beans
Consider the following scenario :
Stateless Annotated Class ClassOne
@Stateless
public class ClassOne {
// some injected fields
// ....
@Inject
private ClassTwo classTwo;
// ....
...
2
votes
1
answer
1k
views
Set / Get JSessionID - Proxy blocks set-cookies attribute
I got a problem using the Angular-Proxy to get/set the JSessionID for a @SessionBean. (What is usually handled by the Browser?)
I´m trying to send the Request from localhost:4200 to localhost:8080. To ...
0
votes
0
answers
50
views
How do replicate a "Session Bean" in a Java SE context?
I'm developing a java SE application containing a single main class inside a Maven module.
The main class invokes classes contained in another Maven modules.
I would like to have an instance of java ...
1
vote
0
answers
47
views
unable to invoke server2 EJB via server1
I want to invoke server2's EJB via server1, but still received by server 1.
Look at my cliet code & screenshot
test1 & test2 is ok
test3 is fail
Does anyone know how to do? thanks
Server:...
1
vote
0
answers
379
views
How to call an entity class inside servlet in JEE. Beginner JEE programer
Im trying to use an entity class on my code but im getting "exception
java.lang.NoClassDefFoundError:" exception.
My student entity class:
package entity;
import java.io.Serializable;
import javax....
0
votes
1
answer
724
views
Netbeans - storing username in the session bean?
I am currently trying to pass the username to a servlet in netbeans. The username is input in the login, such that
<input type="text" name="username">
I then access this username in servletA ...
0
votes
0
answers
723
views
Entity class not found error
Im new to java EJB ,Im getting this erro. i think its regarding entity class. can some one help me to fix this issue, thanks a lot.
Warning: StandardWrapperValve[registrationsServlet]: Servlet....
1
vote
1
answer
603
views
JAX-RS on EJB 3.1 Session Bean which only has Remote Interface
Can I use JAX-RS annotations like @Path on an EJB 3.1 session bean which only has a remote interface?
This works:
@Path("/service")
@Stateless
public class ServiceOne {
@POST
@Path("/foo")
...