|
|
Mozy Online Backup: 2GB Free. Automatic. Secure.
Subject: Re: Application exception handling problem - msg#00068
List: dev.openejb.apache.org
Done.
No JIRA has been opened so here is the patch file.
http://www.nabble.com/file/p23271111/patch-itests-ApplicationException.txt
patch-itests-ApplicationException.txt
Jean-Louis
David Blevins wrote:
>
>
> On Apr 27, 2009, at 5:40 AM, Jean-Louis MONTEIRO wrote:
>
> >
> > David,
> >
> > Some months ago, I did some itests to avoid regression.
> > When I synchronize my working copy with the trunk, I always have
> > those files
> > changed.
> >
> > Do you think it would be possible to add itests for that.
>
> Sure, if you have a test for it, we'll be happy to add it.
>
> -David
>
>
> >
> >
> >
> > Jean-Louis
> >
> >
> > David Blevins wrote:
> >>
> >> Good catch! Went ahead and made that change.
> >>
> >> -David
> >>
> >> On Sep 25, 2008, at 11:54 AM, Jean-Louis MONTEIRO wrote:
> >>
> >>>
> >>> Hi all,
> >>>
> >>> I'm facing a problem with application exceptions handling in OpenEJB
> >>> (trunk
> >>> version).
> >>> Just for information, it worked on previous version (3.0).
> >>>
> >>> It's directly link with the point "14.2.1 Application Exception"
> >>> from the
> >>> last EJB 3.0 specification.
> >>> The AnnotationDeployer (from the core module) does not include
> >>> application
> >>> exception (with ApplicationException annotation).
> >>>
> >>> I think the problem is more or less at line 429 because the test is
> >>> always
> >>> false (except when the application exception is declared in the ejb-
> >>> jar.xml
> >>> file).
> >>> Should the test be ?
> >>> if (assemblyDescriptor.getApplicationException(exceptionClass) ==
> >>> null) {
> >>>
> >>> Kind regards,
> >>> Jean-Louis
> >>
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Application-exception-handling-problem-tp19673820p23255435.html
> > Sent from the OpenEJB Dev mailing list archive at Nabble.com.
> >
> >
>
>
>
--
View this message in context:
http://www.nabble.com/Application-exception-handling-problem-tp19673820p23271111.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: using OpenEJB in JUnit tests
Thanks a lot David!
I finally succeeded [1].
LieGrue,
strub
[1]
http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-geronimo/src/main/java/org/apache/webbeans/spi/ee/openejb/JPAServiceOpenEJBImpl.java?view=markup
--- David Blevins <david.blevins@xxxxxxxx> schrieb am Mi, 22.4.2009:
> Von: David Blevins <david.blevins@xxxxxxxx>
> Betreff: Re: using OpenEJB in JUnit tests
> An: dev@xxxxxxxxxxxxxxxxxx
> Datum: Mittwoch, 22. April 2009, 23:06
>
> On Apr 16, 2009, at 1:25 AM, Mark Struberg wrote:
>
> >
> > That might be, I hooked a break point to
> JtaEntityManager and it has
> > never been reached.
> >
> > Imho the creation of it should happen as soon as a
> persistence.xml
> > is there, wdyt?
>
> I dropped a break point in
> PersistenceBuilder.createEntityManagerFactory(..) and it
> definitely is
> getting called and the resulting EntityManagerFactory bound
> to
> "openejb/PersistenceUnit/" even when there are no
> references in the
> application to the persistence unit.
>
> Seems with that and the code you had in the "obtaining
> the
> JtaEntityManager" thread, it would get you most the way
> there.
>
>
> -David
>
> >
> > --- David Blevins <david.blevins@xxxxxxxx>
> schrieb am Do, 16.4.2009:
> >
> >> Von: David Blevins <david.blevins@xxxxxxxx>
> >> Betreff: Re: using OpenEJB in JUnit tests
> >> An: dev@xxxxxxxxxxxxxxxxxx
> >> Datum: Donnerstag, 16. April 2009, 5:15
> >>
> >> On Apr 13, 2009, at 1:45 AM, Mark Struberg wrote:
> >>
> >>> Hi David!
> >>>
> >>>> Do you have any log output you could
> post?
> >>> I've attached a tee of the mvn test output and
> the
> >> surefire log.
> >>>
> >>>> As a trivial implementation you could
> maybe just
> >> list the
> >>>> units under openejb/PersistenceUnit/, chop
> off the
> >> hash code
> >>> Thanks for pointing this again! I was not
> clear enough
> >> in my previous post: the problem is that there
> isn't any
> >> openejb/PersistenceUnit node at all - I only can
> find
> >> openejb/ejb.
> >>>
> >>> I debuged through and found that the
> JtaEntityManager
> >> doesn't get initialised at all, because the
> >> JndiEncBuilder#build() doesn't get called but only
> the
> >> JndiBuilder#build(). So I have a few questions:
> >>> 1.) What is the difference between those 2?
> >>> 2.) How can I force the ContextFactory to call
> the
> >> JndiEncBuilder or does it make no sense at all?
> >>> 3.) Is this way to get the JtaEntityManager
> basically
> >> correct, or is there another way where we still
> can be sure
> >> that EJBs and WebBeans get the same
> JtaEntityManager
> >> instance?
> >>
> >> Seems like as there are no actual references to
> the
> >> persistence unit in the app, we simply do not
> create the
> >> persistence unit. Doesn't seem quite right,
> have to
> >> dig closer, but that's my current guess as to why
> nothing
> >> shows up.
> >>
> >> -David
> >>
> >>>
> >>>
> >>> --- David Blevins <david.blevins@xxxxxxxx>
> >> schrieb am Mo, 13.4.2009:
> >>>> Von: David Blevins <david.blevins@xxxxxxxx>
> >>>> Betreff: Re: using OpenEJB in JUnit tests
> >>>> An: dev@xxxxxxxxxxxxxxxxxx
> >>>> Datum: Montag, 13. April 2009, 0:40
> >>>>
> >>>> On Apr 12, 2009, at 2:41 PM, Mark Struberg
> wrote:
> >>>>
> >>>>>
> >>>>> Hi!
> >>>>>
> >>>>> Somehow this doesn't work.
> >>>>>
> >>>>> If I startup OpenEJB like the examples
> do:
> >>>>>
> >>>>>> Properties p = new Properties();
> >>>>>>
> p.put(Context.INITIAL_CONTEXT_FACTORY,
> >>>>
> >>
> "org.apache.openejb.client.LocalInitialContextFactory");
> >>>>>> Context context = new
> InitialContext(p);
> >>>>>
> >>>>> then no JtaEntityManager gets
> initialised.
> >>>>>
> >>>>> Do I have to add additional
> properties?
> >>>>>
> >>>>> persistence.xml and all other things
> should be
> >> in
> >>>> place.
> >>>>>
> >>>>> The source is currently only in my git
> repo:
> >>>>> http://ns1.backwork.net/git/index.php?p=openwebbeans.git
> >>>>
> >>>> Do you have any log output you could
> post?
> >>>>
> >>>>
> >>>> Regarding your question on IRC:
> >>>>
> >>>> [13:32]
> >>>> <struberg> hi david!
> fine to
> >> see you
> >>>> around :)
> >>>> [13:32]
> >>>> <struberg> I have a
> little
> >> question
> >>>> concerning the OpenWebBeans/OpenEJB
> integration
> >>>> [13:32]
> >>>> <struberg> I started
> the EJB
> >>>> container but cannot find my
> PersistenceUnit in
> >> the JNDI
> >>>> context
> >>>> [13:33]
> >>>> <struberg> factory =
> >>>> (EntityManagerFactory)
> >>>> context.lookup("openejb/PersistenceUnit/"
> +
> >> unitName);
> >>>> [13:33]
> >>>> <struberg> any ideas?
> >>>>
> >>>> I mentioned this in the "obtaining the
> >> JtaEntityManager"
> >>>> thread:
> >>>>
> >>>> On Mar 25, 2009, at 7:59 PM, David Blevins
> wrote:
> >>>>
> >>>>> The tricky part of that is the unit
> names have
> >> a hash
> >>>> code on them to get around the issue that
> they
> >> aren't
> >>>> required to be unique outside the
> persistence.xml
> >> file and
> >>>> there can be multiple persistence.xml
> files in an
> >> app.
> >>>> As a trivial implementation you could
> maybe just
> >> list the
> >>>> units under openejb/PersistenceUnit/, chop
> off the
> >> hash code
> >>>> and use the first one with a matching
> name.
> >> Supporting
> >>>> the case where the user has multiple units
> of the
> >> same name
> >>>> could be a feature to add later.
> >>>>
> >>>>
> >>>> The long and short of that is we don't
> use
> >>>> "openejb/PersistenceUnit/" + unitName as
> the JNDI
> >> name, so
> >>>> that won't work as is.
> >>>>
> >>>> -David
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >> <TEST-
> >>
> org.apache.webbeans.test.geronimo.openejb.OpenEJBIntegrationTest.xml>
> >>
> >>
> >
> >
> >
> >
>
>
Next Message by Date:
click to view message preview
Re: [jira] Created: (OPENEJB-1001) Can not use SOAP headers
Hi Jon,
I submitted on JIRA OPENEJB-1001, a patch file to illustrate the usage of
SOAP Headers (header @WebParam).
This patch add a new method on the Calculator webservice (simple-webservice
artifact).
It should work with the openejb-cxf 3.1. But, if you uncomment the line in
CalculatorImpl
//@HandlerChain(file = "handler.xml")
You will see it doesn't work anymore (IndexOutOfBoundsException).
Regards,
JLouis
Jonathan Gallimore-2 wrote:
>
> Hi Jean-Louis,
>
> I must admit I don't know very much about this, but I am very interested.
> Thanks for the patch that you've attached to the issue - do you by any
> chance have a small sample that demonstrates the problem?
>
> Cheers
>
> Jon
>
> 2009/2/17 Monteiro Jean-Louis <jean-louis.monteiro@xxxxxxxxxxxxxx>
>
>> Feedback on this issue would be appreciated.
>>
>> Jean-Louis
>>
>> -----Message d'origine-----
>> De : Jean-Louis MONTEIRO (JIRA) [mailto:jira@xxxxxxxxxx]
>> Envoyà : mardi 17 fÃvrier 2009 13:05
>> Ã : Monteiro Jean-Louis
>> Objet : [jira] Created: (OPENEJB-1001) Can not use SOAP headers
>>
>> Can not use SOAP headers
>> ------------------------
>>
>> Key: OPENEJB-1001
>> URL: https://issues.apache.org/jira/browse/OPENEJB-1001
>> Project: OpenEJB
>> Issue Type: Bug
>> Components: webservices
>> Affects Versions: 3.1
>> Environment: all
>> Reporter: Jean-Louis MONTEIRO
>> Fix For: 3.1.1
>>
>>
>> Can not use SOAP headers when SOAP handlers are defined.
>>
>> @WebMethod(action="doSmth")
>> @WebResult(name="response")
>> DoSmthResponse doSmth (
>> @WebParam(name="request") DoSmthRequest request,
>> @WebParam(name="datetime", header=true,
>> mode=WebParam.Mode.OUT)
>> Holder<Date> datetime);
>>
>> It only appears when SOAP handlers are defined.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>>
>>
>> Ce message et les piÃces jointes sont confidentiels et rÃservÃs à l'usage
>> exclusif de ses destinataires. Il peut Ãgalement Ãtre protÃgà par le
>> secret
>> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
>> immÃdiatement l'expÃditeur et de le dÃtruire. L'intÃgrità du message ne
>> pouvant Ãtre assurÃe sur Internet, la responsabilità du groupe Atos
>> Origin
>> ne pourra Ãtre recherchÃe quant au contenu de ce message. Bien que les
>> meilleurs efforts soient faits pour maintenir cette transmission exempte
>> de
>> tout virus, l'expÃditeur ne donne aucune garantie à cet Ãgard et sa
>> responsabilità ne saurait Ãtre recherchÃe pour tout dommage rÃsultant
>> d'un
>> virus transmis.
>>
>> This e-mail and the documents attached are confidential and intended
>> solely
>> for the addressee; it may also be privileged. If you receive this e-mail
>> in
>> error, please notify the sender immediately and destroy it. As its
>> integrity
>> cannot be secured on the Internet, the Atos Origin group liability cannot
>> be
>> triggered for the message content. Although the sender endeavours to
>> maintain a computer virus-free network, the sender does not warrant that
>> this transmission is virus-free and will not be liable for any damages
>> resulting from any virus transmitted.
>>
>
>
--
View this message in context:
http://www.nabble.com/TR%3A--jira--Created%3A-%28OPENEJB-1001%29-Can-not-use-SOAP-headers-tp22055979p23292201.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.
Previous Message by Thread:
click to view message preview
Re: Application exception handling problem
On Apr 27, 2009, at 5:40 AM, Jean-Louis MONTEIRO wrote:
David,
Some months ago, I did some itests to avoid regression.
When I synchronize my working copy with the trunk, I always have
those files
changed.
Do you think it would be possible to add itests for that.
Sure, if you have a test for it, we'll be happy to add it.
-David
Jean-Louis
David Blevins wrote:
Good catch! Went ahead and made that change.
-David
On Sep 25, 2008, at 11:54 AM, Jean-Louis MONTEIRO wrote:
Hi all,
I'm facing a problem with application exceptions handling in OpenEJB
(trunk
version).
Just for information, it worked on previous version (3.0).
It's directly link with the point "14.2.1 Application Exception"
from the
last EJB 3.0 specification.
The AnnotationDeployer (from the core module) does not include
application
exception (with ApplicationException annotation).
I think the problem is more or less at line 429 because the test is
always
false (except when the application exception is declared in the ejb-
jar.xml
file).
Should the test be ?
if (assemblyDescriptor.getApplicationException(exceptionClass) ==
null) {
Kind regards,
Jean-Louis
--
View this message in context:
http://www.nabble.com/Application-exception-handling-problem-tp19673820p23255435.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.
Next Message by Thread:
click to view message preview
Re: [jira] Created: (OPENEJB-1001) Can not use SOAP headers
Hi Jon,
I submitted on JIRA OPENEJB-1001, a patch file to illustrate the usage of
SOAP Headers (header @WebParam).
This patch add a new method on the Calculator webservice (simple-webservice
artifact).
It should work with the openejb-cxf 3.1. But, if you uncomment the line in
CalculatorImpl
//@HandlerChain(file = "handler.xml")
You will see it doesn't work anymore (IndexOutOfBoundsException).
Regards,
JLouis
Jonathan Gallimore-2 wrote:
>
> Hi Jean-Louis,
>
> I must admit I don't know very much about this, but I am very interested.
> Thanks for the patch that you've attached to the issue - do you by any
> chance have a small sample that demonstrates the problem?
>
> Cheers
>
> Jon
>
> 2009/2/17 Monteiro Jean-Louis <jean-louis.monteiro@xxxxxxxxxxxxxx>
>
>> Feedback on this issue would be appreciated.
>>
>> Jean-Louis
>>
>> -----Message d'origine-----
>> De : Jean-Louis MONTEIRO (JIRA) [mailto:jira@xxxxxxxxxx]
>> Envoyà : mardi 17 fÃvrier 2009 13:05
>> Ã : Monteiro Jean-Louis
>> Objet : [jira] Created: (OPENEJB-1001) Can not use SOAP headers
>>
>> Can not use SOAP headers
>> ------------------------
>>
>> Key: OPENEJB-1001
>> URL: https://issues.apache.org/jira/browse/OPENEJB-1001
>> Project: OpenEJB
>> Issue Type: Bug
>> Components: webservices
>> Affects Versions: 3.1
>> Environment: all
>> Reporter: Jean-Louis MONTEIRO
>> Fix For: 3.1.1
>>
>>
>> Can not use SOAP headers when SOAP handlers are defined.
>>
>> @WebMethod(action="doSmth")
>> @WebResult(name="response")
>> DoSmthResponse doSmth (
>> @WebParam(name="request") DoSmthRequest request,
>> @WebParam(name="datetime", header=true,
>> mode=WebParam.Mode.OUT)
>> Holder<Date> datetime);
>>
>> It only appears when SOAP handlers are defined.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>>
>>
>> Ce message et les piÃces jointes sont confidentiels et rÃservÃs à l'usage
>> exclusif de ses destinataires. Il peut Ãgalement Ãtre protÃgà par le
>> secret
>> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
>> immÃdiatement l'expÃditeur et de le dÃtruire. L'intÃgrità du message ne
>> pouvant Ãtre assurÃe sur Internet, la responsabilità du groupe Atos
>> Origin
>> ne pourra Ãtre recherchÃe quant au contenu de ce message. Bien que les
>> meilleurs efforts soient faits pour maintenir cette transmission exempte
>> de
>> tout virus, l'expÃditeur ne donne aucune garantie à cet Ãgard et sa
>> responsabilità ne saurait Ãtre recherchÃe pour tout dommage rÃsultant
>> d'un
>> virus transmis.
>>
>> This e-mail and the documents attached are confidential and intended
>> solely
>> for the addressee; it may also be privileged. If you receive this e-mail
>> in
>> error, please notify the sender immediately and destroy it. As its
>> integrity
>> cannot be secured on the Internet, the Atos Origin group liability cannot
>> be
>> triggered for the message content. Although the sender endeavours to
>> maintain a computer virus-free network, the sender does not warrant that
>> this transmission is virus-free and will not be liable for any damages
>> resulting from any virus transmitted.
>>
>
>
--
View this message in context:
http://www.nabble.com/TR%3A--jira--Created%3A-%28OPENEJB-1001%29-Can-not-use-SOAP-headers-tp22055979p23292201.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.
|
|