Re: Struts and EJB 3

2009-04-12 Thread Stefano Tranquillini
there's a class called org.apache.struts2.dispatcher.ServletDispatcherResult
 inside core 2.1.6.


On Sun, Apr 12, 2009 at 18:36, Martin Gainty  wrote:
>
> org.apache.struts2.dispatcher.ServletDispatcherResult should be in
> struts2-core-2.1.2.jar
> ?
> Martin
> __
> Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note 
> de déni et de confidentialité
> This message is confidential. If you should not be the intended receiver, 
> then we ask politely to report. Each unauthorized forwarding or manufacturing 
> of a copy is inadmissible. This message serves only for the exchange of 
> information and has no legal binding effect. Due to the easy manipulation of 
> emails we cannot take responsibility over the the contents.
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
>
>
>
>
>
>
>> From: stefano.tranquill...@gmail.com
>> Date: Sun, 12 Apr 2009 18:04:44 +0200
>> Subject: Re: Struts and EJB 3
>> To: user@struts.apache.org
>>
>> this is the error:
>>
>> 2009-04-12 18:00:06,562 WARN
>> [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]
>> (HDScanner) Result class [org.apache.struts2.views.tiles.TilesResult]
>> doesn't exist (NoClassDefFoundError) at result-type -
>> vfszip:/C:/Documents%20and%20Settings/Administrator/Desktop/jboss-5.0.0.GA/server/default/deploy/TestStruts.ear/struts2-tiles-plugin-2.1.6.jar/struts-plugin.xml:31:91,
>> ignoring
>> java.lang.NoClassDefFoundError:
>> org/apache/struts2/dispatcher/ServletDispatcherResult
>>       at java.lang.ClassLoader.defineClass1(Native Method)
>>       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:62)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:509)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:469)
>>       at java.security.AccessController.doPrivileged(Native Method)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:467)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:444)
>>       at 
>> org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)
>>       at 
>> org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
>>       at 
>> org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)
>>       at 
>> org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:254)
>>       at 
>> org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:148)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:256)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1099)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:735)
>>       at 
>> org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:378)
>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>       at java.lang.Class.forName0(Native Method)
>>       at java.lang.Class.forName(Class.java:247)
>>       at 
>> org.jboss.classloader.plugins.loader.ClassLoaderToLoaderAdapter.loadClass(ClassLoaderToLoaderAdapter.java:173)
>>       at 
>> org.jboss.classloader.spi.ClassLoaderDom

RE: Struts and EJB 3

2009-04-12 Thread Martin Gainty

org.apache.struts2.dispatcher.ServletDispatcherResult should be in 
struts2-core-2.1.2.jar
?
Martin 
__ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de 
déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.






> From: stefano.tranquill...@gmail.com
> Date: Sun, 12 Apr 2009 18:04:44 +0200
> Subject: Re: Struts and EJB 3
> To: user@struts.apache.org
> 
> this is the error:
> 
> 2009-04-12 18:00:06,562 WARN
> [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider]
> (HDScanner) Result class [org.apache.struts2.views.tiles.TilesResult]
> doesn't exist (NoClassDefFoundError) at result-type -
> vfszip:/C:/Documents%20and%20Settings/Administrator/Desktop/jboss-5.0.0.GA/server/default/deploy/TestStruts.ear/struts2-tiles-plugin-2.1.6.jar/struts-plugin.xml:31:91,
> ignoring
> java.lang.NoClassDefFoundError:
> org/apache/struts2/dispatcher/ServletDispatcherResult
>   at java.lang.ClassLoader.defineClass1(Native Method)
>   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:62)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:509)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:467)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:444)
>   at 
> org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)
>   at 
> org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
>   at 
> org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)
>   at 
> org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:254)
>   at 
> org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:148)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:256)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1099)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:735)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:378)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Class.java:247)
>   at 
> org.jboss.classloader.plugins.loader.ClassLoaderToLoaderAdapter.loadClass(ClassLoaderToLoaderAdapter.java:173)
>   at 
> org.jboss.classloader.spi.ClassLoaderDomain.loadClassFromParent(ClassLoaderDomain.java:352)
>   at 
> org.jboss.classloader.spi.ClassLoaderDomain.loadClassAfter(ClassLoaderDomain.java:323)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:262)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1099)
>   at 
> org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:735)
>   at 
&

Re: Struts and EJB 3

2009-04-12 Thread Stefano Tranquillini
iven the context
>>>>> and recall the remote object. is not so bad as solution but using
>>>>> ejb3.0 i loose something like the auto-jndi.
>>>>>
>>>>> well, i take a look about google guice anyway.
>>>>>
>>>>> thanks folks
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Apr 10, 2009 at 17:14, Struts Two  wrote:
>>>>>>
>>>>>> @EJB annotation can be used only with container managed components like
>>>>>> Servlet and JSF beans. Other than that either you have to use spring or
>>>>>> right a customized EJB3 interceptor for struts 2 or modify request
>>>>>> processing command chains for struts 1.3 to inject EJB 3 beans.
>>>>>>
>>>>>> Keep in mind you can also use Google Guice to do that as well [if you
>>>>>> are
>>>>>> not using any other spring goodies, Guice should very easy to set up]
>>>>>>
>>>>>>
>>>>>>
>>>>>> --- On Fri, 4/10/09, Stefano Tranquillini
>>>>>>  wrote:
>>>>>>
>>>>>>> From: Stefano Tranquillini 
>>>>>>> Subject: Re: Struts and EJB 3
>>>>>>> To: "Struts Users Mailing List" 
>>>>>>> Received: Friday, April 10, 2009, 2:39 PM
>>>>>>> Yes, i'll try to use, but the ejb
>>>>>>> with annotation gives me a
>>>>>>> nullpointer exception.
>>>>>>> i've to call the ejb using the old style jndi call.
>>>>>>>
>>>>>>> On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart
>>>>>>> 
>>>>>>> wrote:
>>>>>>> > 2009/4/10 Stefano :
>>>>>>> >> in struts1 what's the way to use EJB3.0?
>>>>>>> >>
>>>>>>> >> there's no possibility to use annotation?
>>>>>>> >> i need to use classical jndi? why?
>>>>>>> >
>>>>>>> > You can use annotations with Struts1, is not a problem
>>>>>>> with framework
>>>>>>> > but with Java platform you're using. THe best solution
>>>>>>> is to use
>>>>>>> > Spring to connect Struts1 Actions with EJB3 beans.
>>>>>>> >
>>>>>>> >
>>>>>>> > Regards
>>>>>>> > --
>>>>>>> > Lukasz
>>>>>>> > http://www.lenart.org.pl/
>>>>>>> >
>>>>>>> >
>>>>>>> -
>>>>>>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>>> > For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>> >
>>>>>>> >
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Stefano
>>>>>>>
>>>>>>> -
>>>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>      __
>>>>>> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark
>>>>>> your
>>>>>> favourite sites. Download it now
>>>>>> http://ca.toolbar.yahoo.com.
>>>>>>
>>>>>>
>>>>>> -
>>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Stefano
>>>>>
>>>>> -
>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Struts-and-EJB-3-tp22368697p22993709.html
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Stefano
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/Struts-and-EJB-3-tp22368697p23002249.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> Stefano
>



-- 
Stefano

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts and EJB 3

2009-04-11 Thread Stefano Tranquillini
which jars did you put?
i've a only ear that contains both ejb and web (struts) application.
tomorrow i'll try to do something (if i've some time, is easter) and
put the exceptions.
thanks

2009/4/11 Ignacio de Córdoba :
>
> Hi, I use JDeveloper but I just ad jars in the standard tiles and struts
> distributions without any changes. Anyway, what is your exception when
> trying to start the web-app? Maybe you should start there. Look at the
> missing class and ensure it is in a jar inside WEB-INF/lib. Also, how do you
> deploy EJBs? I use a different .ear file so to isolate layers (model <->
> view)
>
>
> Stefano Tranquillini wrote:
>>
>> Hi,
>> Have you got a list of the libraries or a blank-simply application
>> that contains struts2 tiles2 and ejb3 extension.
>>
>> i usually use netbeans, do you put the library inside web-inf/lib and
>> put these libraries into the project? nothing else?
>>
>> thanks.
>>
>> 2009/4/10 Ignacio de Córdoba :
>>>
>>> Hi there,
>>> I am using struts2 and tiles2 with JBoss 4 without any problems. I use no
>>> other frameworks or libraries. I got the EJB3 extension for struts2
>>> (which
>>> does JNDI call internally as an interceptor) and even added a new
>>> functionality (it only locates EJBs in current class but coder forgot
>>> that
>>> there can be a parent class which also has de Annotation().
>>> Where are you putting those struts jars so that jboss webapps don't find
>>> them? I put them in WEB-INF/lib without any problems.
>>>
>>> Regards,
>>> Ignacio
>>>
>>>
>>> Stefano Tranquillini wrote:
>>>>
>>>> I'm not familiar with jsf and other stuff.
>>>> first taken struts1 I'll try to use struts2 tiles2 jboss, struts2 has
>>>> a plugin for the ejb3 (i think is an interceptor) but tiles2 and
>>>> struts2 doesn't work with jboss (struts2 without tiles2 works, with
>>>> tiles2 doesn't), jboss can't find the struts tags (it might be a bug,
>>>> some one knows something about these stuff?).
>>>> so i'm came back to the previous version 1.X (i don't remember exactly
>>>> the number).
>>>>
>>>> so, in my case the simpler way is to use the jndi given the context
>>>> and recall the remote object. is not so bad as solution but using
>>>> ejb3.0 i loose something like the auto-jndi.
>>>>
>>>> well, i take a look about google guice anyway.
>>>>
>>>> thanks folks
>>>>
>>>>
>>>>
>>>> On Fri, Apr 10, 2009 at 17:14, Struts Two  wrote:
>>>>>
>>>>> @EJB annotation can be used only with container managed components like
>>>>> Servlet and JSF beans. Other than that either you have to use spring or
>>>>> right a customized EJB3 interceptor for struts 2 or modify request
>>>>> processing command chains for struts 1.3 to inject EJB 3 beans.
>>>>>
>>>>> Keep in mind you can also use Google Guice to do that as well [if you
>>>>> are
>>>>> not using any other spring goodies, Guice should very easy to set up]
>>>>>
>>>>>
>>>>>
>>>>> --- On Fri, 4/10/09, Stefano Tranquillini
>>>>>  wrote:
>>>>>
>>>>>> From: Stefano Tranquillini 
>>>>>> Subject: Re: Struts and EJB 3
>>>>>> To: "Struts Users Mailing List" 
>>>>>> Received: Friday, April 10, 2009, 2:39 PM
>>>>>> Yes, i'll try to use, but the ejb
>>>>>> with annotation gives me a
>>>>>> nullpointer exception.
>>>>>> i've to call the ejb using the old style jndi call.
>>>>>>
>>>>>> On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart
>>>>>> 
>>>>>> wrote:
>>>>>> > 2009/4/10 Stefano :
>>>>>> >> in struts1 what's the way to use EJB3.0?
>>>>>> >>
>>>>>> >> there's no possibility to use annotation?
>>>>>> >> i need to use classical jndi? why?
>>>>>> >
>>>>>> > You can use annotations with Struts1, is not a problem
>>>>>> with framework
>>>>>> > but with Java platform you're using. THe

Re: Struts and EJB 3

2009-04-11 Thread Ignacio de Córdoba

Hi, I use JDeveloper but I just ad jars in the standard tiles and struts
distributions without any changes. Anyway, what is your exception when
trying to start the web-app? Maybe you should start there. Look at the
missing class and ensure it is in a jar inside WEB-INF/lib. Also, how do you
deploy EJBs? I use a different .ear file so to isolate layers (model <->
view)


Stefano Tranquillini wrote:
> 
> Hi,
> Have you got a list of the libraries or a blank-simply application
> that contains struts2 tiles2 and ejb3 extension.
> 
> i usually use netbeans, do you put the library inside web-inf/lib and
> put these libraries into the project? nothing else?
> 
> thanks.
> 
> 2009/4/10 Ignacio de Córdoba :
>>
>> Hi there,
>> I am using struts2 and tiles2 with JBoss 4 without any problems. I use no
>> other frameworks or libraries. I got the EJB3 extension for struts2
>> (which
>> does JNDI call internally as an interceptor) and even added a new
>> functionality (it only locates EJBs in current class but coder forgot
>> that
>> there can be a parent class which also has de Annotation().
>> Where are you putting those struts jars so that jboss webapps don't find
>> them? I put them in WEB-INF/lib without any problems.
>>
>> Regards,
>> Ignacio
>>
>>
>> Stefano Tranquillini wrote:
>>>
>>> I'm not familiar with jsf and other stuff.
>>> first taken struts1 I'll try to use struts2 tiles2 jboss, struts2 has
>>> a plugin for the ejb3 (i think is an interceptor) but tiles2 and
>>> struts2 doesn't work with jboss (struts2 without tiles2 works, with
>>> tiles2 doesn't), jboss can't find the struts tags (it might be a bug,
>>> some one knows something about these stuff?).
>>> so i'm came back to the previous version 1.X (i don't remember exactly
>>> the number).
>>>
>>> so, in my case the simpler way is to use the jndi given the context
>>> and recall the remote object. is not so bad as solution but using
>>> ejb3.0 i loose something like the auto-jndi.
>>>
>>> well, i take a look about google guice anyway.
>>>
>>> thanks folks
>>>
>>>
>>>
>>> On Fri, Apr 10, 2009 at 17:14, Struts Two  wrote:
>>>>
>>>> @EJB annotation can be used only with container managed components like
>>>> Servlet and JSF beans. Other than that either you have to use spring or
>>>> right a customized EJB3 interceptor for struts 2 or modify request
>>>> processing command chains for struts 1.3 to inject EJB 3 beans.
>>>>
>>>> Keep in mind you can also use Google Guice to do that as well [if you
>>>> are
>>>> not using any other spring goodies, Guice should very easy to set up]
>>>>
>>>>
>>>>
>>>> --- On Fri, 4/10/09, Stefano Tranquillini
>>>>  wrote:
>>>>
>>>>> From: Stefano Tranquillini 
>>>>> Subject: Re: Struts and EJB 3
>>>>> To: "Struts Users Mailing List" 
>>>>> Received: Friday, April 10, 2009, 2:39 PM
>>>>> Yes, i'll try to use, but the ejb
>>>>> with annotation gives me a
>>>>> nullpointer exception.
>>>>> i've to call the ejb using the old style jndi call.
>>>>>
>>>>> On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart
>>>>> 
>>>>> wrote:
>>>>> > 2009/4/10 Stefano :
>>>>> >> in struts1 what's the way to use EJB3.0?
>>>>> >>
>>>>> >> there's no possibility to use annotation?
>>>>> >> i need to use classical jndi? why?
>>>>> >
>>>>> > You can use annotations with Struts1, is not a problem
>>>>> with framework
>>>>> > but with Java platform you're using. THe best solution
>>>>> is to use
>>>>> > Spring to connect Struts1 Actions with EJB3 beans.
>>>>> >
>>>>> >
>>>>> > Regards
>>>>> > --
>>>>> > Lukasz
>>>>> > http://www.lenart.org.pl/
>>>>> >
>>>>> >
>>>>> -
>>>>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>> > For additional commands, e-mail: user-h...@struts.apache.org
>>&g

Re: Struts and EJB 3

2009-04-11 Thread Stefano Tranquillini
Hi,
Have you got a list of the libraries or a blank-simply application
that contains struts2 tiles2 and ejb3 extension.

i usually use netbeans, do you put the library inside web-inf/lib and
put these libraries into the project? nothing else?

thanks.

2009/4/10 Ignacio de Córdoba :
>
> Hi there,
> I am using struts2 and tiles2 with JBoss 4 without any problems. I use no
> other frameworks or libraries. I got the EJB3 extension for struts2 (which
> does JNDI call internally as an interceptor) and even added a new
> functionality (it only locates EJBs in current class but coder forgot that
> there can be a parent class which also has de Annotation().
> Where are you putting those struts jars so that jboss webapps don't find
> them? I put them in WEB-INF/lib without any problems.
>
> Regards,
> Ignacio
>
>
> Stefano Tranquillini wrote:
>>
>> I'm not familiar with jsf and other stuff.
>> first taken struts1 I'll try to use struts2 tiles2 jboss, struts2 has
>> a plugin for the ejb3 (i think is an interceptor) but tiles2 and
>> struts2 doesn't work with jboss (struts2 without tiles2 works, with
>> tiles2 doesn't), jboss can't find the struts tags (it might be a bug,
>> some one knows something about these stuff?).
>> so i'm came back to the previous version 1.X (i don't remember exactly
>> the number).
>>
>> so, in my case the simpler way is to use the jndi given the context
>> and recall the remote object. is not so bad as solution but using
>> ejb3.0 i loose something like the auto-jndi.
>>
>> well, i take a look about google guice anyway.
>>
>> thanks folks
>>
>>
>>
>> On Fri, Apr 10, 2009 at 17:14, Struts Two  wrote:
>>>
>>> @EJB annotation can be used only with container managed components like
>>> Servlet and JSF beans. Other than that either you have to use spring or
>>> right a customized EJB3 interceptor for struts 2 or modify request
>>> processing command chains for struts 1.3 to inject EJB 3 beans.
>>>
>>> Keep in mind you can also use Google Guice to do that as well [if you are
>>> not using any other spring goodies, Guice should very easy to set up]
>>>
>>>
>>>
>>> --- On Fri, 4/10/09, Stefano Tranquillini
>>>  wrote:
>>>
>>>> From: Stefano Tranquillini 
>>>> Subject: Re: Struts and EJB 3
>>>> To: "Struts Users Mailing List" 
>>>> Received: Friday, April 10, 2009, 2:39 PM
>>>> Yes, i'll try to use, but the ejb
>>>> with annotation gives me a
>>>> nullpointer exception.
>>>> i've to call the ejb using the old style jndi call.
>>>>
>>>> On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart
>>>> 
>>>> wrote:
>>>> > 2009/4/10 Stefano :
>>>> >> in struts1 what's the way to use EJB3.0?
>>>> >>
>>>> >> there's no possibility to use annotation?
>>>> >> i need to use classical jndi? why?
>>>> >
>>>> > You can use annotations with Struts1, is not a problem
>>>> with framework
>>>> > but with Java platform you're using. THe best solution
>>>> is to use
>>>> > Spring to connect Struts1 Actions with EJB3 beans.
>>>> >
>>>> >
>>>> > Regards
>>>> > --
>>>> > Lukasz
>>>> > http://www.lenart.org.pl/
>>>> >
>>>> >
>>>> -
>>>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>> > For additional commands, e-mail: user-h...@struts.apache.org
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Stefano
>>>>
>>>> -------------
>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>
>>>>
>>>
>>>
>>>      __
>>> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
>>> favourite sites. Download it now
>>> http://ca.toolbar.yahoo.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Stefano
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Struts-and-EJB-3-tp22368697p22993709.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Stefano

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts and EJB 3

2009-04-10 Thread Ignacio de Córdoba

Hi there,
I am using struts2 and tiles2 with JBoss 4 without any problems. I use no
other frameworks or libraries. I got the EJB3 extension for struts2 (which
does JNDI call internally as an interceptor) and even added a new
functionality (it only locates EJBs in current class but coder forgot that
there can be a parent class which also has de Annotation().
Where are you putting those struts jars so that jboss webapps don't find
them? I put them in WEB-INF/lib without any problems.

Regards,
Ignacio


Stefano Tranquillini wrote:
> 
> I'm not familiar with jsf and other stuff.
> first taken struts1 I'll try to use struts2 tiles2 jboss, struts2 has
> a plugin for the ejb3 (i think is an interceptor) but tiles2 and
> struts2 doesn't work with jboss (struts2 without tiles2 works, with
> tiles2 doesn't), jboss can't find the struts tags (it might be a bug,
> some one knows something about these stuff?).
> so i'm came back to the previous version 1.X (i don't remember exactly
> the number).
> 
> so, in my case the simpler way is to use the jndi given the context
> and recall the remote object. is not so bad as solution but using
> ejb3.0 i loose something like the auto-jndi.
> 
> well, i take a look about google guice anyway.
> 
> thanks folks
> 
> 
> 
> On Fri, Apr 10, 2009 at 17:14, Struts Two  wrote:
>>
>> @EJB annotation can be used only with container managed components like
>> Servlet and JSF beans. Other than that either you have to use spring or
>> right a customized EJB3 interceptor for struts 2 or modify request
>> processing command chains for struts 1.3 to inject EJB 3 beans.
>>
>> Keep in mind you can also use Google Guice to do that as well [if you are
>> not using any other spring goodies, Guice should very easy to set up]
>>
>>
>>
>> --- On Fri, 4/10/09, Stefano Tranquillini
>>  wrote:
>>
>>> From: Stefano Tranquillini 
>>> Subject: Re: Struts and EJB 3
>>> To: "Struts Users Mailing List" 
>>> Received: Friday, April 10, 2009, 2:39 PM
>>> Yes, i'll try to use, but the ejb
>>> with annotation gives me a
>>> nullpointer exception.
>>> i've to call the ejb using the old style jndi call.
>>>
>>> On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart
>>> 
>>> wrote:
>>> > 2009/4/10 Stefano :
>>> >> in struts1 what's the way to use EJB3.0?
>>> >>
>>> >> there's no possibility to use annotation?
>>> >> i need to use classical jndi? why?
>>> >
>>> > You can use annotations with Struts1, is not a problem
>>> with framework
>>> > but with Java platform you're using. THe best solution
>>> is to use
>>> > Spring to connect Struts1 Actions with EJB3 beans.
>>> >
>>> >
>>> > Regards
>>> > --
>>> > Lukasz
>>> > http://www.lenart.org.pl/
>>> >
>>> >
>>> -
>>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> > For additional commands, e-mail: user-h...@struts.apache.org
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Stefano
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>>      __
>> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
>> favourite sites. Download it now
>> http://ca.toolbar.yahoo.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> 
> 
> -- 
> Stefano
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-and-EJB-3-tp22368697p22993709.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts and EJB 3

2009-04-10 Thread Stefano Tranquillini
I'm not familiar with jsf and other stuff.
first taken struts1 I'll try to use struts2 tiles2 jboss, struts2 has
a plugin for the ejb3 (i think is an interceptor) but tiles2 and
struts2 doesn't work with jboss (struts2 without tiles2 works, with
tiles2 doesn't), jboss can't find the struts tags (it might be a bug,
some one knows something about these stuff?).
so i'm came back to the previous version 1.X (i don't remember exactly
the number).

so, in my case the simpler way is to use the jndi given the context
and recall the remote object. is not so bad as solution but using
ejb3.0 i loose something like the auto-jndi.

well, i take a look about google guice anyway.

thanks folks



On Fri, Apr 10, 2009 at 17:14, Struts Two  wrote:
>
> @EJB annotation can be used only with container managed components like 
> Servlet and JSF beans. Other than that either you have to use spring or right 
> a customized EJB3 interceptor for struts 2 or modify request processing 
> command chains for struts 1.3 to inject EJB 3 beans.
>
> Keep in mind you can also use Google Guice to do that as well [if you are not 
> using any other spring goodies, Guice should very easy to set up]
>
>
>
> --- On Fri, 4/10/09, Stefano Tranquillini  
> wrote:
>
>> From: Stefano Tranquillini 
>> Subject: Re: Struts and EJB 3
>> To: "Struts Users Mailing List" 
>> Received: Friday, April 10, 2009, 2:39 PM
>> Yes, i'll try to use, but the ejb
>> with annotation gives me a
>> nullpointer exception.
>> i've to call the ejb using the old style jndi call.
>>
>> On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart
>> 
>> wrote:
>> > 2009/4/10 Stefano :
>> >> in struts1 what's the way to use EJB3.0?
>> >>
>> >> there's no possibility to use annotation?
>> >> i need to use classical jndi? why?
>> >
>> > You can use annotations with Struts1, is not a problem
>> with framework
>> > but with Java platform you're using. THe best solution
>> is to use
>> > Spring to connect Struts1 Actions with EJB3 beans.
>> >
>> >
>> > Regards
>> > --
>> > Lukasz
>> > http://www.lenart.org.pl/
>> >
>> >
>> -
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Stefano
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>      __
> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
> favourite sites. Download it now
> http://ca.toolbar.yahoo.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Stefano

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts and EJB 3

2009-04-10 Thread Struts Two

@EJB annotation can be used only with container managed components like Servlet 
and JSF beans. Other than that either you have to use spring or right a 
customized EJB3 interceptor for struts 2 or modify request processing command 
chains for struts 1.3 to inject EJB 3 beans.

Keep in mind you can also use Google Guice to do that as well [if you are not 
using any other spring goodies, Guice should very easy to set up]



--- On Fri, 4/10/09, Stefano Tranquillini  
wrote:

> From: Stefano Tranquillini 
> Subject: Re: Struts and EJB 3
> To: "Struts Users Mailing List" 
> Received: Friday, April 10, 2009, 2:39 PM
> Yes, i'll try to use, but the ejb
> with annotation gives me a
> nullpointer exception.
> i've to call the ejb using the old style jndi call.
> 
> On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart
> 
> wrote:
> > 2009/4/10 Stefano :
> >> in struts1 what's the way to use EJB3.0?
> >>
> >> there's no possibility to use annotation?
> >> i need to use classical jndi? why?
> >
> > You can use annotations with Struts1, is not a problem
> with framework
> > but with Java platform you're using. THe best solution
> is to use
> > Spring to connect Struts1 Actions with EJB3 beans.
> >
> >
> > Regards
> > --
> > Lukasz
> > http://www.lenart.org.pl/
> >
> >
> -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> 
> -- 
> Stefano
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 


  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now
http://ca.toolbar.yahoo.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts and EJB 3

2009-04-10 Thread Stefano Tranquillini
Yes, i'll try to use, but the ejb with annotation gives me a
nullpointer exception.
i've to call the ejb using the old style jndi call.

On Fri, Apr 10, 2009 at 15:25, Lukasz Lenart
 wrote:
> 2009/4/10 Stefano :
>> in struts1 what's the way to use EJB3.0?
>>
>> there's no possibility to use annotation?
>> i need to use classical jndi? why?
>
> You can use annotations with Struts1, is not a problem with framework
> but with Java platform you're using. THe best solution is to use
> Spring to connect Struts1 Actions with EJB3 beans.
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Stefano

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts and EJB 3

2009-04-10 Thread Lukasz Lenart
2009/4/10 Stefano :
> in struts1 what's the way to use EJB3.0?
>
> there's no possibility to use annotation?
> i need to use classical jndi? why?

You can use annotations with Struts1, is not a problem with framework
but with Java platform you're using. THe best solution is to use
Spring to connect Struts1 Actions with EJB3 beans.


Regards
-- 
Lukasz
http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts and EJB 3

2009-04-10 Thread Stefano
in struts1 what's the way to use EJB3.0?

there's no possibility to use annotation?
i need to use classical jndi? why?

thanks

On Fri, Mar 6, 2009 at 13:24, Ignacio de Córdoba  wrote:
>
> Hi,
> I'm us¡ng JBoss and @EJB doesn't work either. Are you using Struts1 or
> Struts2? If Struts2, You can use the extension for EJB3 for Struts2. It
> works OK (interceptor).
>
>
> senderj wrote:
>>
>> My env is Netbean with Glassfish. I am able to create a servlet to call
>> EJB with this code:
>>
>> public class TryAdvise_create extends HttpServlet {
>>     @EJB
>>     AdviseFacadeRemote advBean;
>>     ..
>>     protected void processRequest(HttpServletRequest request,  {
>>     ..
>>         Advise adv = new Advise(123, "123 Company");
>>         advBean.create(adv);
>>
>> It works great. But when doing the same on a Struts Action:
>>
>> public class TryAdviseAction extends Action {
>>     @EJB
>>     AdviseFacadeRemote advBean;
>>     ..
>>     public ActionForward execute(ActionMapping mapping, ..... {
>>         Advise a = advBean.find(new Long(1));
>>
>> advBean is always null. Why? Please help.
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Struts-and-EJB-3-tp22368697p22369485.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Stefano

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts and EJB 3

2009-03-06 Thread Ignacio de Córdoba

Hi,
I'm us¡ng JBoss and @EJB doesn't work either. Are you using Struts1 or
Struts2? If Struts2, You can use the extension for EJB3 for Struts2. It
works OK (interceptor).


senderj wrote:
> 
> My env is Netbean with Glassfish. I am able to create a servlet to call
> EJB with this code:
> 
> public class TryAdvise_create extends HttpServlet {
> @EJB
> AdviseFacadeRemote advBean;
> ..
> protected void processRequest(HttpServletRequest request,  {
> ..
> Advise adv = new Advise(123, "123 Company");
> advBean.create(adv);
>
> It works great. But when doing the same on a Struts Action:
> 
> public class TryAdviseAction extends Action {
> @EJB
> AdviseFacadeRemote advBean;
> ..
> public ActionForward execute(ActionMapping mapping, . {
> Advise a = advBean.find(new Long(1));
> 
> advBean is always null. Why? Please help.
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-and-EJB-3-tp22368697p22369485.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts and EJB 3

2009-03-06 Thread senderj

My env is Netbean with Glassfish. I am able to create a servlet to call EJB
with this code:

public class TryAdvise_create extends HttpServlet {
@EJB
AdviseFacadeRemote advBean;
..
protected void processRequest(HttpServletRequest request,  {
..
Advise adv = new Advise(123, "123 Company");
advBean.create(adv);
   
It works great. But when doing the same on a Struts Action:

public class TryAdviseAction extends Action {
@EJB
AdviseFacadeRemote advBean;
..
public ActionForward execute(ActionMapping mapping, . {
Advise a = advBean.find(new Long(1));

advBean is always null. Why? Please help.
-- 
View this message in context: 
http://www.nabble.com/Struts-and-EJB-3-tp22368697p22368697.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org