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
<[email protected]>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