problem with stateless session bean

Hello

I don't know if this is the right forum for this discussion. I have not found the answer elsewhere. In any case, here's my problem

I have a java client (main program) calling a remote SLSB by a search

[CODE]

int choice = 1;

String viewClassName = LibrarySessionBeanRemote.class.getName ();

LibrarySessionBeanRemote libraryBean = (LibrarySessionBeanRemote) ctx.lookup ("LibrarySessionBean EJBTutorial/EJBTutorialEJB / /!") (+ viewClassName);

While (choice! = 2) {}

String bookName;

showGUI();

String strChoice = brConsoleReader.readLine ();

choice = Integer.parseInt (strChoice);

If (choice == 1) {}

System.out.Print ("enter the name of book :");

bookName = brConsoleReader.readLine ();

libraryBean.addBook (bookName);

} else if (choice == 2) {}

break;

}

}

List < String > booksList = libraryBean.getBooks ();

System.out.println ("book seized until then:" + booksList.size ());

for (int i = 0; i < booksList.size (); ++ I) {}

System.out.println ((i + 1) + "". "") + booksList.get (i));

}

[/ CODE]

Before I do my research, I have run a dozen threads that call a servlet. Each servlet contains an instance of my SLSB

[CODE]

@WebServlet (name = "ServletCallSessionBean", urlPatterns = {"/ test"})

SerializableAttribute public class ServletCallSessionBean extends HttpServlet {}

@EJB (nomBean = "LibrarySessionBean")

Private LibrarySessionBeanLocal monBean;

protected void processRequest (HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {}

response.setContentType("text/html;charset=UTF-8");

PrintWriter out = response.getWriter ();

monBean.getBooks ();

System.out.println ("WAITING for DEBUT");

try {}

Thread.Sleep (300000);

} catch (InterruptedException e) {}

Generative TODO catch block

e.printStackTrace ();

}

System.out.println ("WAITING for the END");

PrintWriter out = new PrintWriter (response.getOutputStream ());

try {}

out.println ("< html >");

out.println ("< head >");

out.println ("< title > Servlet MaServlet < /title >");

out.println ("< sandwiched >");

out.println ("< body >");

out.println ("< juncture >");

out.println ("< /html >");

} {Finally

out. Close();

}

}

@Override

protected void doGet (HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {}

processRequest (request, response);

}

@Override

protected void doPost (HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {}

processRequest (request, response);

}

@Override

public String getServletInfo() {}

return "my test servlet;

}

}

[/ CODE]

This SLSB has a shelf of List < String > attribute.

[CODE]

@Stateless (name = "LibrarySessionBean")

@Local (LibrarySessionBeanLocal.class)

@Remote (LibrarySessionBeanRemote.class)

@LocalBean

public class LibrarySessionBean {}

virtual library from the list < String > private;

/**

* Default constructor.

*/

public LibrarySessionBean() {}

TODO auto-generated constructor stub

System.out.println ("object this.toString =" + this.toString ());

System.out.println ("constructor called LibrarySessionBean");

virtual library = new ArrayList < String > ();

}

{} public void addBook (String bookname)

System.out.println ("object this.toString =" + this.toString ());

System.out.println ("addbook called");

bookShelf.add (bookname);

}

public List < String > getBooks() {}

System.out.println ("object this.toString =" + this.toString ());

System.out.println ("getBooks called");

return the shelf;

}

}

[/ CODE]

When I add a book on the client side in the main program (see the red part of the code) and when I inspect my book list (debug) is not in

I know it's a SLSB (stateless), but immediately after the addition of a book, the book should be in the list. When I'm not running the dozen threads before, the book is in the list

You have an idea? Thanks in advance for your answers.

Hello again,

I finally understood the general problem.

When you perform a search remotely on a SLSB as a client, the server side send a proxy. When you use a method on the proxy, the server will use a random pool SLSB.

When I was doing 2 successive calls on the client side, the pool side server was a size of a SLSB and I used the same SLSB with her own State. When I create SLSB 15 with 15 different thread, and subsequently, I search remote, the proxy will invoke one of the SLSB of the pool which is made of now several instances (in my case, 13). The SLSB used by search will be random among instances of pool-(13 in my case). The discussion has been resolved.

Tags: Java

Similar Questions

  • Does container managed entity manager is thread-safe in stateless session bean?

    Hello

    I have read JEE6 doc and confused with

    Manager managed entity containing does (injected by PersistenceContext annotation) is thread-safe in bean of stateless session in env mutiple-thread?

    See code below, if there are 2 requests to stateless session bean in 2 concurrent threads, is it using the same Instance of the managing body or not?

    @Stateless (name = "HRFacade", mappedName = "HR_FACES_EJB_JPA-HRFacade-HRFacade")

    / public class HRFacadeBean implements HRFacade, HRFacadeLocal {}

    @Resource

    SessionContext sessionContext;

    @PersistenceContext (unitName = "HRFacade")

    Private EntityManager em;

    public places (places sites) persistLocations {}
    EM. Persist (rentals);
    return places;
    }

    public places (places sites) mergeLocations {}
    Return em.merge (rentals);
    }

    {} public void removeLocations (places sites)
    location = em.find (Locations.class, locations.getLocationId ());
    EM. Remove (rentals);
    }

    / * < code > o selection of the places where < code > * /.
    @TransactionAttribute (TransactionAttributeType.NOT_SUPPORTED)
    public list < location > getLocationsFindAll() {}
    Return em.createNamedQuery ("Locations.findAll", Locations.class) .getResultList ();
    }

    }

    Yes its safe. Stateless beans would be useless if it wasn't the case. That's the bit of "controlled container" description, as long as you leave the container do its job, you don't have to worry about such details.

  • Problem with kill session

    Hello

    I want to kill one of my session and I can't :/ I paste this query:
    SELECT sid, serial #, osuser, program, server, machine FROM v$ session;

    Find the sid and serial # my process and carry out this change the command:
    alter system kill session '544 793';

    So, I can see this output:
    change kill system succeeded.

    But once retype selected first, I still have a trial '544 793'?
    Might explain my why?

    Tutu wrote:
    I don't have the privileges to kill the process level OS :/ That from database. But what this process is KILLED? She still exists in the database, is not it.

    Yes, the process is still in the database, using the amount of space between the sessions and processes and other resources of the system as well.
    There may be several reasons for this:
    1 session remains in this status as asociated process is not killed, for example session expected SQLNet client message. Customer at the moment would be an activity that he would receive the error and the session would leave.
    2 PMON can do sometihng with this session. Doing little cleaning, then kill is issued and this session remains for some time.

    In order to get rid of this session - ID opsystem kill command. If do not have rights - you ask someone who has.

  • Hello, I have a big problem with Firefox: Session Manager &amp; Undo Closed Tab addons don't work, synchronization is not working do not. The story works. How to solve this problem?

    Firefox remembers the story, but doesn't remember the closed tabs, sessions.
    It happened after the Fox update to v. 19.0.2 on a single computer.

    In Options of Firefox is set to use Custom Settings For History, everything is checked except always use Private Browsing Mode. So I'm not in private browsing.

    When I press to Undo Closed button nothing happens, & in the Manager session Save Session button is grayed. I tried to install other add-ons that remembers the tabs. tried to reinstall/disable these 2 modules. Did ' t help. On my 2nd computer I have same modules, same settings and they work normally. the 3rd closed computer undo works tabs also. How to solve this problem? I decided to ask before Firefox Reset...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    

    Sync is a separate issue. It works, but quite often it connects me sync account. Then I can connect only using the recovery key password and long (option choice I have no device with me because he does not accept the key to pairing device).

    Thanks for reading.

    In case you use "clear history of Firefox closing:

    • do not erase browsing history

    Note that compensation "Preferences of Site" clears all exceptions for cookies, images, windows pop up, installation of software and passwords.

  • problems with hearing session

    Hi, my audition multitrack session Don t I would like to work with keyframes in the timeline, the last time it works, someone has had this problem before?

    You have, in the menus, multitrack > Enable clip keyframe editing enabled?

  • Export of database Session Bean (J2EE 1.4)

    Hello people,

    I try to implement a download of large files for end users, the data are extracted from a database.

    Configuration and Description of the problem:
    ----------------------------------------

    A J2EE 1.4 stateless Session Bean record-wise reads data from a large database table, generates a string of each record and adds the string in a text output for the download stream. The steps involved are (in pseudocode):

    For each record in the database table:
    1.) apply business logic to record data (formatting of numeric values, etc.)
    2.) Accumulate record data in a single string.
    3 writing string.) to an OutputStream

    When finished: download a file over HTTP to the end user.

    The processed data are very large (resulting text file will be 200-1500 MB), I think go with water courses is a feasible solution. An attempt at the interface of Bean Session would be:

    public OutputStream exportDb() {...}

    My problem is: inside the exportDb method, I implémenterai the algorithm described above, but this means that the whole issue will take place in the memory object (in the OutputStream). The download will be executed by a ServletOutputStream. How can I export the database table one recording by the other without implementing the logic of all its activities in a Servlet? The only way I can think is a variant of the Session Bean method that takes the ID of the record that must be treated as a parameter and executes the method in a loop in some servlet code:

    ....
    Somewhere in the Servlet
    OS = getServletOutputStream;

    for (int i = 1; i < nrOfRecords; ++ I) {}
    OS. Write (exportDb (i));
    }

    Is there else any solution "clean"?

    Assuming that you are working with a local ejb, you pass the OutputStream in the method, for example "exportDb (OutputStream out)" and move the outputstream servlet directly to the ejb. If you use a remote ejb, things get more complicated (I wrote a library for broadcasting remotely over rmi, called rmiio, that you can use if you are working with a remote ejb).

  • Why the method in the several times called session bean

    Hello
    I work with Jdev 11 g.
    I created an example Web J2ee Application.
    In the model project, I created:
    1 - entity Bean
    2 - stateless session bean (which contains a method that get the list of username == > em.createNamedQuery("OsaUser.findAll").getResultList ();)

    In the view controller project I created:
    1 - managed bean, session scope, a getter that calls the session bean and retrieve the result of the query.
    2 - a JSF page with af:table element with the value bound to the list in the managed bean.

    When I run the application, the data is displayed, but since I put system.out message I get this message several times.
    When I try to debug the application the breakpoints on the managed bean and session bean are available several times.

    Can you please advice why this happens.
    Concerning
    Emile BITAR

    Hello

    partially, it's the cycle of life and partially a known bug. The method is called during ApplyRequest and RenderResponse. If you check this in your output, so you see that make answer calls at least three times, which is the bug that we set. As a temporary work around, set a flag within the scope of the request (since your bean's scope of session that you use a requestScope attribute). The first time you run, you set the attribute flag. So every time its called again, you check to see if the indicator exists and if ignore the request. Because the flag is set to request scope, you needn't clean it explicitly

    Frank

  • Problem with BBM when

    Hello

    I am facing a problem while developing my BBM app.

    I use BBMPlatformSession to send invitation.

    UserA sends the request to UserB. UserB is attached to it and we have a session in the list and each other.

    UserA-> UserB

    UserB-> UserA

    Now, If UserB sends request to UserC UserC joins, and each user is to have 2 members in the list of contacts of their session. , His work as expected.

    UserA-> UserB, UserC

    UserB-> UserA, UserC

    UserC-> UserA, the UserB

    But, the problem comes when inverter happends, i.e. UserC sends the request to UserB. In this case, each user can see only another user in their contact list.

    UserA-> UserB

    UserB-> UserC

    -> UserB UserC

    I do not know this is the way THAT BBM works or miss what either.

    Thank you

    Sumit.

    Hi Sumit,

    This looks like a problem with the session handling in your application. You can check to see if a session is already established with UserB before allowing the UserB join another session with UserC, or ask us for UserC to join your existing session. TicTacToe sample shows a logic similar to the former, it blocks the second user tries to join and sends a message if a game is already in progress.

    Kind regards

  • [ADF, JDev12.1.3] viewScope bean can not recover sessionScope bean. Why? (How to day uploading of a session bean scope whenever a page with params is called)

    Hallo,

    to the login page of my application, I created a viewScope managed bean loginView.

    In the login page, I put a "dummy" inputText (whose value is related to dummyInitEditValue bean attr) to perform lazy loading of the page itself.

    In the initData() function I call a function of a bean sessionScope connection which should initlialize some of its attributes.

    public class LoginView {
      private Integer dummyInitEditValue;
    
      public LoginView() {
      }
    
      private void initData() {
        Login loginBean = (Login) FacesUtils.getManagedBeanInSession("login"); // loginBean = null !!!
        loginBean.initData();
        dummyInitEditValue = 1;
      }
    
      public void setDummyInitEditValue(Integer dummyInitEditValue) {
        this.dummyInitEditValue = dummyInitEditValue;
      }
    
      public Integer getDummyInitEditValue() {
        // Per lazy loading
        if (dummyInitEditValue == null)
          initData();
        return dummyInitEditValue;
      }
    }
    
    
    

    The problem is that the initData() rises a null pointer exception because the bean connection is not found.

    What's not in my approach?

    I create this hoping to resolve this issue: the login page has 2 URL parameters (defined in his point of view in the config.xml file - adfc) and I have according to them I need to update some of the bean sessionScope uploading connection every time the page is called / refreshes (possibly with new values for the parameters).

    BdW I do not know if there is a better alternative you can advice me.

    Thank you

    Federico

    Well, you need to instantiate bean connection somehow.

    You can try to link an attribute of connection bean to the page and see if this will help or you can try to resolve expression programmatically (something like #{connection}).

    Or you can try adding session bean defined as managed property for your bean view extended (something like this: http://umeshagarwal24.blogspot.ba/2012/09/using-managed-property-to-evaluate.html).

    Dario

  • Sporadic problems with pdf through Citrix session

    We run Citrix XenApp 6.5 with the installed 15.10.20056 CD player.  Sporadically when we launch a PDF through our session, data will not show, but this is.  If you take the mouse and you're trying to highlight, it will then appear and be seen.  If this isn't the case, then the user does not know it is there.  This does not always happen however, and the text will appear without having to highlight something.  We have tried to disable scrolling smoothly and some other items made, but it doesn't seem to make a difference, unless there is a setting I'm missing somewhere?  Any ideas are appreciated.

    Hello

    We did some checking and looked for a solution.

    Finally, we found this setting here in the image:

    In our area is the problem with the display of PDF files in Citrix Envirement

    much better (.. maybe went) if we change this setting on "Immer" (always).

    Can check you in your area too?

    Thanks for your comments!

  • Problem with Session variables

    On page 1, I'll put a session based on a user variable to connect:

    < cfif NOT IsDefined "(SESSION. EmpNo") >
    < cfset SESSION. EmpNo = #Form.HREmpNo # >
    < / cfif >

    On page 2, I call the session variable in a query to a form in advance, it works fine:

    < cfquery name = "qEmpInfo" datasource = "SelfNom" >
    SELECT *.
    OF tblEmployeeList
    WHERE EmployeeNo = #session. EmpNo #.
    < / cfquery >

    On the same page, I give the pre-populated information hidden tags, so I can enter information in a table on the next page. qEmpInfo is the request that I'm hitting successfully with my session variable. Here are my tags:

    #qEmpInfo.EmployeeNo # < cfoutput > < / cfoutput >
    < input type = "hidden" name = "EmployeeNo" value = "" #qEmpInfo.EmployeeNo # "/ >"

    On the 3rd page, where I'm trying to insert information in another table, I am getting an error. Itacts as my session variable is over.

    Error:
    Syntax error in date in a query expression ' #qEmpInfo.EmployeeNo # '.

    I entered this code in page 3 to check and she in the past that I guess because it does not find the session variable:

    < cfif NOT IsDefined "(SESSION. EmpNo") >
    < cfoutput > #session. EmployeeNo # < / cfoutput >
    < / cfif >

    I put my session expires in the admin for 24 hours, so it's not the question. And I turned on the session variables in the Application.cfm:

    < name cfapplication = "SelfNom".
    sessionmanagement = "Yes" >



    Someone sees something I am doing wrong?

    Jatrix wrote:
    > Does someone sees something I am doing wrong?

    Well, the first thing I noticed is this:

    #session. EmployeeNo #.

    'session.empNo' AND ' session. EmployeeNo' are not the same variable. You
    Verify the existence for the first and then try to get out of the second.
    You create a variable named "employeeNo" in your form. It is that the
    the one you want to use here? "form.employeeNo" not "session.employeeNo".

  • Alternative for stateful session bean and timer service

    Hello

    I need to write EJB3.0 service that gathers information from network routers (using the SNMP protocol) every 5 seconds. The ideal solution is to have a number of stateful session beans - each representative a connection with different router. (Stateful EJB holds router IP, port, and other properties necessary to communicate via SNMP). It's easy. Worse is how to force stateful bean to send the request every 5 seconds? As I mentioned earlier, the ideal solution would be to use EJB stateful with timer, but which is forbidden by the EJB specification. Is there a j2ee model solve this problem? I also thought using JMS, MessageDrivenBean cannot hold any conversational State, so this does not solve my problem (EJB so that the stateless person does not work).

    Thank you in advance,
    Piotr

    Well first you do the upgrade to JBoss as JBoss 5.1GA 5.0 and 5.01 are far from stable. You should not get any problem to do the upgrade.

    If you have specific needs of other programming that "do this every time X ' then the Scheduler will not really cut. Quartz is more flexible in this regard, so you could investigate that.

    I have myself developed a calendar service on top of JBoss Scheduler however; you could do something similar (I can't share because I do not have the code). JBoss Planner tells the service of every X minutes check calendar's calendar events that need to be pulled. These events are simply stored in the database and the logic is flexible enough to be able to invoke events once, continuously (whenever the calendar service is called), or at specific intervals (every hour, every day, every day of the week).

    Let's take an example. I have an event that triggers every day at 2:00 pm - so the date field would be set today at December 29, 2010 at 14:00. The calendar service is run by the Scheduler of JBoss at 14:01 and decided to raise this event (active events that are less than 48 hours will be triggered to deal with downtime of server). After that he did his thing, the service updates the event date field by combining the current real date and time of the event and adding 24 hours.

    Still the problem of what to invoke when an event is triggered. In my case, I use JMS here; records of the event have a queue name field to which the service sends a generic object message. I can then implement application specific multilateral development banks that take this message and act on it.

  • Jdev 11g, rename causing problems with deploying

    Hello

    I got the pattern for my for my project all set up with a couple of entity beans, a session bean, and a test client. I ran the test client and it worked fine.

    I decided to change the name of the package of my session bean was under 'business.ticket' to 'business.ticket.session '. To do this, I got the package in the navigation Application click right and select Rename. After it was over, she had changed all my packages to 'business.ticket.session.whatever' which is not what I wanted. Then I tried to change their return and got an error that it already existed for these directories. I went and deleted the files manually. Once I did, I was able to rename packages of what I wanted.

    When I reran the project, although I got the following error...

    [EJB:011023] An error occurred while reading the deployment descriptor. The error was:
    Error during processing of annotations:.'
    weblogic.application.ModuleException: Exception preparation module: EJBModule(ticket-EJBModel-ejb)
    [EJB:011023] An error occurred while reading the deployment descriptor. The error was:
    Error during processing of annotations:
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 1.next(DeploymentCallbackFlow.java:387)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
    Truncated. check the log file full stacktrace
    weblogic.utils.ErrorCollectionException:

    There are 1 nested errors:

    WebLogic.J2EE.DD.Xml.AnnotationProcessException: ejb name 'SIMSessionFacade' found duplicate: annotation "Stateless" bean class business.ticket.session.SIMSessionFacadeBean and annoation 'Stateless' on bean class business.ticket.SIMSessionFacadeBean
    at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(BaseJ2eeAnnotationProcessor.java:1264)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:246)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:192)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandardAnnotations(EjbDescriptorReaderImpl.java:324)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:190)
    at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
    at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1198)
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 1.next(DeploymentCallbackFlow.java:387)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42)
    to weblogic.application.internal.BaseDeployment$ 1.next(BaseDeployment.java:615)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16)
    at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
    to weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$ 000 (DeploymentReceiverCallbackDeliverer.java:12)
    to weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$ 1.run(DeploymentReceiverCallbackDeliverer.java:45)
    to weblogic.work.SelfTuningWorkManagerImpl$ WorkAdapterImpl.run (SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)


    at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(BaseJ2eeAnnotationProcessor.java:1263)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:246)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:192)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandardAnnotations(EjbDescriptorReaderImpl.java:324)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:190)
    Truncated. check the log file full stacktrace
    >
    < 8 May 2009 10:37:17 AM EDT > < WARNING > < hats > < BEA-149004 > < failures have been detected all introducing deploy the task for the application "ticket". >
    < 8 May 2009 10:37:17 AM EDT > < WARNING > < hats > < BEA-149078 > < message 149004 track battery
    weblogic.application.ModuleException: Exception preparation module: EJBModule(ticket-EJBModel-ejb)
    [EJB:011023] An error occurred while reading the deployment descriptor. The error was:
    Error during processing of annotations:
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 1.next(DeploymentCallbackFlow.java:387)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
    Truncated. check the log file full stacktrace
    weblogic.utils.ErrorCollectionException:

    There are 1 nested errors:

    WebLogic.J2EE.DD.Xml.AnnotationProcessException: ejb name 'SIMSessionFacade' found duplicate: annotation "Stateless" bean class business.ticket.session.SIMSessionFacadeBean and annoation 'Stateless' on bean class business.ticket.SIMSessionFacadeBean
    at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(BaseJ2eeAnnotationProcessor.java:1264)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:246)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:192)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandardAnnotations(EjbDescriptorReaderImpl.java:324)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:190)
    at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
    at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1198)
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 1.next(DeploymentCallbackFlow.java:387)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42)
    to weblogic.application.internal.BaseDeployment$ 1.next(BaseDeployment.java:615)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16)
    at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
    to weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$ 000 (DeploymentReceiverCallbackDeliverer.java:12)
    to weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$ 1.run(DeploymentReceiverCallbackDeliverer.java:45)
    to weblogic.work.SelfTuningWorkManagerImpl$ WorkAdapterImpl.run (SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)


    at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(BaseJ2eeAnnotationProcessor.java:1263)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:246)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:192)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandardAnnotations(EjbDescriptorReaderImpl.java:324)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:190)
    Truncated. check the log file full stacktrace
    >

    Thanks for any help

    The features of refactoring in JDev 11 g generation 5188 are unfortunately borked and should not be used in my opinion. I hope that fixed in the next version. If you have the time to create a simple test case to reproduce the problem, it introduced with Oracle's Support.

    Kind regards

    CM.

  • To access the Session Bean?

    Hello

    With the help of Jdev 11.1.1.7.0. mrequirement is I need to access session Bean on the Module of the Application.


    so I use this way in my implementation of the application module class .

    SessionBeanClassName sessionBeanClassObject is JsfUtils.getManagedBean ("recorded in the adfc-config sessionBeanName").

    I can able to access via the module of the application.

    My question is:

    1. is this good sense?

    2. No Impact on this approach?

    3. is this a good practice?

    4 is one way to access the variable from Session Bean on the application module.

    Thank you.

    Q2) the impact is that you break the mvc pattern and therefore the model of coupling to the display. Later, this can be a problem because your application doesn't fit. Add pass you ui state model (am) you might encounter problems when querying comes into play.

    Sample of Q4) Chris did not access to a bean in scope session leave an application module, but how to get there from an another view layer bean.

    Joel Ramamoorthy-Oracle and Cvele_new_account and myself you asked before, without a real use case all we can say is: don't access scope the model layer session bean.

    Timo

  • Stateful session bean store module in EJB?

    Hello

    I want to use my EJB Stateful Session Bean (SFSB) module. But it seems that I can't use it because I should not inject my SFSB to a managed bean, or message driven bean (because if I do, the SFSB is communicated to all customers)

    I found that the proposed solution is to store SFSB in HttpSession.

    I'm doing this way, but I have null pointer exception.
    HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(true); 
    So, how can I do this in the EJB module?

    Thank you

    Well me: hardly. Generally there is a web layer involved with a perfectly good session (or conversation) in what state can be maintained.

    Alas, you don't want to not seem to really say what is on your mind with or without my eyes so I'll offer just a hunch I have. A stateless bean remains "active" that as long as you keep a connection active IE. the reference that you are looking for or inject into your client code. The 'storage in the session bean' you refer to your first post is the Act of perpetuating the bean; as long as the reference is stored in the session you can continue to use it for the same customer without being cleaned by the container. However: when you are working from a web layer there is not a lot of use for a stateful bean because you can simply use the session itself directly to keep the substance. His personal preference if you use them or not really.

    Where you were going wrong in your initial post, is that you get the the HTTP session object in your EJB code. But you probably already figured out for yourself.

Maybe you are looking for