Re: env-entry & mdb в ejb3
От: Sserega  
Дата: 21.06.07 10:21
Оценка: 2 (1)
Здравствуйте, pvnic, Вы писали:

P>а что делать с env-entry?


  @Resource
  int siteID = 123;


Можно переопределить в дескрипторе, по старому, контейнер будет искать её по имени <class-name>/siteId
env-entry & mdb в ejb3
От: pvnic  
Дата: 21.06.07 10:00
Оценка:
привет.

во вторых ejb mdb описывались примерно вот так:

 <message-driven >
         <description><![CDATA[.....]]></description>

         <ejb-name>SomeMDB</ejb-name>

        <ejb-class>SomeMDB</ejb-class>

        <transaction-type>Container</transaction-type>
            <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
            <subscription-durability>NonDurable</subscription-durability>
         </message-driven-destination>

         <env-entry>
            <env-entry-name>siteID</env-entry-name>
            <env-entry-type>java.lang.Integer</env-entry-type>
            <env-entry-value><![CDATA[@@SITEID@@]]></env-entry-value>
         </env-entry>
         

      </message-driven>


собстна на 3-х можно описать примерно вот так

@MessageDriven(name = "SomeMDB",
        activationConfig = { 
        @ActivationConfigProperty(
                propertyName = "connectionFactoryJndiName",
                propertyValue = "java:/JmsXA"),

            @ActivationConfigProperty(
                    propertyName="destinationType",
                    propertyValue="javax.jms.Queue"),
            @ActivationConfigProperty(
                    propertyName="subscriptionDurability",
                    propertyValue="NonDurable"),
            @ActivationConfigProperty(
                    propertyName="destinationName",
                    propertyValue="queue/@@SITEID@@_E1")
        }
)
public class SomeMDB implements MessageListener {



а что делать с env-entry?
Re[2]: env-entry & mdb в ejb3
От: pvnic  
Дата: 22.06.07 03:27
Оценка:
Здравствуйте, Sserega, Вы писали:

а не в курсе, можно ли совместить описание ч-з анотации и используя дескриптор (для большей гибкости)?

если да, то не плохо было бы небольшой пример для stateless bean
Re[3]: env-entry & mdb в ejb3
От: Sserega  
Дата: 22.06.07 06:25
Оценка:
Здравствуйте, pvnic, Вы писали:

P>а не в курсе, можно ли совместить описание ч-з анотации и используя дескриптор (для большей гибкости)?


Можно, все что можно определить через аннотации можно определить и через дескриптор. Причем, определения в дескрипторе имеют более высокий приоритет.
Пример:
Business interface
package com;
public interface Hello {
    public String getHello();
}


Bean class
package com;

import javax.ejb.*;
import javax.annotation.Resource;

@Stateless(name="Hello")
@Remote(Hello.class)
public class HelloBean implements Hello{
    @Resource
    private String hello = "This will be redefined in descriptor";

    public String getHello() {
        return hello;
    }
}


ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar 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/ejb-jar_3_0.xsd"
         version="3.0">

    <enterprise-beans>
        <session>
            <ejb-name>Hello</ejb-name>
            <ejb-class>com.HelloBean</ejb-class>
            <env-entry>
                <env-entry-name>com.HelloBean/hello</env-entry-name>
                <env-entry-value>Hello World!</env-entry-value>
            </env-entry>
        </session>
    </enterprise-beans>
</ejb-jar>


При вызове метода getHello будет возвращено "Hello World!"
Re[4]: env-entry & mdb в ejb3
От: pvnic  
Дата: 22.06.07 08:24
Оценка:
Здравствуйте, Sserega, Вы писали:

Спасибо за ответ !

S>ejb-jar.xml

S>
S><?xml version="1.0" encoding="UTF-8"?>
S><ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
S>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
S>         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
S>          http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
S>         version="3.0">

S>


1 ) в определении xmlns нигде кавычки не пропущены случаем?
2) сделал по аналогии, вызываю из сервлета вот так


    @EJB(name="ConfigControl")
    private ConfigControl config;
...

    public void init(ServletConfig servletConfig) {
        try {
          
            LOG.debug(config.getValue(ConfigControl.V_SITEID).toString());
            //doInit();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } finally {
           ...
        }
    }


валится НПЕ...
вот стэк


15:21:52,162 ERROR [STDERR] java.lang.NullPointerException
15:21:52,164 ERROR [STDERR] at Starter.init(Starter.java:82)
15:21:52,164 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
15:21:52,165 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
15:21:52,165 ERROR [STDERR] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
15:21:52,165 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
15:21:52,166 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
15:21:52,166 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
15:21:52,166 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
15:21:52,167 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:21:52,167 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:21:52,167 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,168 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,169 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
15:21:52,169 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
15:21:52,169 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,170 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5116)
15:21:52,170 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:21:52,171 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:21:52,171 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,171 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,172 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
15:21:52,172 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
15:21:52,173 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,173 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
15:21:52,173 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
15:21:52,174 ERROR [STDERR] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
15:21:52,174 ERROR [STDERR] at org.jboss.web.WebModule.startModule(WebModule.java:83)
15:21:52,174 ERROR [STDERR] at org.jboss.web.WebModule.startService(WebModule.java:61)
15:21:52,175 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
15:21:52,175 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
15:21:52,175 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
15:21:52,176 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,177 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,178 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
15:21:52,178 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
15:21:52,178 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
15:21:52,179 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
15:21:52,179 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,180 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
15:21:52,180 ERROR [STDERR] at $Proxy0.start(Unknown Source)
15:21:52,180 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
15:21:52,181 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
15:21:52,181 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,182 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,182 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
15:21:52,182 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
15:21:52,183 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
15:21:52,183 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
15:21:52,183 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,184 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
15:21:52,188 ERROR [STDERR] at $Proxy41.start(Unknown Source)
15:21:52,189 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
15:21:52,189 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:21:52,190 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:21:52,190 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,190 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,191 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
15:21:52,191 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
15:21:52,191 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
15:21:52,192 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
15:21:52,192 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
15:21:52,193 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
15:21:52,193 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
15:21:52,193 ERROR [STDERR] at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
15:21:52,194 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
15:21:52,194 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
15:21:52,194 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
15:21:52,195 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
15:21:52,195 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,196 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
15:21:52,197 ERROR [STDERR] at $Proxy42.start(Unknown Source)
15:21:52,197 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
15:21:52,198 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
15:21:52,198 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
15:21:52,198 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
15:21:52,199 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
15:21:52,199 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,199 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,200 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
15:21:52,200 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
15:21:52,201 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
15:21:52,201 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
15:21:52,201 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
15:21:52,202 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
15:21:52,202 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
15:21:52,212 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,212 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
15:21:52,213 ERROR [STDERR] at $Proxy6.deploy(Unknown Source)
15:21:52,213 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
15:21:52,213 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
15:21:52,214 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
15:21:52,214 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
15:21:52,214 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
15:21:52,215 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
15:21:52,215 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:21:52,215 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:21:52,256 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,256 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,257 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
15:21:52,257 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
15:21:52,257 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
15:21:52,258 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
15:21:52,258 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,259 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
15:21:52,259 ERROR [STDERR] at $Proxy0.start(Unknown Source)
15:21:52,260 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
15:21:52,260 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:21:52,261 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:21:52,261 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,261 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,262 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
15:21:52,262 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
15:21:52,262 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
15:21:52,263 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
15:21:52,263 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,263 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
15:21:52,264 ERROR [STDERR] at $Proxy4.start(Unknown Source)
15:21:52,264 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
15:21:52,264 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
15:21:52,265 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
15:21:52,265 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
15:21:52,265 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
15:21:52,266 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:21:52,266 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
15:21:52,266 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
15:21:52,267 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
15:21:52,267 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
15:21:52,268 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
15:21:52,268 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
15:21:52,268 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
15:21:52,269 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
15:21:52,269 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
15:21:52,270 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
15:21:52,270 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
15:21:52,270 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
15:21:52,271 ERROR [STDERR] at $Proxy5.deploy(Unknown Source)
15:21:52,271 ERROR [STDERR] at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
15:21:52,271 ERROR [STDERR] at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
15:21:52,272 ERROR [STDERR] at org.jboss.Main.boot(Main.java:200)
15:21:52,272 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:464)
15:21:52,272 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)


что может быть?
Re[5]: env-entry & mdb в ejb3
От: Sserega  
Дата: 22.06.07 16:15
Оценка:
Здравствуйте, pvnic, Вы писали:

P>валится НПЕ...

P>вот стэк

P>15:21:52,162 ERROR [STDERR] java.lang.NullPointerException

P>15:21:52,164 ERROR [STDERR] at Starter.init(Starter.java:82)
P>15:21:52,164 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)

P>что может быть?


А что такое Starter.java? Полагаю, это Ваш сервлет? Покажите код, может и можно будет понять что-нибудь.
Re[6]: env-entry & mdb в ejb3
От: pvnic  
Дата: 25.06.07 02:14
Оценка:
Здравствуйте, Sserega, Вы писали:

S>А что такое Starter.java? Полагаю, это Ваш сервлет? Покажите код, может и можно будет понять что-нибудь.


так я ж написал:


2) сделал по аналогии, вызываю из сервлета вот так

public class Starter extends HttpServlet {

....
    @EJB(name="ConfigControl")
    private ConfigControl config;
...

    public void init(ServletConfig servletConfig) {
        try {
          
            LOG.debug(config.getValue(ConfigControl.V_SITEID).toString());
            //doInit();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } finally {
           ...
        }
    }
...
}


и собственно поле config в дебажном выводе нул.
Re[6]: env-entry & mdb в ejb3
От: pvnic  
Дата: 25.06.07 09:56
Оценка:
Здравствуйте, Sserega, Вы писали:

вообщем такое ощущение, что из сервлета не получается получить ejb.
т.к. даже простейший бин не создается.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.