Hi,
I have written a CDI custom extension (with deltaspike BeanBuilder) to scan all
types annotated with @XmlRegistry and create one @ApplicationScoped JAXBContext
for my application.
But beans referencing/injecting that JAXBContext give a NPE when created:
java.lang.NullPointerException
at
o
Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2016-02-15 16:47 GMT+01:00 Xavier Dury :
>
>> Hi,
>>
&g
+0100
>>> Subject: Re: NPE when creating a bean through Extension and not through
>> Producer
>>> To: users@tomee.apache.org
>>>
>>> Hi Xavier,
>>>
>>> do you have some code to share - hope google didnt eat any snippet again?
>>>
>>&g
mannibucau <https://twitter.com/rmannibucau> | Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2016-02-16 8:36 GMT+01:
://twitter.com/rmannibucau> | Blog
>> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau>
>> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>> <http://www.tomitribe.com>
>>
>> 2016-02-16 8:36 GM
Thanks,
I was trying to implement a custom ApplicationBoundaryService but OWB does not
seem to pick it up (I added the class name to
META-INF/openwebbeans/openwebbeans.properties with a configuration.ordinal over
9000 but it always takes the default one).
Are those OWB SPIs required to be in a
hub <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2016-02-16 9:56 GMT+01:00 Xavier Dury :
>
>> Thanks,
>>
>> I was trying to implement a custom Applicatio
Hi,
I've come accross a NPE while calling Instance.destroy() whith @Dependent beans
I got from the same Instance, is it normal? (I am using TomEE 7M1 + OWB 1.6.3)
More questions about Instance:
- does the remove() method on the iterator obtained via Instance.iterator() do
anything (like calling
Nevermind, if had to do something like that:
Instance barInstance = fooInstance.select(Bar.class);
Bar bar = barInstance.get();
barInstance.destroy(bar);
> From: kal...@hotmail.com
> To: users@tomee.apache.org
> Subject: NPE on Instance.destroy()
> Date: W
will recreate it).
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> | Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http:/
Hi,
When using ApplicationComposer and mockito together in the following test
example:
package eg;
import javax.inject.Inject;
import org.apache.openejb.junit.ApplicationComposerRule;
import org.apache.openejb.mockito.MockitoInjector;
import org.apache.openejb.testing.CdiExtensions;
import org
://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2016-03-14 15:25 GMT+01:00 Xavier Dury :
>
>> Hi,
>>
>> When using Applic
bucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2016-03-14 15:56 GMT+01:00 Xavier Dury :
>
>> Hi Romain,
>>
>> I think that the @CdiExtensions is causing the problem: if I remove it,
>> the test passes without the need of the @Produces annotation.
>
Hi,
I am using OpenEJB for my tests and need support for EL expressions in my own
code.
By default, if I do something like this (pay attention to the expression):
ExpressionFactory factory =
beanManager.wrapExpressionFactory(ExpressionFactory.newInstance());
StandardELContext elContext = new S
mee.apache.org
Subject: Re: OpenEJB and EL
Hi Xavier
On the phone so hard to give you a link bit try using tomcat el impl of
tomcat 8.5
Le 28 sept. 2016 15:29, "Xavier Dury" a écrit :
> Hi,
>
> I am using OpenEJB for my tests and need support for EL expressions in my
&
Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>
2016-09-28 18:17 GMT+02:
@Inject
private Conversation conversation;
@Produces @ApplicationScoped @Named("javax")
public Javax javax() {return new Javax();}
}
But that works!
Xavier
From: Xavier Dury
Sent: Wednesday, September 28, 2016 8:42 PM
To: users@tomee.apache.org
Subject: Re: OpenEJB a
c class ConversationWrapper {
> private @Inject Conversation conv;
>
> public Conversation get() {
> return conv;
> }
> }
>
> And in the EL just use #{conversation.get.id}
>
> LieGrue,
> strub
>
>
>
>
> > On Wednesday, 28 September 20
;EL spec.
>>
>>Could you please try the following
>>
>>@RequestScoped
>>@Named("conversation")
>>public class ConversationWrapper {
>> private @Inject Conversation conv;
>>
>> public Conversation get() {
>> return conv;
>>
ithub.com/rmannibucau> |
[old blog] new RManniBucau().blog()
rmannibucau.wordpress.com
New blog on: https://blog-rmannibucau.rhcloud.com/
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmann
[ConversationWrapper, WebBeansType:MANAGED, Name:null, API
Types:[eg.ConversationWrapper,java.lang.Object],
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
From: Xavier Dury
Sent: Wednesday, September 28, 2016 11:34 PM
To: users@tomee.apache.org
Subject: Re: OpenEJB and
tory-rmannibucau.rhcloud.com>
2016-09-28 23:45 GMT+02:00 Xavier Dury :
> It seems that to inject the conversation in ConversationWrapper.conversation,
> OWB does consider both the build-in conversation bean and the produced one
> from... ConversationWrapper.getConv().
https://gist.github.com/kalgon/fbf529dc9c9764c115433cfb2f0f82bf
From: Xavier Dury
Sent: Wednesday, September 28, 2016 11:54 PM
To: users@tomee.apache.org
Subject: Re: OpenEJB and EL
No, I didn't add the @Default to the @Produces method.
I verified:
@RequestScoped
public
can you please add any random qualifier? E.g. @Destroyed.
This will stop CDI from complaining but EL should work.
LieGrue,
strub
> On Thursday, 29 September 2016, 0:04, Xavier Dury wrote:
> > https://gist.github.com/kalgon/fbf529dc9c9764c115433cfb2f0f82bf
OpenEjbElTest.java
gist.git
, September 29, 2016 8:54 AM
To: users@tomee.apache.org
Subject: Re: OpenEJB and EL
2016-09-29 8:32 GMT+02:00 Xavier Dury :
> @Mark
>
> thanks, it works when adding any other qualifier!
>
> btw, do you think it would hurt to qualify the built-in conversation bean
> with @N
just sketched that wo trying).
That should be available as
#{nameResolver.get("javax.enterprise.context.conversation")}
LieGrue,
strub
> On Thursday, 29 September 2016, 9:21, Romain Manni-Bucau
> wrote:
> > 2016-09-29 9:15 GMT+02:00 Xavier Dury :
>
>> Indeed, @Nam
ribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>
2016-09-29 11:38 GMT+02:00 Xavier Dury :
> Thanks, now I understand better why it is not implemented in OWB.
>
> Funny, I came to the same conclusion and was busy implementing an
> @ApplicationScoped @N
com/in/rmannibucau> | Tomitriber
Romain Manni-Bucau | LinkedIn
www.linkedin.com
View Romain Manni-Bucau’s professional profile on LinkedIn. LinkedIn is the
world's largest business network, helping professionals like Romain Manni-Bucau
discover ...
> <http://www.tomitribe.com> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2016-09-29 14:38 GMT+02:00 Xavier Dury :
>
>> something like this? https://gist.github.com/kalgon/
>> c1cc45540a629314f615b90f944f
>>
>>
>>
Well, replace JspResolver by ServletResolver in my previous message...
From: Xavier Dury
Sent: Thursday, September 29, 2016 8:18 PM
To: users@tomee.apache.org
Subject: Re: OpenEJB and EL
Indeed, el resolvers should then be splitted like this:
- JspResolver
- CdiResolver
- JavaxResolver
.rhcloud.com/
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>
2016-09-29 20:20 GMT+02:00 Xavier Dury :
> Well, replace JspResolver by ServletResolver in my previous messag
Hi,
Is it normal that all test methods from a test class running with
EJBContainerRunner share one single request context?
If the request context is shared between methods, this can cause some unwanted
dependency between them.
Example:
public @ApplicationScoped class ScopeService {
publi
and geeky topics...
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>
2016-09-30 11:45
Hi,
I have a problem with the following test (with TomEE 7.0.1):
@ContainerProperties(@ContainerProperties.Property(name =
"openejb.testing.start-cdi-contexts", value = "false"))
@Classes(cdi = true, innerClassesAsBean = true)
@RunWith(ApplicationComposer.class)
public class ScopesRuleTest {
.
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
[old blog] new RManniBucau().blog()
rmannibucau.wordpress.com
New blog on: https://blog-rmannibucau.rhcloud.com/
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory
Hi,
When using ApplicationComposer, I can declare mocks in my test classes like
that:
@Mock
MyDependency myDependency;
@MockInjector
public Class mockInjector() { return MockitoInjector.class; }
But that does not seem to work with (un@Named) qualified mocks:
@Mock
@MyQualifier
MyDepend
Hi Romain
> From: Romain Manni-Bucau
>
> Hi Xavier,
>
> 2017-04-05 12:22 GMT+02:00 Xavier Dury :
>
>> Hi,
>>
>> When using ApplicationComposer, I can declare mocks in my test classes
>> like that:
>>
>> @Mock
>> MyDependency my
OK, I'll try to provide a patch when I can find some time.
> From: Romain Manni-Bucau
>
> I think I get the use case. Do you want to try to patch openejb-mockito?
>
> 2017-04-05 13:28 GMT+02:00 Xavier Dury :
>
> > Hi Romain
> >
> > > Fro
Hi Romain,
I made a gist and wanted your opinion before I submit a PR:
https://gist.github.com/kalgon/ee1e00c0fecdd86afb01fe1a6891454a
I don't use MockRegistry or MockitoInjector anymore (everything happens in the
extension)
and wanted to know if that was ok for you.
> From: Xav
Hi,
I have been testing the fix for OPENEJB-2088 (injection of (SOAP)Handlers) and
have noticed a strange behavior: when my test class has 3 or more test methods,
it seems that handlers are not injected anymore (I get NPEs).
I don't think it's related to what the test really does as this error oc
I think it's this bug: https://issues.apache.org/jira/browse/OWB-888
> From: rmannibu...@gmail.com
> Date: Tue, 13 May 2014 16:40:41 +0200
> Subject: Re: Problem with OpenWebbeans when Iterating over
> javax.enterprise.inject.Instance
> To: users@tomee.apache.org
>
> Hi
>
> this is an openwebbe
Hi,
I am using ApplicationComposer to test an EJB exposed as a WebService.
My service is secured with @RolesAllowed and I would like to use BASIC
authentication or disable security for the test.
As I don't know how to disable security, I tried to activate BASIC
authentication (with groups/user.p
new Properties();
> p.setProperty("cxf-rs.auth", "BASIC");
> return p;
>
>
> That should work
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
>
>
> On Fri, May 9, 2014 at 6:19 AM, Xavier Dury
);
>> p.setProperty("cxf-rs.auth", "BASIC");
>> return p;
>>
>>
>> That should work
>> --
>> Jean-Louis Monteiro
>> http://twitter.com/jlouismonteiro
>> http://www.tomitribe.com
>>
>>
>> On Fri, May 9, 2014 a
gt;> From: jlmonte...@tomitribe.com
>>> To: users@tomee.apache.org
>>>
>>> Try adding a method annotated with @Configuration and add the following as
>>> the content
>>> final Properties p = new Properties();
>>> p.setProperty("cxf-rs.auth"
Hi,
do you have any new estimate about the 1.7.0 release date?
Thanks,
Xavier
> Date: Wed, 4 Jun 2014 15:59:19 +0200
> From: agumbre...@tomitribe.com
> To: users@tomee.apache.org
> Subject: Re: Tomee 1.7.0 Release-Date
>
> Hi Alex,
>
> Unfortunately ther
Hi,
I've been developing a WebService and wanted to test it with
ApplicationComposer.
First, it seems that only EJB (@Stateless) endpoints can be injected into my
test instance through @WebServiceRef. Is it correct?
If I remove @Stateless from my service, then I get the following error:
WARNI
r: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-06-27 16:30 GMT+02:00 Xavier Dury :
>
>> Hi,
>>
>> I've been developing a WebService and
s/asf/tomee/tomee/trunk/examples/applicationcomposer-jaxws-cdi/
>
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-06-27 17:58
lease
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-06-30 7:44 GMT+02:00 Xavier Dury :
>> G, that
/github.com/rmannibucau
>
>
> 2014-06-30 8:16 GMT+02:00 Xavier Dury :
>> here it is https://dl.dropboxusercontent.com/u/908875/openejb/mtom.zip
>>
>>
>>> From: rmannibu...@gmail.com
>>> Date: Mon, 30 J
-06-30 9:25 GMT+02:00 Romain Manni-Bucau :
>>> sure, just need "open" internet to commit the 3 missing lines ;)
>>>
>>>
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.l
omain Manni-Bucau :
> >>>
> >>> we should read both actually. BindingType is the old way to do it and
> >>> @MTOM the more recent.
> >>>
> >>>
> >>> Romain Manni-Bucau
> >>> Twitter: @rmannibucau
> >>> Blog:
Hi,
I have been playing with the EJBContainerRule but, in the logs, I always see
some warnings like these:
WARNING - WARN ... EjbModule1458021134: The application [EjbModule1458021134]
uses @Inject but CDI is not enabled. Maybe youd need to add a beans.xml file.
WARNING - 1 warning for EjbModul
Hi,
When I'm using OpenEJB for testing (EJBContainerRule/OpenEjbRunner) and want to
test my @Stateless web-service security (@RolesAllowed), I have to include an
openejb-jar.xml next to ejb-jar.xml containing an
BASIC so that users and groups are read from
users/groups.properties.
Is there an
ers.
> Just ensure it is set before the rule starts.
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-10-20 10:58 GMT+02:00
Hi,
While using EJBContainerRule, I have seen no easy way (~ @Run(Test)As) to
invoke my EJBs with a particular user/role in my tests.
There is already an InjectRule and a TransactionRule so would it be possible to
add some kind of Run(Test)AsRule as well?
Thanks,
Xavier
e87d71ecbec66
>
> If needed we can backport to 1.7.x
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-10-30 12:50 GMT+01:0
y tests with custom security services or
> based on security environment
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-10-3
58 matches
Mail list logo