Can we implement "Service Locator" in Stateless Session Bean??

Hi,
My enterprise application is using Stateless Session Bean. To increase the performace , I think of implementing "service Locator" pattern so as to cache the EJBHome objects in order to avoid looking up Home object every time. I want to know whether this will work out in case of stateless session bean??
Thanks for ur help.

Hi,
The purpose of service locator is to abstract the lookup of the server side services like ejb and DSNs. It should be a normal java class but as such there is no such restriction. You can have a look at the service locator patter at the j2ee blue prints.
/Ashwani

Similar Messages

  • Can we call a method in stateless session bean ?

    Can we call a method in stateless session bean in onMessage method?

    Hi,
    The purpose of service locator is to abstract the lookup of the server side services like ejb and DSNs. It should be a normal java class but as such there is no such restriction. You can have a look at the service locator patter at the j2ee blue prints.
    /Ashwani

  • Can Entity Bean with Home Business Method replace Stateless Session Bean?

    Since Entity Bean can have business methods in the Home Interface, can we use Entity Bean with Home Business Methods to replace Stateless Session Bean?
    I am assuming we can get better performance by doing this since the overhead of creating Component Object can be avoided as compared to stateless session beans.

    Requires-new makes the container start a new transaction. Only use that flag
              at the point that you are certain that a NEW transaction should BEGIN. I
              suggest you use Required as your default for all methods in the application,
              and only change that to anything else when you are certain that you should.
              Peace,
              Cameron Purdy
              Tangosol Inc.
              << Tangosol Server: How Weblogic applications are customized >>
              << Download now from http://www.tangosol.com/download.jsp >>
              "A.J,LEE" <[email protected]> wrote in message
              news:3ba5adb2$[email protected]..
              >
              > I find it result in "dead lock"
              > when I call RequiresNew attributed CMP method in session Bean.
              > Then, Is it possible to use CMP which is set with "RequiresNew"
              transaction attribute?
              >
              > I Wonder why.
              >
              > Thanx in advance.
              

  • Implementing Web Service with Stateless Session Bean

    I have a web service that I've built using the WorkSpace Studio tools (create a WSDL, generate the Java code from the WSDL, fill in the skeleton methods in the service implementation class). This service is deployed as a web module within an EAR to WebLogic Server 10.0 and is working great as a web service.
    I'd like to be able to also call the operations on this service via an EJB interface (from a different application on the same server). I followed the guidelines for adding EJB annotations to the web service implementation class (from [http://edocs.bea.com/wls/docs100/webserv/jws.html#wp215790]). I added the @Session annotation to the class, implemented javax.ejb.SessionBean, and added the ejbXXX() methods. This all makes perfect sense, and looked like it was going to work. However, WorkSpace Studio now gives me a compile error on the class that says "EJB backed WebServices are not supported."
    A few internet searches for that error didn't return anything relevant.
    It seems like I followed the instructions correctly. Is there a better way to build a service like this that is both a web service endpoint and a stateless session bean?
    Thanks!
    -Eric

    Having separate EJB and web modules certainly makes things easier, but I have non-trivial (i.e. not feasible to copy) application logic that I'd like to expose with both a bean interface (for intra-application usage) and a web service interface (for public consumption).
    I've tried starting with a "web application" WorkSpace Studio project and adding bean annotations. This produces the error I originally described. I also tried starting with an "EJB" WorkSpace Studio project and adding web service annotations. This fails at deployment time with errors about missing web service descriptors (the error is correct - the web-service-related descriptor elements are missing from the deployment descriptors).
    The documentation explicitly presents this as an option (annotating a class with both web service and session bean annotations), but how does one actually make this work?

  • Registering EJB/Stateless Session Bean Web Service in Registry

    Hi verybody!
    I would like to know how I can register a Web Service in a registry. The web service is implemented as a session bean.
    The problem is not the actual code to register the service, but how and where can I hook this code into the application so that it is started when the application server is started.
    I've read the Sun J2EE tutorial which registered the service in the moment when the context for the servlet for an ordinary web client was created. This is not what I want. I would like to register the service when starting the EJB container, without the need to give it a kick from some external interface.
    Any help or ideas will be greatly welcome
    Regards
    PI

    1. But I thought you were using a 'stateful session bean'?
    2. For stateless session beans, there is no direct link between a remote reference and an instance of the bean. It is safe to hang on to the remote reference as long as you would like, of course it may go stale if the server dies. You will also find that the create() method does not actually contact the server, so doing it each usage costs very little. So, either way you should be fine.
    3. As for memory leaks, make sure that you are closing all statements, result sets, etc. promptly. These are commonly the problem. Also, use hprof or some other profile tool to determine what types of data you are allocating and (with better tools) what types of data you may be holding on to references to.
    Chuck

  • Transaction can be applied to stateless session bean

    is transaction can be applied to stateless session beanif yes/no why?

    Just because a stateless session bean is stateless doesn't mean it doens't hold state. The stateless means it shouldn't hold any client state.
    It can hold onto for example the dao objects.
    The idea is that you pass all the client state to the sessionbean when calling it.
    Eg.
    public void doBulkOperation( User user ,string param1, String param2){
    operation1( user, param1 );
    operation2( user, param2 );
    public void operation1( User user ,String param1){
    //do some work involving user
    public void operation2( User user ,String param2){
    //do some work involving user
    now suppose that doBulkOperation, operation1, operation2 are declared as transaction required. doBulkOperation starts the transaction if there isn't one running and joins the transaction. Then operation1 and operation2 join in the transaction.
    Perfectly safe!
    What you're not allowed to do is the following:
    privata User user
    public void doBulkOperation( User user ,string param1, String param2){
    this.user = user;
    operation1( param1 );
    operation2( param2 );
    public void operation1( String param1){
    //do some work involving user
    public void operation2( String param2){
    //do some work involving user
    This would be unsafe because concurrent calls will change the user and produce unpredictable results and possibly corrupting data.
    It will work perfectly thougn if there is only one user or you're using a statefull session bean providing you don't share that bean with several clients.

  • Bean-managed stateless session bean can't roll back using JTA

    I use weblogic6.1sp2 + jdk131
    a stateless session bean must do 2 things:
    insert a record to A table and delete another record in A table
    this bean has the same structure as the example in
    j2eetutorial/examples/src/ejb/teller
    I use TxDataSource in weblogic
    if delete fail, the roll back is run,but in database,
    the insert record is STILL in A table.
    any idea?

    make sure that your deployment descriptor says "transaction required".
    Also, If the insert and delete are two different methods, the client must call these two methods in the same transaction scope.

  • Problem Deploying EJB3 Stateless session bean in Jboss4.0.3

    Hi All,
    I have developed an EJB 3 Stateless session bean and tried to deploy in JBoss 4.0.3 , But i get the following Exception.
    javax.naming.NameNotFoundException: ejb not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.apache.jsp.session_jsp._jspService(org.apache.jsp.session_jsp:69)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:157)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)
    I am sorry if the question is silly..... My Remote Interface will be one like this
    import javax.ejb.Remote;
    @Remote
    public interface CityService {
         public String getCity();
    And My Bean Class will be
    import javax.ejb.EJB;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityTransaction;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    @EJB
    @Remote(CityService.class)
    @Stateless(mappedName="ejb/CityService")
    public class CityServiceBean implements CityService {
    public String getCity(){
    return "Chennai Metropolitan";
    And the client which invokes the bean will be
    InitialContext ctx = new InitialContext();
    CityService c = (CityService)ctx.lookup("ejb/CityService");
    System.out.println("Msg from Bean"+c.getCity());
    please help me out of this issue....
    Thanks in advance

    ford wrote:
    If you deploy your application in a .ear, you also can use this:
    You have to set a name to your EJBBean -> @Stateless(name = "XXX")
    The client for remote interface -> cxt.lookup(Name_of_your_own_ear_without_extension + "/XXX/Remote");
    The client for local interface -> cxt.lookup(Name_of_your_own_ear_without_extension + "/XXX/Local");the problem with this approach is that if you version your ears, the version numbers show up in the jndi names, and your client code will be hard coded to specific server versions.

  • Stateless Session Bean has no Context when called from WAR

    Hello,
    Here is the code for my stateless session bean (it will carry out certain actions based on the timer service)
    package DigestTest;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.util.Date;
    import javax.ejb.*;
    import javax.ejb.TimedObject;
    import javax.ejb.Timer;
    * This is the bean class for the MasterTimerBean enterprise bean.
    * Created Sep 7, 2006 9:05:09 AM
    * @author ttaylor
    public class MasterTimerBean implements SessionBean, MasterTimerRemoteBusiness, MasterTimerLocalBusiness, TimedObject
    private SessionContext context;
    public void setSessionContext(SessionContext aContext)
    context = aContext;
    * @see javax.ejb.SessionBean#ejbActivate()
    public void ejbActivate()
    * @see javax.ejb.SessionBean#ejbPassivate()
    public void ejbPassivate()
    * @see javax.ejb.SessionBean#ejbRemove()
    public void ejbRemove()
    // </editor-fold>
    * See section 7.10.3 of the EJB 2.0 specification
    * See section 7.11.3 of the EJB 2.1 specification
    public void ejbCreate()
    // TODO implement ejbCreate if necessary, acquire resources
    // This method has access to the JNDI context so resource aquisition
    // spanning all methods can be performed here such as home interfaces
    // and data sources.
    public void ejbTimeout(Timer timer)
    try
    BufferedWriter writer = new BufferedWriter(new FileWriter("C:\\timerTest.txt"));
    writer.write("Timer has tripped");
    writer.newLine();
    writer.flush();
    writer.close();
    catch(Exception e)
    return;
    // Add business logic below. (Right-click in editor and choose
    // "EJB Methods > Add Business Method" or "Web Service > Add Operation")
    public String initializeTimer()
    String result = "\n\nInitializing Timer\n";
    try
    // Create Your Timer
    if(context!=null)
    TimerService ts = context.getTimerService();
    result = result+"Instantiating Timer Object\n";
    Timer timer = ts.createTimer(new Date(), 5000, "TestTimer");
    result = result+"About to grab TimerHandle";
    TimerHandle timerHandle = timer.getHandle();
    else
    result = result+"\nContext Object is null\n";
    catch (Exception e)
    result = result+"\nError:\n"+e.toString();
    return result;
    public String writerTest()
    String result = "about to write";
    try
    result = result+"\nOpening the file";
    BufferedWriter writer = new BufferedWriter(new FileWriter("C:\\timerTest.txt"));
    result = result+"\nWriter Test Passed";
    writer.write("Writer Works");
    writer.newLine();
    result = result+"\nFlushing writer";
    writer.flush();
    result = result+"\nClosing writer";
    writer.close();
    catch (Exception e)
    result = result+"\n"+e.toString();
    return result;
    I am calling initializeTimer() from a jsp page with a simple <jsp:useBean tag>.
    The program keeps returning that the context variable is not set(this is from the context!=null conditional in initializeTimer()). I am very confused, I thought that setContext(...) was called by the container upon instantiation (and thus should happen completely without any action from me).
    How am I able to call a session bean that has not had the context set?
    Any information is appreciated,
    Thanks,
    Scott

    thank you for your reply, rajeevm007.
    it seems that the question is really a problem now.
    i think i should update weblogic to the lastest version and confirm this question. if it still in there, it seems that we have to reset the global variables all manually. so, now, we are discussing that should we modify all the ejbs, or wait the next version of weblogic. :) of cause the second choice is a joke.
    no other good choice?
    maybe in the march of the next year....
    cheers
    thank you again.

  • Paradox - Should entity CMP EJB be faster than stateless session bean?

    Please bear with me on this.
    Just thinking of this scenario: hello world application. It can be implemented both as stateless session bean and entity bean.
    There's no persistent. So for the entity bean, it will be container managed, and no code to do anything to the load/remove/create. - comparably the same as stateless bean.
    Next, for the stateless session bean, each client call would require a dedicated instance of the EJB on the server (although for a very short amount of time). For the entity bean, it's shared, so only 1 instance is needed. It's also thread safe.
    So, for a very high traffic, shouldn't the entity bean do better because of single instance?
    What's other overhead?
    Does the entity bean cost more connections than the stateless bean?

    Feels like a comparison between apples and oranges.
    A stateless session bean is like every other instance, so these can be pooled by the EJB container. The container is free to create an instance for each client if necessary. That's different.
    A stateless session bean doesn't have to deal with a database that may or may not be located on another machine the way an entity bean does. There could be another network round trip involved. That's different.
    Session and entity beans are intended for entirely different purposes. Just because you can write Hello World with both doesn't mean it's representative of what EJBs are used for. I don't think it's a good, meaninful comparison. JMO - MOD

  • Transactional error when using JMS from stateless session bean

    I get a transaction exception when committing a bean method responsible for sending to a JMS topic. This happens only occasionally when two separate threads invoke this method "at the same time".
    The scenario:
    Two separate threads running two different instances of a stateless session bean (slsb A). This ejb (slsb A) has an injected slsb B which is communicating with the the topic.
    Both instances of slsb A are utilising the same instance of slsb B.
    The CMT transactions for the two threads start in slsb A from methods with transaction attribute "RequiresNew". All nested methods are to other slsbs and have the transaction attribute "Required". The method in slsb B which sends the message is closing both the session and the connection to the topic.
    I'm running Glassfish version 9.1_02 (build b04-fcs) and JMS implementation OpenMQ version 4.1.
    Stacktrace (glassfish log):
    [#|2008-09-09T13:00:40.515+0200|SEVERE|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=108e8418-71a6-4d8b-a94d-9e1edc885891;|commitTransaction (XA) on JMSService:jmsdirect failed for connectionId:5754505514139844608 and onePhase:false due to unkown JMSService server error.|#]
    [#|2008-09-09T13:00:40.515+0200|SEVERE|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe;commit;_RequestID=108e8418-71a6-4d8b-a94d-9e1edc885891;|JTS5031: Exception [org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe] on Resource [commit] operation.|#]
    [#|2008-09-09T13:00:40.531+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;SubscriptionBean;|EJB5018: An exception was thrown during an ejb invocation on [SubscriptionBean]|#]
    [#|2008-09-09T13:00:40.531+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;|
    javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
    javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:321)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1030)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3585)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
         at $Proxy130.requestNewSubscription(Unknown Source)
         at com.abeldrm.kms.core.services.subscription.SubscriptionWSBean.requestNewSubscription(SubscriptionWSBean.java:94)
         at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
         at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
         at $Proxy129.requestNewSubscription(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
         at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
         at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
         at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
         at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:329)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
         at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    IMQ broker log:
    [09/Sep/2008:13:00:40 CEST] ERROR CommitTransaction: commit failed. Connection ID: 5754505514139844608, Transaction ID: 0:
    com.sun.messaging.jmq.jmsserver.util.BrokerException: Unknown Transaction 0
         at com.sun.messaging.jmq.jmsserver.data.protocol.ProtocolImpl.commitTransaction(ProtocolImpl.java:630)
         at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.commitTransaction(IMQDirectService.java:1735)
         at com.sun.messaging.jms.ra.DirectXAResource.commit(DirectXAResource.java:201)
         at com.sun.jts.jtsxa.OTSResourceImpl.commit(OTSResourceImpl.java:114)
         at com.sun.jts.CosTransactions.RegisteredResources.distributeCommit(RegisteredResources.java:795)
         at com.sun.jts.CosTransactions.TopCoordinator.commit(TopCoordinator.java:2111)
         at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:403)
         at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
         at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1030)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3585)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
         at $Proxy130.requestNewSubscription(Unknown Source)
         at com.abeldrm.kms.core.services.subscription.SubscriptionWSBean.requestNewSubscription(SubscriptionWSBean.java:94)
         at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
         at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
         at $Proxy129.requestNewSubscription(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
         at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
         at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
         at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
         at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:329)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
         at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Have anyone any idea why this should fail?
    Regards,
    Jon

    I would suggest opening a case with [email protected] FWIW, I recall seeing
              something like this in WLS 6.0. I believe it is fixed in WLS 6.1
              -- Rob
              Chris Dupuy wrote:
              > Btw, this occurs when I create an stateful session bean that ends up
              > throwing an exception and setRollbackOnly() is called. From that point
              > forward, my logs fill with this message.
              >
              > Chris
              >
              > "Chris Dupuy" <[email protected]> wrote in message
              > news:[email protected]..
              > > anyone know what this means, and what you can do about it?
              > >
              > >
              > > <Error> <ConnectionManager> <atossd03> <cbeyondServer> <ExecuteThread:
              > '14'
              > > for queue: 'd
              > > efault'> <> <> <000000> <Closing:
              > 'weblogic.rjvm.t3.T3JVMConnection@488831'
              > > because of: 'Server received a message over an uniniti
              > > alized connection: 'JVMMessage from: 'null' to:
              > >
              > '5825313123619479267S:10.6.6.40:[8000,8000,8001,8001,8000,8001,-1]:cbeyond:c
              > > beyond
              > > Server' cmd: 'CMD_REQUEST', QOS: '101', responseId: '2', invokableId: '1',
              > > flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev o
              > > ffset: '204'''>
              > >
              > >
              > >
              

  • Singleton stateless session bean

    hello
    how to implement "singleton stateless session bean"?
    thanks in advance!!

    This is a case of premature optimization. Try forgetting about how to solve a singleton problem for the time being. Focus on the use-cases of your application and getting something working.
    After that, if memory usage continues to be an issue, consider the following. If you have a large amount of data needed by multiple clients, one option to store it in a database and retrieve portions on demand. If you need to keep everything in memory in each bean instance you can also configure the total number of stateless session bean instances in your vendor's bean pool to limit the total resource usage. A third alternative is to use a third-party caching implementation or a vendor-specific singleton service.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Call stateless session bean EJB 2.0 from Webdynpro Java UI

    Hello,
    Can someone please tell me asto how to call a stateless session bean EJB 2.0 from Webdynpro Java UI?
    The NWDS version is 7.0.
    Thanks and Regards,
    Arya

    Hi Aryadipta
    Please check this pdfs
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b00917dc-ead4-2910-3ebb-b0a63e49ef10&overridelayout=true
    Steps for calling stateless session bean in Webdynpro java
    Go to NWDS -> open perspective ->j2ee
    select EJB Module Project ->create a project with name
    Open the Project -->RC on ejb-jar.xml -> Select new --> EJB
    Give name to EJB Bean (First letter should be in capital letters)
    select the type of bean as Stateless session bean and give the package name to store that EJB bean.
    After that Expand ejb-jar.xml and then select the <projectEJB> 
    Double click on this on method  tab double click you will get business method where we will create the methods for business logic
    Double click on projectEJB and then RC on bean tab and write required business logic in bean window as follows(based on requirement we will design a business logic).
    After writing the business logic go to project -> rebuild
    Till now we have created one EJB jar file
    then go to File-->Enterprise Application Project -->create a project (projectEAR)
    After creating a project click on next-> here we will have ear projects and then we select specific project required for our application.(here select projectEJB)
    After that Calculate EAR project will be available on j2ee explorer.
    Right click on <Bean> here
    select New->Web Service->give a name to webservice and select Default configuration type as simple SOAP
    -->click next -> Finish.
    That webservice and related are created in ejb-jar.xml .
    Expand the ejb-jar.xml.and double click on < webservice>
    RC ProjectEJB -> Build EJB Archive RC on CalculateEAR ->Build applicationarchive.
    Expand the projectEAR->RC on CalculateEAR.ear->Deploy to J2EE Engine
    Double click on calculateEAR.ear ->Webservice navigator tab ->we eill servers expand the node
    select the specific WebService  
    Here we test the webservice by click on Test and test it.
    After that go to Web dynpro perspective ->create one webdynpro Project and one component
    RC on model> Select import Web Service model(last)>give model name and package
    and select radio button as local file system or URL
    Go to WSnavigator->copy the WSDL path and paste it in model WSDL path and click on finish.
    from here onwards steps are same as that adaptive RFC model
    Hope it helps
    Thanks
    Tulasi Palnati
    Edited by: Tulasi Palnati on Aug 26, 2009 12:15 PM
    Edited by: Tulasi Palnati on Aug 26, 2009 12:43 PM

  • WLS10 and Stateless Session Bean

    I tried to create EJB3 application example.
    1. Created Stateless Session Bean that implements Remote and Local interfaces:
    Session Bean code:
    package com.session;
    import javax.ejb.Local;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import javax.ejb.TransactionAttribute;
    import javax.ejb.TransactionAttributeType;
    @Stateless(mappedName="SessionBeanService")
    @Remote(ISessionBeanRemote.class)
    @Local(ISessionBeanLocal.class)
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public class SessionBean implements ISessionBeanLocal,
    ISessionBeanRemote
    public String reply(){
    return "MySessionBean - success !!!";
    Remote Interface code :
    package com.session;
    public interface ISessionBeanRemote
    public String reply();
    Local Interface code:
    package com.session;
    public interface ISessionBeanLocal
    public String reply();
    application.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
              http://java.sun.com/xml/ns/javaee/application_5.xsd"
         version="5">
         <display-name>EJB3 Sample Application</display-name>
         <module>
         <ejb>beans.jar</ejb>
         </module>
    </application>
    weblogic-application.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-application PUBLIC
         "-//BEA Systems, Inc.//DTD WebLogic Application 8.1.0//EN"
         "http://www.bea.com/ns/weblogic/90/weblogic-application.xsd">
    <weblogic-application>
              <classloader-structure>
                   <module-ref>
                        <module-uri>beans.jar</module-uri>
                   </module-ref>
              </classloader-structure>
    </weblogic-application>
    2. I packaged classes into EAR file and deployed to WLS10.
    I didn't include any weblogic specific XML descriptors besides weblogic-application.jar.
    My client code lookes as follows:
    public void test(){
    Context context = getMyServerContext();
    // THIS JNDI NAME I SEE ON MY SERVER JNDI TREE
    String jndiName = "sessionbeansbeans_jarSessionBean_ISessionBeanRemote";
    Object obj;
    obj = context.lookup(jndiName);
    System.out.println(" obj class : " + obj.getClass().getName());
    ISessionBeanRemote remote = (ISessionBeanRemote) PortableRemoteObject.narrow(
    obj, ISessionBeanRemote.class );
    String res = remote.reply();
    System.out.println("res : "+res);
    I get an Exception:
    Exception occurred!
    java.lang.ClassCastException: Cannot narrow remote object to com.session.ISessionBeanRemote
         at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:242)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
         at ca.cgi.mvest.test.server.wms.GlFacadeTest.runTest(GlFacadeTest.java:91)
         at ca.cgi.mvest.test.server.wms.GlFacadeTest.<init>(GlFacadeTest.java:53)
         at ca.cgi.mvest.test.server.wms.GlFacadeTest.main(GlFacadeTest.java:151)
    java.lang.ClassCastException: Cannot narrow remote object to com.session.ISessionBeanRemote
    My server console have the following output:
    Root cause of ServletException.java.lang.NoClassDefFoundError: com/session/SessionBean_7pp7ls_ISessionBeanRemot
    eIntf
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericCla
    ssLoader.java:338)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:291)
    Truncated. see log file for complete stacktrace
    Server logs a problem already on the line when I do lookup
    on JNDI name even before narrow();
    It looks like my EAR was missing something. But server never complained during deployment.
    May be someone can direct me to a real sample of Weblogic10-ejb3.0 application, since examples that come with WLS 10 intallation combersome and do not follow
    docmentation.
    Thanks in advance for any suggestion.

    Hello Freind
    The main different b\w stateful and statless is that stateful maintain state of method conversation means it has record that which method call before this method
    but in case of stateless conversation state does not saved second different we can say that create method in stateless having no parameter but statefull having parameter I think u can understand easily
    With Best Regards
    Rajesh Pandey
    email :[email protected]
    url :-- http://www.sixthquadrant.com
    Mob :-- 9811903737
    Delhi India

  • NameNotFoundException EJB 3.0 Stateless Session Bean

    Hi i am new to ejb 3.0 as well as ejb actually. I encountered an error trying out a small stateless session bean application.
    23:15:02,312 ERROR [STDERR] javax.naming.NameNotFoundException: com.afis.ct.ri.session.ejb.ReportIncidentSession not bound
    23:15:02,312 ERROR [STDERR]      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    23:15:02,312 ERROR [STDERR]      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    23:15:02,312 ERROR [STDERR]      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    23:15:02,312 ERROR [STDERR]      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
    23:15:02,312 ERROR [STDERR]      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
    23:15:02,312 ERROR [STDERR]      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    23:15:02,312 ERROR [STDERR]      at javax.naming.InitialContext.lookup(InitialContext.java:351)
    23:15:02,312 ERROR [STDERR]      at com.afis.ct.servlets.ri.ValidateIdentityServlet.validateIdentity(ValidateIdentityServlet.java:64)
    23:15:02,312 ERROR [STDERR]      at com.afis.ct.servlets.ri.ValidateIdentityServlet.processRequest(ValidateIdentityServlet.java:35)
    23:15:02,312 ERROR [STDERR]      at com.afis.ct.servlets.ri.ValidateIdentityServlet.doGet(ValidateIdentityServlet.java:19)
    23:15:02,312 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
    23:15:02,312 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    23:15:02,328 ERROR [STDERR]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    23:15:02,328 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
    23:15:02,328 ERROR [STDERR]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    23:15:02,328 ERROR [STDERR]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    23:15:02,328 ERROR [STDERR]      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    23:15:02,328 ERROR [STDERR]      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    23:15:02,328 ERROR [STDERR]      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    23:15:02,328 ERROR [STDERR]      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    23:15:02,328 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:595)My remote interface looks like
    package com.afis.ct.ri.session.ejb;
    import javax.ejb.Remote;
    @Remote
    public interface ReportIncidentSession {
         public boolean isIdentityValid(String identity);
    }My bean looks like
    package com.afis.ct.ri.session.ejb;
    import javax.ejb.Stateless;
    @Stateless
    public class ReportIncidentSessionBean implements ReportIncidentSession {
         public ReportIncidentSessionBean() {
              super();
         public boolean isIdentityValid(String identity) {
              return true;
    }Finally i am calling from a servlet which is part of a web application under the same hood(ear) as the ejb jar file.
    InitialContext ctx=new InitialContext();
                   ReportIncidentSession session=(ReportIncidentSession)ctx.lookup(ReportIncidentSession.class.getName());
                                  return session.isIdentityValid(identity);I have done nothing more than making sure there is no compilation error, and i feel some mandatory steps are missing.. So thanks for any help!
    Marvelous.

    Hi DRS, i tried your recommendation and injected the following on top of my servlet class:
    EJB(name="ReportIncidentSessionBean", businessInterface=ReportIncidentSession.class)
    public class ValidateIdentityServlet extends HttpServlet implements
              ValidateIdentity {The original beanInterface you mentioned had an error.
    And upon deployment, JBoss wasn't able to generate a deployment descriptor hinting at the annotations.
    23:50:08,765 ERROR [MainDeployer] Could not create deployment: file:/C:/Program Files/jboss-4.0.4.GA/server/Marvelous/deploy/Avian Flu Information System.ear/Avian Flu Information System Web.war/
    java.lang.UnsupportedOperationException: FIXME: should ignore annotations for missing classes
         at org.jboss.lang.AnnotationHelper.getAnnotations(AnnotationHelper.java:98)
         at org.jboss.lang.AnnotationHelper.getAnnotation(AnnotationHelper.java:75)
         at org.jboss.lang.AnnotationHelper.isAnnotationPresent(AnnotationHelper.java:60)
         at org.jboss.ws.server.WebServiceDeployerJSE.isWebserviceDeployment(WebServiceDeployerJSE.java:152)
         at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:101)
         at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
         at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
         at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy49.create(Unknown Source)
         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
         at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy6.deploy(Unknown Source)
         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)Your input is greatly appreciated!

Maybe you are looking for

  • 1.4.2_03 SDK install problem (WinXP SP1)

    I just installed j2sdk 1.4.2_03 (freshly downloaded), and installed on my WinXP SP1 laptop. * The install croaked at the point at which it tried to install the standalone JRE (threw up an error dialog, and if you hit OK on that, it exits the install

  • Why are't the apple apps free for ipad 2?

    Why are apps from apple like pages, keynote etc. paid for ipad 2 and u can download them for free on ipad 3+?

  • Three-way or conference calling?

    Heyo. Searchings the forums for the terms "3-way", "three-way", and "conference" yielded nothing so here goes. Can FaceTime do three-way (or more) video chats? Thanks, ALF

  • Dell 1815dn and Mac OS 10.8.4

    the mentioned printer is not working any via more WiFi after having updated to 10.8.4. The printer is connected to the router via Ethernet. It is shown in the printer dialog to be added via Bonjour but after having sent a print job it is not found. T

  • XIF issue related CRM 7

    Hi All, We have connected CRM 7 and CRM 4 using XIF We are facing an issue where 2 IDOCs (with same Basic type CRMXIF_PARTNER_SAVE_M01) are generated at same time while using XIF adapter dring busines partner creation. First IDOC is succesful and oth