You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Nitin Gupta <it...@gmail.com> on 2009/03/27 15:36:25 UTC
Using Stateless Bean as WebService and Remote Interface Both
I want to use Stateless EJB Bean to be used both as web-service and also
using remote interface.
when i define EJB as a service-endpoint then then it can be used only as a
web-service. when i invoking this EJB through Remote interface i am getting
this Error :-
Exception in thread "main" javax.ejb.EJBException: The bean encountered a
non-application exception; nested exception is:
java.lang.IllegalArgumentException: WebService calls must follow format
{messageContext, interceptor, [arg...]}.
at
org.apache.openejb.client.EJBInvocationHandler.convertException(EJBInvocationHandler.java:219)
at
org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:162)
at
org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
at
org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
please advice me ...
--
View this message in context: http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p22742953.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Nitin Gupta <it...@gmail.com>.
Hi David, I am using Apache Geronimo Server.
Thanks,
Regards:-
Nitin Gupta.
On Sat, Mar 28, 2009 at 6:58 AM, David Blevins <da...@visi.com>wrote:
>
> On Mar 27, 2009, at 7:36 AM, Nitin Gupta wrote:
>
>
>> I want to use Stateless EJB Bean to be used both as web-service and also
>> using remote interface.
>>
>> when i define EJB as a service-endpoint then then it can be used only as a
>> web-service. when i invoking this EJB through Remote interface i am
>> getting
>> this Error :-
>>
>> Exception in thread "main" javax.ejb.EJBException: The bean encountered a
>> non-application exception; nested exception is:
>> java.lang.IllegalArgumentException: WebService calls must follow
>> format
>> {messageContext, interceptor, [arg...]}.
>> at
>>
>> org.apache.openejb.client.EJBInvocationHandler.convertException(EJBInvocationHandler.java:219)
>> at
>>
>> org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:162)
>> at
>>
>> org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
>> at
>>
>> org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
>>
>> please advice me ...
>>
>
> Hi Nitin,
>
> This has come up a couple times this month:
>
>
> http://www.nabble.com/Re%3A-lose-remote-interface-when-creating-web-service-annotation-p22380170.html
>
> (this one shows a spec compliant workaround)
>
> http://www.nabble.com/User-Blog%3A-Using-OpenEJB-for-EJB3-testing-with-Maven2-to22323088.html
>
> Pascal, Howard, Nitin,
>
> I've brought this up on the EJB 3.1 Expert Group. If this is a feature
> you're using now in another server, let me know what platform that is. It
> will be a big help in possibly getting this supported at the spec level.
>
> -David
>
>
--
Regards:-
Nitin Gupta.
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
David Blevins wrote:
>
>
>> If you want, I can propably give you some help for CXF.
>> I've done lots of enhancements and may I can go a step further.
>
> If either you or Jon (or both) wanted to look into this one, that'd be
> great:
>
> https://issues.apache.org/jira/browse/OPENEJB-1020
>
>
Definitely !
I will first have a look on CXF (standalone) and then, I will see how to get
it working with OpenEJB.
As far as I already know, it only works with CXF 2.1.x
Jean-Louis
--
View this message in context: http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23195783.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Jean-Sébastien Scrève <je...@atosorigin.com>.
Hi Jonathan,
I sent a first patch revision. You can find it here :
https://issues.apache.org/jira/browse/OPENEJB-977
As I mentionned in the Jira, there's still something I'm not happy with. I'm
still working on it.
Best regards,
Jean-Sébastien Scrève.
Jonathan Gallimore-2 wrote:
>
> It would be great to see it - I'm certainly happy to give it a go if you
> want to post a patch.
>
> Cheers
>
> Jon
>
> On Wed, May 13, 2009 at 2:37 PM, Jean-Sébastien Scrève <
> jean-sebastien.screve@atosorigin.com> wrote:
>
>>
>> Hi all,
>>
>> Actually I'm the one that worked on this migration that Jean-Louis talked
>> about. I started just few days ago. All seem to work fine except the
>> Attachement example.
>> Here is my post on CXF mailing list :
>> http://www.nabble.com/Migrating-to-CXF-2.2-in-OpenEJB-to23518058.html
>> It seems we are not able to easily override the Jetty transport factory
>> anymore.
>>
>> I'll be able to work on it again on Thursday or Friday.
>>
>> Would you like a temporary patch to have a look at it?
>>
>> Best regards,
>>
>> Jean-Sébastien Scrève.
>>
>>
>> Jonathan Gallimore-2 wrote:
>> >
>> > Hi Jean-Louis,
>> >
>> > That's really useful info - I had reached the conclusion that the
>> version
>> > of
>> > CXF we're using doesn't support this, but didn't realise that its a
>> JAX-WS
>> > 2.1 feature. I did have look through the code and thought it might be
>> > possible to modify the OpenEJB CXF classes to use methods on the
>> > superinterface, but haven't really got anywhere with it. I also think
>> we'd
>> > run into problems with things on the client side as well.
>> >
>> > It would be great to move to a newer version of CXF. I'm looking
>> forward
>> > to
>> > seeing how you get on. I'm happy to help in any way I can.
>> >
>> > Cheers
>> >
>> > Jon
>> >
>> > On Thu, Apr 30, 2009 at 1:24 PM, Jean-Louis MONTEIRO <
>> > jean-louis.monteiro@atosorigin.com> wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >> I've done some tests around this topic.
>> >> I checked over specifications first and I've seen it's a JAX-WS 2.1
>> >> feature.
>> >>
>> >> By default, the runtime just examines the exact classes referenced
>> from
>> >> the
>> >> SEI interface to figure out what classes need to be bound into the
>> JAXB
>> >> context. A way to change it is to use the JAXB annotation @XmlSeeAlso
>> >> where
>> >> it's needed.
>> >>
>> >> For example:
>> >> @WebService
>> >> public interface BaseService {
>> >> String echo(String toEcho);
>> >> }
>> >> @WebService
>> >> public interface HelloWorld extends BaseService {
>> >> String sayHi(String text);
>> >> }
>> >> @WebService(serviceName = "HelloWorld")
>> >> @XmlSeeAlso(value = {BaseService.class})
>> >> public class HelloWorldImpl implements HelloWorld {
>> >>
>> >> public String sayHi(String text) {
>> >> return "Hello " + text;
>> >> }
>> >>
>> >> public String echo(String toEcho) {
>> >> return toEcho;
>> >> }
>> >>
>> >> }
>> >>
>> >> But the case is that OpenEJB embeds CXF 2.0.x which does not support
>> >> JAX-WS
>> >> 2.1
>> >> To support interface inheritance, we have to migrate to CXF 2.1 (min)
>> >>
>> >> I've tested it with CXF (standalone) and it works fine.
>> >> But, we can not change CXF version out of the box in OpenEJB because
>> API
>> >> has
>> >> been modified.
>> >>
>> >> I'm working with a colleague to get OpenEJB compiling and running with
>> >> CXF
>> >> 2.2.1 (lastest version available).
>> >>
>> >> First results are expected by the end of this week.
>> >>
>> >> Kind regards,
>> >> Jean-Louis
>> >>
>> >>
>> >>
>> >>
>> >> David Blevins wrote:
>> >> >
>> >> > Ok, this feature is now in. In OpenEJB 3.1.1 this will work fine:
>> >> >
>> >> > @Local
>> >> > @Remote
>> >> > @WebService
>> >> > public interface Everything {
>> >> > public Object echo(Object o);
>> >> > }
>> >> >
>> >> > public class SuperBean implements Everything {
>> >> > public Object echo(Object o) {
>> >> > return o;
>> >> > }
>> >> > }
>> >> >
>> >> > Careful though as combining @Remote and @Local on the same interface
>> >> > is still against the spec and won't be portable. It'll work fine
>> in
>> >> > OpenEJB, but likely nowhere else.
>> >> >
>> >> > When using both @Local and @Remote on the same interface, you will
>> >> > always get the @Local version of the proxy where possible.
>> >> >
>> >> >
>> >> > -David
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23315250.html
>> >> Sent from the OpenEJB User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23521907.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23562138.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Jonathan Gallimore <jo...@gmail.com>.
It would be great to see it - I'm certainly happy to give it a go if you
want to post a patch.
Cheers
Jon
On Wed, May 13, 2009 at 2:37 PM, Jean-Sébastien Scrève <
jean-sebastien.screve@atosorigin.com> wrote:
>
> Hi all,
>
> Actually I'm the one that worked on this migration that Jean-Louis talked
> about. I started just few days ago. All seem to work fine except the
> Attachement example.
> Here is my post on CXF mailing list :
> http://www.nabble.com/Migrating-to-CXF-2.2-in-OpenEJB-to23518058.html
> It seems we are not able to easily override the Jetty transport factory
> anymore.
>
> I'll be able to work on it again on Thursday or Friday.
>
> Would you like a temporary patch to have a look at it?
>
> Best regards,
>
> Jean-Sébastien Scrève.
>
>
> Jonathan Gallimore-2 wrote:
> >
> > Hi Jean-Louis,
> >
> > That's really useful info - I had reached the conclusion that the version
> > of
> > CXF we're using doesn't support this, but didn't realise that its a
> JAX-WS
> > 2.1 feature. I did have look through the code and thought it might be
> > possible to modify the OpenEJB CXF classes to use methods on the
> > superinterface, but haven't really got anywhere with it. I also think
> we'd
> > run into problems with things on the client side as well.
> >
> > It would be great to move to a newer version of CXF. I'm looking forward
> > to
> > seeing how you get on. I'm happy to help in any way I can.
> >
> > Cheers
> >
> > Jon
> >
> > On Thu, Apr 30, 2009 at 1:24 PM, Jean-Louis MONTEIRO <
> > jean-louis.monteiro@atosorigin.com> wrote:
> >
> >>
> >> Hi,
> >>
> >> I've done some tests around this topic.
> >> I checked over specifications first and I've seen it's a JAX-WS 2.1
> >> feature.
> >>
> >> By default, the runtime just examines the exact classes referenced from
> >> the
> >> SEI interface to figure out what classes need to be bound into the JAXB
> >> context. A way to change it is to use the JAXB annotation @XmlSeeAlso
> >> where
> >> it's needed.
> >>
> >> For example:
> >> @WebService
> >> public interface BaseService {
> >> String echo(String toEcho);
> >> }
> >> @WebService
> >> public interface HelloWorld extends BaseService {
> >> String sayHi(String text);
> >> }
> >> @WebService(serviceName = "HelloWorld")
> >> @XmlSeeAlso(value = {BaseService.class})
> >> public class HelloWorldImpl implements HelloWorld {
> >>
> >> public String sayHi(String text) {
> >> return "Hello " + text;
> >> }
> >>
> >> public String echo(String toEcho) {
> >> return toEcho;
> >> }
> >>
> >> }
> >>
> >> But the case is that OpenEJB embeds CXF 2.0.x which does not support
> >> JAX-WS
> >> 2.1
> >> To support interface inheritance, we have to migrate to CXF 2.1 (min)
> >>
> >> I've tested it with CXF (standalone) and it works fine.
> >> But, we can not change CXF version out of the box in OpenEJB because API
> >> has
> >> been modified.
> >>
> >> I'm working with a colleague to get OpenEJB compiling and running with
> >> CXF
> >> 2.2.1 (lastest version available).
> >>
> >> First results are expected by the end of this week.
> >>
> >> Kind regards,
> >> Jean-Louis
> >>
> >>
> >>
> >>
> >> David Blevins wrote:
> >> >
> >> > Ok, this feature is now in. In OpenEJB 3.1.1 this will work fine:
> >> >
> >> > @Local
> >> > @Remote
> >> > @WebService
> >> > public interface Everything {
> >> > public Object echo(Object o);
> >> > }
> >> >
> >> > public class SuperBean implements Everything {
> >> > public Object echo(Object o) {
> >> > return o;
> >> > }
> >> > }
> >> >
> >> > Careful though as combining @Remote and @Local on the same interface
> >> > is still against the spec and won't be portable. It'll work fine in
> >> > OpenEJB, but likely nowhere else.
> >> >
> >> > When using both @Local and @Remote on the same interface, you will
> >> > always get the @Local version of the proxy where possible.
> >> >
> >> >
> >> > -David
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23315250.html
> >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23521907.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Jean-Sébastien Scrève <je...@atosorigin.com>.
Hi all,
Actually I'm the one that worked on this migration that Jean-Louis talked
about. I started just few days ago. All seem to work fine except the
Attachement example.
Here is my post on CXF mailing list :
http://www.nabble.com/Migrating-to-CXF-2.2-in-OpenEJB-to23518058.html
It seems we are not able to easily override the Jetty transport factory
anymore.
I'll be able to work on it again on Thursday or Friday.
Would you like a temporary patch to have a look at it?
Best regards,
Jean-Sébastien Scrève.
Jonathan Gallimore-2 wrote:
>
> Hi Jean-Louis,
>
> That's really useful info - I had reached the conclusion that the version
> of
> CXF we're using doesn't support this, but didn't realise that its a JAX-WS
> 2.1 feature. I did have look through the code and thought it might be
> possible to modify the OpenEJB CXF classes to use methods on the
> superinterface, but haven't really got anywhere with it. I also think we'd
> run into problems with things on the client side as well.
>
> It would be great to move to a newer version of CXF. I'm looking forward
> to
> seeing how you get on. I'm happy to help in any way I can.
>
> Cheers
>
> Jon
>
> On Thu, Apr 30, 2009 at 1:24 PM, Jean-Louis MONTEIRO <
> jean-louis.monteiro@atosorigin.com> wrote:
>
>>
>> Hi,
>>
>> I've done some tests around this topic.
>> I checked over specifications first and I've seen it's a JAX-WS 2.1
>> feature.
>>
>> By default, the runtime just examines the exact classes referenced from
>> the
>> SEI interface to figure out what classes need to be bound into the JAXB
>> context. A way to change it is to use the JAXB annotation @XmlSeeAlso
>> where
>> it's needed.
>>
>> For example:
>> @WebService
>> public interface BaseService {
>> String echo(String toEcho);
>> }
>> @WebService
>> public interface HelloWorld extends BaseService {
>> String sayHi(String text);
>> }
>> @WebService(serviceName = "HelloWorld")
>> @XmlSeeAlso(value = {BaseService.class})
>> public class HelloWorldImpl implements HelloWorld {
>>
>> public String sayHi(String text) {
>> return "Hello " + text;
>> }
>>
>> public String echo(String toEcho) {
>> return toEcho;
>> }
>>
>> }
>>
>> But the case is that OpenEJB embeds CXF 2.0.x which does not support
>> JAX-WS
>> 2.1
>> To support interface inheritance, we have to migrate to CXF 2.1 (min)
>>
>> I've tested it with CXF (standalone) and it works fine.
>> But, we can not change CXF version out of the box in OpenEJB because API
>> has
>> been modified.
>>
>> I'm working with a colleague to get OpenEJB compiling and running with
>> CXF
>> 2.2.1 (lastest version available).
>>
>> First results are expected by the end of this week.
>>
>> Kind regards,
>> Jean-Louis
>>
>>
>>
>>
>> David Blevins wrote:
>> >
>> > Ok, this feature is now in. In OpenEJB 3.1.1 this will work fine:
>> >
>> > @Local
>> > @Remote
>> > @WebService
>> > public interface Everything {
>> > public Object echo(Object o);
>> > }
>> >
>> > public class SuperBean implements Everything {
>> > public Object echo(Object o) {
>> > return o;
>> > }
>> > }
>> >
>> > Careful though as combining @Remote and @Local on the same interface
>> > is still against the spec and won't be portable. It'll work fine in
>> > OpenEJB, but likely nowhere else.
>> >
>> > When using both @Local and @Remote on the same interface, you will
>> > always get the @Local version of the proxy where possible.
>> >
>> >
>> > -David
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23315250.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23521907.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Jonathan Gallimore <jo...@gmail.com>.
Hi Jean-Louis,
That's really useful info - I had reached the conclusion that the version of
CXF we're using doesn't support this, but didn't realise that its a JAX-WS
2.1 feature. I did have look through the code and thought it might be
possible to modify the OpenEJB CXF classes to use methods on the
superinterface, but haven't really got anywhere with it. I also think we'd
run into problems with things on the client side as well.
It would be great to move to a newer version of CXF. I'm looking forward to
seeing how you get on. I'm happy to help in any way I can.
Cheers
Jon
On Thu, Apr 30, 2009 at 1:24 PM, Jean-Louis MONTEIRO <
jean-louis.monteiro@atosorigin.com> wrote:
>
> Hi,
>
> I've done some tests around this topic.
> I checked over specifications first and I've seen it's a JAX-WS 2.1
> feature.
>
> By default, the runtime just examines the exact classes referenced from the
> SEI interface to figure out what classes need to be bound into the JAXB
> context. A way to change it is to use the JAXB annotation @XmlSeeAlso where
> it's needed.
>
> For example:
> @WebService
> public interface BaseService {
> String echo(String toEcho);
> }
> @WebService
> public interface HelloWorld extends BaseService {
> String sayHi(String text);
> }
> @WebService(serviceName = "HelloWorld")
> @XmlSeeAlso(value = {BaseService.class})
> public class HelloWorldImpl implements HelloWorld {
>
> public String sayHi(String text) {
> return "Hello " + text;
> }
>
> public String echo(String toEcho) {
> return toEcho;
> }
>
> }
>
> But the case is that OpenEJB embeds CXF 2.0.x which does not support JAX-WS
> 2.1
> To support interface inheritance, we have to migrate to CXF 2.1 (min)
>
> I've tested it with CXF (standalone) and it works fine.
> But, we can not change CXF version out of the box in OpenEJB because API
> has
> been modified.
>
> I'm working with a colleague to get OpenEJB compiling and running with CXF
> 2.2.1 (lastest version available).
>
> First results are expected by the end of this week.
>
> Kind regards,
> Jean-Louis
>
>
>
>
> David Blevins wrote:
> >
> > Ok, this feature is now in. In OpenEJB 3.1.1 this will work fine:
> >
> > @Local
> > @Remote
> > @WebService
> > public interface Everything {
> > public Object echo(Object o);
> > }
> >
> > public class SuperBean implements Everything {
> > public Object echo(Object o) {
> > return o;
> > }
> > }
> >
> > Careful though as combining @Remote and @Local on the same interface
> > is still against the spec and won't be portable. It'll work fine in
> > OpenEJB, but likely nowhere else.
> >
> > When using both @Local and @Remote on the same interface, you will
> > always get the @Local version of the proxy where possible.
> >
> >
> > -David
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23315250.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi,
I've done some tests around this topic.
I checked over specifications first and I've seen it's a JAX-WS 2.1 feature.
By default, the runtime just examines the exact classes referenced from the
SEI interface to figure out what classes need to be bound into the JAXB
context. A way to change it is to use the JAXB annotation @XmlSeeAlso where
it's needed.
For example:
@WebService
public interface BaseService {
String echo(String toEcho);
}
@WebService
public interface HelloWorld extends BaseService {
String sayHi(String text);
}
@WebService(serviceName = "HelloWorld")
@XmlSeeAlso(value = {BaseService.class})
public class HelloWorldImpl implements HelloWorld {
public String sayHi(String text) {
return "Hello " + text;
}
public String echo(String toEcho) {
return toEcho;
}
}
But the case is that OpenEJB embeds CXF 2.0.x which does not support JAX-WS
2.1
To support interface inheritance, we have to migrate to CXF 2.1 (min)
I've tested it with CXF (standalone) and it works fine.
But, we can not change CXF version out of the box in OpenEJB because API has
been modified.
I'm working with a colleague to get OpenEJB compiling and running with CXF
2.2.1 (lastest version available).
First results are expected by the end of this week.
Kind regards,
Jean-Louis
David Blevins wrote:
>
> Ok, this feature is now in. In OpenEJB 3.1.1 this will work fine:
>
> @Local
> @Remote
> @WebService
> public interface Everything {
> public Object echo(Object o);
> }
>
> public class SuperBean implements Everything {
> public Object echo(Object o) {
> return o;
> }
> }
>
> Careful though as combining @Remote and @Local on the same interface
> is still against the spec and won't be portable. It'll work fine in
> OpenEJB, but likely nowhere else.
>
> When using both @Local and @Remote on the same interface, you will
> always get the @Local version of the proxy where possible.
>
>
> -David
>
>
>
--
View this message in context: http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23315250.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by David Blevins <da...@visi.com>.
Ok, this feature is now in. In OpenEJB 3.1.1 this will work fine:
@Local
@Remote
@WebService
public interface Everything {
public Object echo(Object o);
}
public class SuperBean implements Everything {
public Object echo(Object o) {
return o;
}
}
Careful though as combining @Remote and @Local on the same interface
is still against the spec and won't be portable. It'll work fine in
OpenEJB, but likely nowhere else.
When using both @Local and @Remote on the same interface, you will
always get the @Local version of the proxy where possible.
-David
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by David Blevins <da...@visi.com>.
On Apr 14, 2009, at 1:32 PM, Jean-Louis MONTEIRO wrote:
>
> David,
>
> If you want, I can propably give you some help for CXF.
> I've done lots of enhancements and may I can go a step further.
If either you or Jon (or both) wanted to look into this one, that'd be
great:
https://issues.apache.org/jira/browse/OPENEJB-1020
-David
>
> David Blevins wrote:
>>
>> I partially implemented this when the thread first came up. I got
>> all
>> the way through the annotation scanning and deploy process, added a
>> flag to toggle it on/off, but stopped when it became clear we'd need
>> to change the method signature of the RpcContainer.invoke(...) method
>> which is sort of sacrosanct. It should just be a bit more work to
>> finish it, but will require some changes in our Geronimo and CXF
>> integrations.
>>
>
> --
> View this message in context: http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23047384.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
David,
If you want, I can propably give you some help for CXF.
I've done lots of enhancements and may I can go a step further.
Jean-Louis
David Blevins wrote:
>
> I partially implemented this when the thread first came up. I got all
> the way through the annotation scanning and deploy process, added a
> flag to toggle it on/off, but stopped when it became clear we'd need
> to change the method signature of the RpcContainer.invoke(...) method
> which is sort of sacrosanct. It should just be a bit more work to
> finish it, but will require some changes in our Geronimo and CXF
> integrations.
>
--
View this message in context: http://www.nabble.com/Using-Stateless-Bean-as-WebService-and-Remote-Interface-Both-tp22742953p23047384.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by David Blevins <da...@visi.com>.
On Apr 12, 2009, at 1:38 PM, Bharath Ganesh wrote:
> What does the expert group say on this? I feel this should be
> allowed in the
> spec, and currently for EJB 3.0 the container could be spec-lenient
> on this
> with a flag. It is the responsibility of the application developer
> to be
> aware of the fact that it could break if the arguments and return
> types are
> not compliant to both the views, as in the case of EJB 3.1 no-
> interface
> views.
> While I was at Pramati, implementing JSR 109 and EJB 3.0 for Pramati
> Java EE
> Server [1], we decided to support this feature.
It's still in discussion. Regardless it's definitely something we can
support. I've never liked the local + remote restriction either and
this is a good time to add that support as well. IMO, you should be
able to expose an interface using as many "views" as you wish provided
you are willing to maintain compliance with all the views you use.
I partially implemented this when the thread first came up. I got all
the way through the annotation scanning and deploy process, added a
flag to toggle it on/off, but stopped when it became clear we'd need
to change the method signature of the RpcContainer.invoke(...) method
which is sort of sacrosanct. It should just be a bit more work to
finish it, but will require some changes in our Geronimo and CXF
integrations.
-David
>
>
> [1] http://server.pramati.com
>
> Thanks,
> Bharath
>
> On Sat, Mar 28, 2009 at 6:58 AM, David Blevins
> <da...@visi.com>wrote:
>
>>
>> On Mar 27, 2009, at 7:36 AM, Nitin Gupta wrote:
>>
>>
>>> I want to use Stateless EJB Bean to be used both as web-service
>>> and also
>>> using remote interface.
>>>
>>> when i define EJB as a service-endpoint then then it can be used
>>> only as a
>>> web-service. when i invoking this EJB through Remote interface i am
>>> getting
>>> this Error :-
>>>
>>> Exception in thread "main" javax.ejb.EJBException: The bean
>>> encountered a
>>> non-application exception; nested exception is:
>>> java.lang.IllegalArgumentException: WebService calls must
>>> follow
>>> format
>>> {messageContext, interceptor, [arg...]}.
>>> at
>>>
>>> org
>>> .apache
>>> .openejb
>>> .client
>>> .EJBInvocationHandler.convertException(EJBInvocationHandler.java:
>>> 219)
>>> at
>>>
>>> org
>>> .apache
>>> .openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:162)
>>> at
>>>
>>> org
>>> .apache
>>> .openejb
>>> .client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
>>> at
>>>
>>> org
>>> .apache
>>> .openejb
>>> .client
>>> .proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
>>>
>>> please advice me ...
>>>
>>
>> Hi Nitin,
>>
>> This has come up a couple times this month:
>>
>>
>> http://www.nabble.com/Re%3A-lose-remote-interface-when-creating-web-service-annotation-p22380170.html
>>
>> (this one shows a spec compliant workaround)
>>
>> http://www.nabble.com/User-Blog%3A-Using-OpenEJB-for-EJB3-testing-with-Maven2-to22323088.html
>>
>> Pascal, Howard, Nitin,
>>
>> I've brought this up on the EJB 3.1 Expert Group. If this is a
>> feature
>> you're using now in another server, let me know what platform that
>> is. It
>> will be a big help in possibly getting this supported at the spec
>> level.
>>
>> -David
>>
>>
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by Bharath Ganesh <bh...@gmail.com>.
What does the expert group say on this? I feel this should be allowed in the
spec, and currently for EJB 3.0 the container could be spec-lenient on this
with a flag. It is the responsibility of the application developer to be
aware of the fact that it could break if the arguments and return types are
not compliant to both the views, as in the case of EJB 3.1 no-interface
views.
While I was at Pramati, implementing JSR 109 and EJB 3.0 for Pramati Java EE
Server [1], we decided to support this feature.
[1] http://server.pramati.com
Thanks,
Bharath
On Sat, Mar 28, 2009 at 6:58 AM, David Blevins <da...@visi.com>wrote:
>
> On Mar 27, 2009, at 7:36 AM, Nitin Gupta wrote:
>
>
>> I want to use Stateless EJB Bean to be used both as web-service and also
>> using remote interface.
>>
>> when i define EJB as a service-endpoint then then it can be used only as a
>> web-service. when i invoking this EJB through Remote interface i am
>> getting
>> this Error :-
>>
>> Exception in thread "main" javax.ejb.EJBException: The bean encountered a
>> non-application exception; nested exception is:
>> java.lang.IllegalArgumentException: WebService calls must follow
>> format
>> {messageContext, interceptor, [arg...]}.
>> at
>>
>> org.apache.openejb.client.EJBInvocationHandler.convertException(EJBInvocationHandler.java:219)
>> at
>>
>> org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:162)
>> at
>>
>> org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
>> at
>>
>> org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
>>
>> please advice me ...
>>
>
> Hi Nitin,
>
> This has come up a couple times this month:
>
>
> http://www.nabble.com/Re%3A-lose-remote-interface-when-creating-web-service-annotation-p22380170.html
>
> (this one shows a spec compliant workaround)
>
> http://www.nabble.com/User-Blog%3A-Using-OpenEJB-for-EJB3-testing-with-Maven2-to22323088.html
>
> Pascal, Howard, Nitin,
>
> I've brought this up on the EJB 3.1 Expert Group. If this is a feature
> you're using now in another server, let me know what platform that is. It
> will be a big help in possibly getting this supported at the spec level.
>
> -David
>
>
Re: Using Stateless Bean as WebService and Remote Interface Both
Posted by David Blevins <da...@visi.com>.
On Mar 27, 2009, at 7:36 AM, Nitin Gupta wrote:
>
> I want to use Stateless EJB Bean to be used both as web-service and
> also
> using remote interface.
>
> when i define EJB as a service-endpoint then then it can be used
> only as a
> web-service. when i invoking this EJB through Remote interface i am
> getting
> this Error :-
>
> Exception in thread "main" javax.ejb.EJBException: The bean
> encountered a
> non-application exception; nested exception is:
> java.lang.IllegalArgumentException: WebService calls must follow
> format
> {messageContext, interceptor, [arg...]}.
> at
> org
> .apache
> .openejb
> .client
> .EJBInvocationHandler.convertException(EJBInvocationHandler.java:219)
> at
> org
> .apache
> .openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:162)
> at
> org
> .apache
> .openejb
> .client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
> at
> org
> .apache
> .openejb
> .client
> .proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
>
> please advice me ...
Hi Nitin,
This has come up a couple times this month:
http://www.nabble.com/Re%3A-lose-remote-interface-when-creating-web-service-annotation-p22380170.html
(this one shows a spec compliant workaround)
http://www.nabble.com/User-Blog%3A-Using-OpenEJB-for-EJB3-testing-with-Maven2-to22323088.html
Pascal, Howard, Nitin,
I've brought this up on the EJB 3.1 Expert Group. If this is a
feature you're using now in another server, let me know what platform
that is. It will be a big help in possibly getting this supported at
the spec level.
-David