Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Complete Code For Spring-StateLessSessionBean

  1. #11
    Join Date
    Feb 2006
    Posts
    4

    Default

    Hi,

    i have tried in another way and now it works probably just a misunderstanding from me, but no matters thanks for all.

    Do you know how i can with a webapps see all ejb in a jndi and load them with the dependancy injection in Spring. Imagine you have a webapps that can find automatically all services of a type and load them because they all implements the same interface(something like plugins).

    Thanks,

    Avalone.

  2. #12
    Join Date
    Sep 2006
    Location
    Paris suburb (91)
    Posts
    2

    Default Complete separation of web application and services+daos

    Hello all,

    I see few examples on SPRING + EJBs and I would like to thank everybody for contributing exposing these code lines!

    I want to expose my problem.

    I have a classic five layers architecture application with a complete separation between web stuff and services (managers in appfuse) and DAOs + model.
    I use Spring as web framework.
    In my actions I use delegates who does JNDI lookup with a Locator to EJB stateless services (I don't use Spring for that).
    Only Services + DAOs have SPRING implementation.
    I obtain this kind of error even if application deployment seems good :


    java.rmi.ServerError: Unexpected Error:; nested exception is:
    java.lang.StackOverflowError
    org.jboss.ejb.plugins.LogInterceptor.handleExcepti on(LogInterceptor.java:398)
    org.jboss.ejb.plugins.LogInterceptor.invoke(LogInt erceptor.java:195)
    org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto r.invoke(ProxyFactoryFinderInterceptor.java:122)
    org.jboss.ejb.StatelessSessionContainer.internalIn voke(StatelessSessionContainer.java:331)
    org.jboss.ejb.Container.invoke(Container.java:709)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.jboss.mx.server.ReflectedDispatcher.dispatch(R eflectedDispatcher.java:60)
    org.jboss.mx.server.Invocation.dispatch(Invocation .java:62)
    org.jboss.mx.server.Invocation.dispatch(Invocation .java:54)
    org.jboss.mx.server.Invocation.invoke(Invocation.j ava:82)
    org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:197)
    org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:473)
    org.jboss.invocation.local.LocalInvoker.invoke(Loc alInvoker.java:97)
    org.jboss.invocation.InvokerInterceptor.invoke(Inv okerInterceptor.java:90)
    org.jboss.proxy.TransactionInterceptor.invoke(Tran sactionInterceptor.java:46)
    org.jboss.proxy.SecurityInterceptor.invoke(Securit yInterceptor.java:55)
    org.jboss.proxy.ejb.StatelessSessionInterceptor.in voke(StatelessSessionInterceptor.java:100)
    org.jboss.proxy.ClientContainer.invoke(ClientConta iner.java:85)
    $Proxy74.findUser(Unknown Source)
    com.dsinfo.hyperproject.common.delegate.ResourceDe legate.findUser(ResourceDelegate.java:68)
    com.dsinfo.hyperproject.web.struts.action.LogonAct ion.login(LogonAction.java:52)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.apache.struts.actions.DispatchAction.dispatchM ethod(DispatchAction.java:274)
    org.apache.struts.actions.DispatchAction.execute(D ispatchAction.java:194)
    com.dsinfo.hyperproject.web.struts.action.BaseDisp atchAction.execute(BaseDispatchAction.java:28)
    org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:419)
    org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:224)
    org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1196)
    org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:432)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF ilter(ReplyHeaderFilter.java:75)



    In fact, I wanted to know if I have to register SPRING application context in the client or this kind of implementation is possible.

    Thanks all !


    David

  3. #13
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    There is no reason why you can't use a service locator. EJBs implemented using Spring are still EJBs. There must be another issue.
    Bill

  4. #14
    Join Date
    Oct 2005
    Posts
    23

    Default Wow!!

    It works!!! Thanks!!!

Similar Threads

  1. Replies: 11
    Last Post: Apr 30th, 2012, 11:20 AM
  2. Replies: 4
    Last Post: Jun 20th, 2007, 11:06 AM
  3. Replies: 4
    Last Post: May 12th, 2006, 02:50 AM
  4. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  5. Please help! Unit testing code for JPetStore
    By lakershen in forum Container
    Replies: 4
    Last Post: Jan 13th, 2005, 05:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •