2 Replies Latest reply: May 14, 2010 9:04 AM by Ravi Samavedula RSS

Ejb deployment

Ravi Samavedula Newbie

I am deploying an applcation in jboss 5.0.

 

and application consists of ejb's.

 

When i deploy it throws

 

 

18:27:46,891 INFO  [EjbModule] Deploying DatacaptorEndpoint

18:27:46,907 WARN  [EjbModule] EJB configured to bypass security. Please verify if this is intended. Bean=DatacaptorEndpoint Deployment=vfsfile:/D:/jboss-eap-5.0/jboss-as/server/all/deploy-hasingleton/kernel-ear-1.3-SNAPSHOT.ear/kernel-ejb-1.3-SNAPSHOT.jar/

18:27:46,922 INFO  [EjbModule] Deploying AwareEndpoint

18:27:46,922 WARN  [EjbModule] EJB configured to bypass security. Please verify if this is intended. Bean=AwareEndpoint Deployment=vfsfile:/D:/jboss-eap-5.0/jboss-as/server/all/deploy-hasingleton/kernel-ear-1.3-SNAPSHOT.ear/kernel-ejb-1.3-SNAPSHOT.jar/

18:27:46,922 INFO  [EjbModule] Deploying KernelSessionBean

18:27:46,938 WARN  [EjbModule] EJB configured to bypass security. Please verify if this is intended. Bean=KernelSessionBean Deployment=vfsfile:/D:/jboss-eap-5.0/jboss-as/server/all/deploy-hasingleton/kernel-ear-1.3-SNAPSHOT.ear/kernel-ejb-1.3-SNAPSHOT.jar/

18:27:46,938 INFO  [EjbModule] Deploying ClientDelegateMDB

18:27:46,938 WARN  [EjbModule] EJB configured to bypass security. Please verify if this is intended. Bean=ClientDelegateMDB Deployment=vfsfile:/D:/jboss-eap-5.0/jboss-as/server/all/deploy-hasingleton/kernel-ear-1.3-SNAPSHOT.ear/kernel-ejb-1.3-SNAPSHOT.jar/

18:27:46,953 INFO  [EjbModule] Deploying IntellivueEndpoint

18:27:46,953 WARN  [EjbModule] EJB configured to bypass security. Please verify if this is intended. Bean=IntellivueEndpoint Deployment=vfsfile:/D:/jboss-eap-5.0/jboss-as/server/all/deploy-hasingleton/kernel-ear-1.3-SNAPSHOT.ear/kernel-ejb-1.3-SNAPSHOT.jar/

18:27:47,047 INFO  [AbstractConnector] [intellivue] connector started

18:27:47,110 ERROR [KernelSessionFactory] failed to create kernel

javax.naming.NameNotFoundException: KernelSessionLocal not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.gehc.device.kernel.session.KernelSessionFactory.createKernel(KernelSessionFactory.java:35)
at com.gehc.device.kernel.ConnectorEndpointMDB.ejbCreate(ConnectorEndpointMDB.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

 

___________________________________________________________________________________________________

 

But it bounds after this

 

 

18:27:47,188 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'KernelSessionBean' to jndi 'KernelSessionLocal'

18:27:47,203 INFO  [ProxyFactory] Bound EJB Home 'KernelSessionBean' to jndi 'KernelSessionRemote'

18:27:47,297 INFO  [SystemEventService] MASTER_NODE_STARTED on node [HCA-5C1P1BS]

18:27:47,313 INFO  [KernelSessionBean] loaded [[null] version [null]]

 

Below are the ejb-jar and jboss.xml contents

 

<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

             http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"

version="2.1">

<display-name>TestBean-noack</display-name>

<enterprise-beans>

<session>

<ejb-name>KernelSessionBean</ejb-name>

<home>

com.gehc.device.kernel.session.KernelSessionHome

</home>

<remote>

com.gehc.device.kernel.session.KernelSession

</remote>

<local-home>

com.gehc.device.kernel.session.KernelLocalSessionHome

</local-home>

<local>

com.gehc.device.kernel.session.KernelLocalSession

</local>

<ejb-class>

com.gehc.device.kernel.KernelSessionBean

</ejb-class>

<session-type>Stateless</session-type>

<transaction-type>Container</transaction-type>

</session>

 

<message-driven>

<ejb-name>ClientDelegateMDB</ejb-name>

<ejb-class>

com.gehc.device.kernel.ClientDelegateMDB

</ejb-class>

<transaction-type>Bean</transaction-type>

</message-driven>

<message-driven>

<ejb-name>AwareEndpoint</ejb-name>

<ejb-class>

com.gehc.device.kernel.ConnectorEndpointMDB

</ejb-class>

<messaging-type>

com.gehc.device.kernel.api.ConnectorEndpoint

</messaging-type>

<transaction-type>Container</transaction-type>

</message-driven>

<message-driven>

<ejb-name>IntellivueEndpoint</ejb-name>

<ejb-class>

com.gehc.device.kernel.ConnectorEndpointMDB

</ejb-class>

<messaging-type>

com.gehc.device.kernel.api.ConnectorEndpoint

</messaging-type>

<transaction-type>Container</transaction-type>

</message-driven>

<message-driven>

<ejb-name>DatacaptorEndpoint</ejb-name>

<ejb-class>

com.gehc.device.kernel.ConnectorEndpointMDB

</ejb-class>

<messaging-type>

com.gehc.device.kernel.api.ConnectorEndpoint

</messaging-type>

<transaction-type>Container</transaction-type>

</message-driven>

</enterprise-beans>

</ejb-jar>

 

 

<?xml version="1.0" encoding="UTF-8"?>

<jboss xmlns:xs="http://www.jboss.org/j2ee/schema" xs:schemaLocation="http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" version="5.0">

    <enterprise-beans>

        <session>

            <ejb-name>KernelSessionBean</ejb-name>

            <jndi-name>KernelSessionRemote</jndi-name>

            <local-jndi-name>KernelSessionLocal</local-jndi-name>

        </session>

        <!--<session>

            <ejb-name>PersistenceServiceBean</ejb-name>

            <jndi-name>PersistenceService</jndi-name>

            <local-jndi-name>PersistenceServiceLocal</local-jndi-name>

        </session>-->

<!--<message-driven>

            <ejb-name>IxmlEndpoint</ejb-name>

            <resource-adapter-name>jca-ear-1.3-SNAPSHOT.ear#ixml-connector-rar-1.3-SNAPSHOT.rar</resource-adapter-name>

            <depends>jboss.jca:name='jca-ear-1.3-SNAPSHOT.ear#ixml-connector-rar-1.3-SNAPSHOT.rar',service=RARDeployment</depends>

            <depends>gehc.com:service=KernelServiceMBean</depends>

        </message-driven>-->

        <message-driven>

            <ejb-name>AwareEndpoint</ejb-name>

            <resource-adapter-name>jca-ear-1.3-SNAPSHOT.ear#aware-connector-rar-1.3-SNAPSHOT.rar</resource-adapter-name>

            <depends>jboss.jca:name='jca-ear-1.3-SNAPSHOT.ear#aware-connector-rar-1.3-SNAPSHOT.rar',service=RARDeployment</depends>

            <depends>gehc.com:service=KernelServiceMBean</depends>

        </message-driven>

        <message-driven>

            <ejb-name>IntellivueEndpoint</ejb-name>

            <resource-adapter-name>jca-ear-1.3-SNAPSHOT.ear#intellivue-connector-rar-1.3-SNAPSHOT.rar</resource-adapter-name>

            <depends>jboss.jca:name='jca-ear-1.3-SNAPSHOT.ear#intellivue-connector-rar-1.3-SNAPSHOT.rar',service=RARDeployment</depends>

            <depends>gehc.com:service=KernelServiceMBean</depends>

        </message-driven>

        <message-driven>

            <ejb-name>DatacaptorEndpoint</ejb-name>

            <resource-adapter-name>jca-ear-1.3-SNAPSHOT.ear#datacaptor-connector-rar-1.3-SNAPSHOT.rar</resource-adapter-name>

            <depends>jboss.jca:name='jca-ear-1.3-SNAPSHOT.ear#datacaptor-connector-rar-1.3-SNAPSHOT.rar',service=RARDeployment</depends>

            <depends>gehc.com:service=KernelServiceMBean</depends>

        </message-driven>

        <message-driven>

            <ejb-name>ClientDelegateMDB</ejb-name>

            <destination-jndi-name>topic/testTopic</destination-jndi-name>

            <mdb-user>dynsub</mdb-user>

            <mdb-passwd>dynsub</mdb-passwd>

            <mdb-client-id>ClientCommandMDB</mdb-client-id>

            <mdb-subscription-id>ClientCommandMDB</mdb-subscription-id>

            <depends>gehc.com:service=KernelServiceMBean</depends>

        </message-driven>

    </enterprise-beans>

</jboss>

 

 

Thanks

Ravi S

  • 1. Re: Ejb deployment
    Marc Ende Newbie

    Hi,

     

    if I understand your deployment and the stacktrace correctly you'll try to invoke a KernelSessionFactory.createKernel from the

    ejbCreate lifecycle-method of an MDB. The mdb is also deployed within the same jar.

     

    While deploying you cannot access the beans in the same deployment. They haven't got the correct state and aren't listed in the jndi.

    To access them you'll shoud split the deployments and work with dependencies.

    For example you can deploy the mdb seperatly and define a dependency to the KernelSessionBean. Now the MDB will be deployed

    when the other is available.

     

    hope that helps

     

    m.

  • 2. Re: Ejb deployment
    Ravi Samavedula Newbie

    Thanks Marc.