0 Replies Latest reply on Jun 8, 2007 4:16 PM by Wesley Hales

    Jetty,Embedded Jboss/EJB, and Seam - It finally works

    Wesley Hales Master

      I thought it would be better to start a new post after working through this issue.

      My problem is when I startup my Jetty server and the org.jnp.server.NamingServer class from the jboss-ejb3-all.jar tries to bind multiple "names" to JNDI. I put a couple of system.out.println's in the bind method and stopped it from throwing (commented out)

      so that my server would startup and deploy all my EJB's/managed stateless session beans.

      So after 3 days of heads down coding I finally have a fully working Seam/Jetty/Embedded EJB server running. But, I had to modify the NamingServer class to do so. I also am seeing the same names being bound to JNDI, here is what I have from my console:
      ---------------setBinding: TransactionManager
      ---------------setBinding: TransactionPropagationContextImporter
      ---------------setBinding: TransactionPropagationContextExporter
      ---------------setBinding: UserTransaction
      15:54:00,089 INFO [LocalTxDataSource] Bound datasource to JNDI name 'java:/DefaultDS'
      ---------------setBinding: DefaultJMSProvider
      ---------------setBinding: StdJMSPool
      15:54:00,480 INFO [Queue] Bound to JNDI name: queue/DLQ
      15:54:05,557 INFO [Ejb3Deployment] EJB3 deployment time took: 5047
      15:54:08,892 INFO [Ejb3Deployment] EJB3 deployment time took: 3335
      15:54:09,022 INFO [ServletContextListener] Welcome to Seam 1.2.0.PATCH1
      ..alot of things loading here...
      15:54:10,334 INFO [Lifecycle] starting up: org.jboss.seam.debug.hotDeployFilter
      15:54:10,334 INFO [Lifecycle] starting up: org.jboss.seam.servlet.multipartFilter
      15:54:10,334 INFO [Lifecycle] starting up: org.jboss.seam.servlet.exceptionFilter
      15:54:10,334 INFO [Lifecycle] starting up: org.jboss.seam.ui.graphicImage.dynamicImageResource
      15:54:10,334 INFO [Lifecycle] starting up: org.jboss.seam.servlet.redirectFilter
      15:54:10,334 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.webResource
      15:54:10,334 INFO [Lifecycle] starting up: org.jboss.seam.core.ejb
      15:54:10,334 INFO [Ejb] starting the embedded EJB container
      ---------------setBinding: UserTransaction
      15:54:10,595 INFO [LocalTxDataSource] Bound datasource to JNDI name 'java:/DefaultDS'
      15:54:11,206 INFO [Ejb3DescriptorHandler] adding class annotation org.jboss.annotation.internal.DefaultInterceptorMarker to com.halesconsulting.TestA
      ctionBean org.jboss.annotation.internal.DefaultInterceptorMarkerImpl@b28f30
      15:54:11,326 INFO [Ejb3Deployment] EJB3 deployment time took: 661
      15:54:11,997 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=classes,name=TestActionBean,service=EJB3 with dependencies:
      ---------------setBinding: UserTransaction
      15:54:12,117 INFO [EJBContainer] STARTED EJB: com.halesconsulting.TestActionBean ejbName: TestActionBean
      ---------------setBinding: local
      15:54:12,147 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam-1.2.1.GA,name=Dispatcher,service=EJB3 with dependencies:
      ---------------setBinding: UserTransaction
      15:54:12,167 INFO [EJBContainer] STARTED EJB: org.jboss.seam.core.Dispatcher ejbName: Dispatcher
      ---------------setBinding: local
      15:54:12,167 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam-1.2.1.GA,name=TransactionListener,service=EJB3 with dependencies:
      ---------------setBinding: UserTransaction
      15:54:12,197 INFO [EJBContainer] STARTED EJB: org.jboss.seam.core.TransactionListener ejbName: TransactionListener
      ---------------setBinding: local
      ---------------setBinding: localStatefulProxyFactory
      15:54:12,217 INFO [Initialization] done initializing Seam
      ...loading config xml files here...
      [INFO] Started Jetty Server
      [INFO] Starting scanner at interval of 10 seconds.

      Each "---------------setBinding" you see above is obviously from the
      } catch (NameNotFoundException e) {
       System.out.println("---------------setBinding: " + name.toString());
       setBinding(name, obj, className);

      , and each name with just "-----------" is where the
      throw new NameAlreadyBoundException();
      would have been thrown.

      My question is, am I doing something wrong or is this something that needs to be fixed?

      Wesley Hales