[00:01:07] <aslak> mhuniewicz, you could make a test interface as well [00:01:23] <mhuniewicz> That extends the original interface? [00:01:26] <aslak> yea [00:01:50] <mhuniewicz> aslak, I like that. Let me see. [00:02:03] <mhuniewicz> But shouldn't it be possible to use the class directly? [00:02:13] <aslak> mhuniewicz, in ejb, no [00:02:51] <aslak> mhuniewicz, what is injected is not the class, but a proxy layer of possible transaction / security interceptors etc.. [00:03:18] <aslak> that proxy needs to be represented as 'something', whic his your interface [00:04:39] <aslak> with @Statless beans, your calling through a proxy which ends up in a Object pool, each Method call on the Proxy can in theory be invoked on different Object instances [00:07:18] <mhuniewicz> aslak, I see. [00:07:43] <mhuniewicz> aslak, what did he use @Alternative for? [00:07:59] <aslak> to 'replace' the original bean [00:08:46] <mhuniewicz> aslak, is this needed if the original one is not even included? [00:09:39] <aslak> deployed? no [00:09:56] <aslak> bed time here [00:09:57] <aslak> :) [00:10:17] <mhuniewicz> aslak, one more :) [00:10:26] <mhuniewicz> Why are we using @Inject in the tests? [00:10:29] <mhuniewicz> Rather than @EJB? [00:10:35] <aslak> same same [00:10:48] <lightguard_jp> aslak: Getting this if I debug and add the /WEB-INF/beans.xml in the OWB container: java.lang.NoSuchMethodError: org.jboss.arquillian.container.openwebbeans.embedded_1.ShrinkWrapMetaDataDiscovery.getAnnotationDB()Lorg/scannotation/AnnotationDB; [00:10:54] <aslak> or should be [00:11:01] <mhuniewicz> I think it ain't. [00:11:09] <lightguard_jp> Not quite sure what's going on there as that's coming from the super class [00:11:13] <aslak> @Inject is the new @EJB [00:11:14] <aslak> :) [00:11:22] <mhuniewicz> For non-test code as well? [00:11:36] <aslak> @Inject is CDI [00:11:50] <mhuniewicz> Can it be used for EJBs? [00:12:00] <aslak> @Inject support both CDI Beans and EJBs, and is the general purpose Inject method for java [00:12:03] *** jeand has quit IRC [00:12:16] <aslak> while @EJB is tied to the EJB spec and can only lookup EJBs [00:12:39] <mhuniewicz> So I can? I'd rather use @Inject. [00:12:39] <aslak> lightguard_jp, ? no idea [00:12:48] <aslak> mhuniewicz, sure [00:12:58] <mhuniewicz> aslak, can it be constructor injected then? [00:13:11] <aslak> well, you can if they are Local beans atleast.. but if they are Remote you need to use @EJB [00:13:27] <aslak> the EJB ? hmm.. don't think so.. not sure actaully [00:13:57] <mhuniewicz> Yesterday ALR told me it's not doable. Shame. [00:14:24] <aslak> i believe CDI support it, but not EJB [00:14:39] <aslak> or is it coming in 1.1.. hmm.. [00:14:54] <mhuniewicz> I wish CDI had all the services EJB has to offer. [00:15:17] <aslak> mhuniewicz, seam.. :) [00:15:28] <mhuniewicz> Oh crap. That interface trick doesn't work coz inside the code it's referring to the original interafec. [00:15:42] <lightguard_jp> aslak: Looks like it's internal to OWB, guess I won't be fixing this one. [00:15:50] <mhuniewicz> Can I expose the same bean with 2 interfaces? [00:15:56] <aslak> mhuniewicz, sure [00:16:18] <mhuniewicz> I have 2 days of experince with EJB 3.1 and it never does what I want. :) But I'll try. [00:16:22] <aslak> lightguard_jp, inside obw? seems to be the arq contianer integration ? [00:17:19] <mhuniewicz> It works! [00:17:30] <mhuniewicz> :) [00:18:18] <mhuniewicz> I'm going to sleep. [00:18:20] <mhuniewicz> aslak, thanks a million [00:18:42] *** mhuniewicz has quit IRC [00:20:13] <aslak> night guys [00:20:14] *** aslak has quit IRC [00:21:25] *** newtonm has joined #jbosstesting [00:21:37] *** newtonm has left #jbosstesting [00:34:27] *** bleathem has quit IRC [00:42:43] <ALR> jose_freitas: Ping [00:43:16] <ALR> lightguard_jp: What do you mean by a "shaded JAR idea"? [01:29:48] *** alesj has quit IRC [01:43:42] <lightguard_jp> ALR: I need Solder in the deployment, but I also want to include other classes in my project in an arq test. [01:43:56] <lightguard_jp> The OWB container, currently only supports jar archives [01:44:14] <ALR> lightguard_jp: Still not quite understanding, sorry [01:44:34] <ALR> You want to add the Seam Solder JAR into your SW archive? [01:44:35] <lightguard_jp> I need the contents of the solder jar and some other classes in my project inside a shrinkwrap archive. [01:44:40] <lightguard_jp> Yes [01:44:58] <ALR> The contents of the JAR, not the JAR itself? [01:45:20] <lightguard_jp> The jar would be fine, but I don't think I can do multiple archive deployment for a test [01:45:34] <lightguard_jp> So I think I'm stuck with the contents of the jar. [01:45:39] <ALR> lightguard_jp: http://docs.jboss.org/shrinkwrap/latest/org/jboss/shrinkwrap/api/Archive.html#merge(org.jboss.shrinkwrap.api.Archive) [01:46:08] <lightguard_jp> Saw that after I initially asked. I'll give that a try, thanks [01:46:21] <ALR> In this case, you pass in Solder as the argument [01:46:28] <lightguard_jp> Right. [01:46:44] <lightguard_jp> Thanks [01:46:52] <ALR> Sure [01:46:56] *** lightguard_jp is now known as lightguard_jp_aw [02:00:47] *** ldimaggi has joined #jbosstesting [02:21:05] *** johnament has joined #jbosstesting [02:35:10] *** bleathem has joined #jbosstesting [02:46:22] *** ianbrandt has quit IRC [03:04:51] *** johnament has quit IRC [03:37:44] *** stuartdouglas has quit IRC [03:39:23] *** stuartdouglas has joined #jbosstesting [04:45:44] *** jose_freitas has quit IRC [04:53:18] *** jose_freitas has joined #jbosstesting [05:11:27] *** rruss has joined #jbosstesting [05:15:57] *** rruss has quit IRC [05:29:58] *** ldimaggi has quit IRC [05:41:04] *** rruss has joined #jbosstesting [05:45:45] *** rruss has quit IRC [05:55:46] *** rruss has joined #jbosstesting [06:00:04] *** rruss has quit IRC [06:35:07] *** pilhuhn has joined #jbosstesting [06:35:07] *** pilhuhn has joined #jbosstesting [06:37:42] *** lightguard_jp_aw is now known as lightguard_jp [06:54:42] *** rruss has joined #jbosstesting [06:59:10] *** rruss has quit IRC [07:18:30] *** OndraZizka has quit IRC [07:18:48] *** OndraZizka has joined #jbosstesting [07:37:48] *** stuartdouglas has quit IRC [07:53:32] *** mgoldmann has joined #jbosstesting [07:54:27] *** stuartdouglas has joined #jbosstesting [07:56:35] *** rruss has joined #jbosstesting [08:04:15] *** oskutka has joined #jbosstesting [08:15:53] *** aslak has joined #jbosstesting [08:27:44] *** bleathem has quit IRC [08:35:13] *** ge0ffrey has joined #jbosstesting [08:39:08] *** galderz has joined #jbosstesting [08:40:48] <lightguard_jp> aslak: What does https://pastee.org/y5q62 mean? [08:41:06] <lightguard_jp> aslak: I'm trying to use AS7 7.0.0.Final Arquillian container now [08:41:25] <lightguard_jp> And the tests run very slowly :( [08:41:26] <aslak> lightguard_jp, testng? [08:42:03] <lightguard_jp> junit [08:42:14] <aslak> hmm [08:42:47] <aslak> lightguard_jp, yea, they will run slow ish if you run them individual, because it deployed/undeployes the arc service before and after every run [08:42:57] <lightguard_jp> The deployments take maybe a second to deploy and undeploy but the tests (running in the IDE) take much longer to come back [08:43:17] <lightguard_jp> That sucks, is there a better way of doing this? [08:43:23] <lightguard_jp> Or setting up? [08:43:39] <aslak> in the works [08:43:47] <lightguard_jp> Okay [08:44:32] <aslak> 2 things coming for 7.0.1, you can use the servlet protocol again so it can work as all the other container where the runtime is packaged along side the test, and the other one is starting osgi on demand, not on deploy of the service, 99% of ppl don't need osgi [08:44:57] <lightguard_jp> Right. [08:45:08] <lightguard_jp> Should I be have my tests @RunAsClient ? [08:45:31] *** lfryc has joined #jbosstesting [08:47:06] <aslak> lightguard_jp, the IllegalStateException here tho is: there is a deployment 'scanner' installed by the service, that fetched the correct classloaders etc from deployment that it has recognized as being a Arquillian deployment (currenty based on @RunWith(Arquillian)), for some reason your deployment is not matching [08:47:52] <aslak> lightguard_jp, what times are you experiencing ? [08:49:43] *** vnvarsete has joined #jbosstesting [08:50:00] <lightguard_jp> For the deployment times? [08:50:14] <aslak> run [08:50:21] <aslak> eclipse ? [08:51:37] <lightguard_jp> Intellij [08:51:45] <lightguard_jp> Deployment times are taking about 30s [08:52:35] <aslak> 30 s? woo.. managed ? [08:53:13] <lightguard_jp> Remote [08:53:19] <aslak> then something else is wrong.. ww should only be talking about 4-5 s overhead [08:53:31] <lightguard_jp> I'm deploying wars and I get this exception on the first test: ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/callingHandlers]] (MSC service thread 1-6) Error configuring application listener [08:53:33] <lightguard_jp> of class com.sun.faces.config.ConfigureListener: java.lang.IllegalStateException: Component is stopped [08:53:33] <aslak> code ? [08:53:54] *** kpiwko has joined #jbosstesting [08:53:59] <aslak> hmm... [08:54:46] <lightguard_jp> Also getting this it looks like service jboss.module.information.service."deployment.arquillian-service".main (missing) [08:55:02] <lightguard_jp> Which may very well be causing part of the problem I think [08:55:06] <lightguard_jp> Should I rebuild AS7? [08:55:38] <aslak> the missing part there is the arq service not being deployed beore/after suite [08:55:40] <aslak> before [08:56:19] <lightguard_jp> I'm guessing that shouldn't be happing? [08:56:28] <aslak> correct [08:56:44] <lightguard_jp> I'm running arquillian CR1 I believe and the AS7 container 7.0.0.Final [08:56:46] <aslak> lightguard_jp, seam catch ? master ? [08:56:49] <lightguard_jp> Do I need to change versions? [08:57:20] <lightguard_jp> https://github.com/seam/catch/blob/feature%2Farquillian_cr1_upgrade [08:57:34] <lightguard_jp> https://github.com/seam/catch/tree/feature%2Farquillian_cr1_upgrade [08:57:36] <lightguard_jp> That's better [08:58:04] <aslak> no, versions should be good.. [08:58:46] <aslak> let me have a look [08:58:50] <aslak> the as7 profile is in there? [08:59:19] <ALR> aslak: How crazy the AS7 testsuite doesn't work in the IDE now [08:59:23] <ALR> Can't wait to get your patch in [08:59:35] <ALR> Which defaults modules location to under JBOSS_HOME [08:59:36] <lightguard_jp> Yes [08:59:41] <aslak> ALR, it's in [08:59:45] <ALR> Oooh, nice [08:59:49] <lightguard_jp> aslak: https://github.com/seam/catch/blob/feature%2Farquillian_cr1_upgrade/impl/pom.xml [09:00:01] <lightguard_jp> line 168 [09:00:11] <ALR> aslak: As of when? [09:00:16] <ALR> aslak: I'm not seeing it [09:00:18] <aslak> lightguard_jp, using the git flow stuff ? [09:00:22] <ALR> Exception in thread "main" org.jboss.modules.ModuleNotFoundException: Module org.jboss.logmanager:main is not found [09:00:41] <lightguard_jp> Of course I have some changes locally that aren't pushed yet with the pom versions, but shouldn't matter [09:00:44] <lightguard_jp> yep [09:01:16] <aslak> ALR, https://github.com/jbossas/jboss-as/commit/b7fd4f2ccbc1256289188a30c361b96704e6ec2c [09:01:17] <jbossbot> git [jboss-as] b7fd4f2.. Aslak Knutsen AS7-1442 Use javaVmArguments from ManagedContainerConfiguration, defaults to System.property(jboss.options) [09:01:19] <jbossbot> jira [AS7-1442] Arquillian Managed container ignores ManagedContainerConfiguration.javaVmArguments [Closed (Done) Bug, Major, Aslak Knutsen] https://issues.jboss.org/browse/AS7-1442 [09:01:41] <aslak> ALR, hmm, ehh.. yea that won't work [09:01:47] <aslak> it should be set during validate instead [09:02:02] <ALR> aslak: Did you test it? [09:02:03] <aslak> this only works if JBOSS_HOME is set correctly [09:02:23] <ALR> aslak: Hmm, the IDE is using a JBOSS_HOME from arquillian.xml [09:02:32] <ALR> But I don't think that's a real sysprop JBOSS_HOME [09:03:06] <aslak> ALR, i didn't test running in ide, because that was not what i was attempting to fix.. hehe [09:03:42] <ALR> Ahhh [09:03:54] <aslak> brb [09:03:55] <ALR> aslak: I'll open another issue [09:03:58] <ALR> No worries. [09:04:09] <ALR> I got the IDE problem [09:11:40] *** pilhuhn has quit IRC [09:12:54] *** pilhuhn has joined #jbosstesting [09:13:02] *** pilhuhn has quit IRC [09:13:02] *** pilhuhn has joined #jbosstesting [09:18:22] <aslak> lightguard_jp, wasn't there suppose to be a major maven tidy up for gradle 1m4 ? i didn't see any mention in the release notes [09:18:59] <lightguard_jp> They improved uploading [09:19:17] <lightguard_jp> Also switched how jars are stored locally. [09:19:53] <lightguard_jp> Now they're in a different location and each declared repo has it's own section in .gradle instead of it all being in one shared place. [09:20:09] <lightguard_jp> Few people complaining about it, but over all I think it's certainly a good thing. [09:20:39] <aslak> oh, got the impression they were redoing the whole thing [09:20:42] <lightguard_jp> There's now a signing plugin (which is helpful for uploading to nexus) and some other smaller upgrades to upload [09:20:52] <lightguard_jp> But certainly not on the scale I thought there would be. [09:21:05] <lightguard_jp> Also very much want multi-project improvements. [09:21:15] <lightguard_jp> Yeah, I had that impression too. [09:22:20] <lightguard_jp> I want to be able to have multiple settings.gradle files in a multi-project project like Arquillian, Seam, Hibernate, Shrinkwrap etc and simply have one main build.gradle which will pull everything in. [09:23:04] <lightguard_jp> aslak: Any ideas on that exception I'm getting? [09:23:14] <aslak> importing in ide here.. :) [09:23:20] <lightguard_jp> Okay [09:25:12] *** kevinpollet has joined #jbosstesting [09:27:37] *** maschmid has joined #jbosstesting [09:34:40] *** alesj has joined #jbosstesting [09:37:00] <aslak> lightguard_jp, see your using emma for code coverage? have you tested the arq-jacoco extension ? [09:40:29] <aslak> lightguard_jp, should give you incontainer code coverage of the arq tests [09:40:35] <lightguard_jp> aslak: I've heard about it, but haven't used it yet. [09:43:05] *** alesj1 has joined #jbosstesting [09:43:05] *** alesj has quit IRC [09:43:17] <aslak> lightguard_jp, hmm.. StackInfoTest pass here, and run in 4 sec [09:43:33] <lightguard_jp> In the IDE? [09:43:47] <lightguard_jp> Does it also run via CLI? [09:43:48] <aslak> yea [09:44:10] <lightguard_jp> Now I'm really thinking I may need to rebuild AS7 :( [09:45:12] <aslak> i'm using stock as7 final [09:47:11] <aslak> oh wow.. nexus can be increadible slow some times.. [09:50:41] *** aslak has quit IRC [09:51:22] *** aslak has joined #jbosstesting [09:53:38] *** aslak has quit IRC [10:10:00] *** aslak has joined #jbosstesting [10:18:32] *** lightguard_jp has quit IRC [10:21:05] *** jeand has joined #jbosstesting [10:48:26] *** galderz has quit IRC [10:53:50] *** galderz has joined #jbosstesting [11:10:34] *** vtunka has joined #jbosstesting [11:32:18] *** tdiesler has joined #jbosstesting [11:40:51] *** nilian has joined #jbosstesting [11:46:59] *** nilian has quit IRC [11:55:13] <ALR> Mr. October. Jeeeeeez. ) [11:55:14] <ALR> :) [11:55:16] <ALR> Hot seller. [11:58:20] <aslak> hehe [11:58:43] <aslak> Calendars work for other businesses.. [12:00:44] <ALR> I wanna hear from DEVOXX! [12:00:46] <aslak> ALR, i never said nude tho.. Artful Erotic [12:03:22] *** kevinpollet has quit IRC [12:03:41] *** jeand has quit IRC [12:12:15] *** nilian has joined #jbosstesting [12:16:42] *** jeand has joined #jbosstesting [12:27:38] <nickarls> any docs on how to set up the jacoco coverage? [12:29:12] <nickarls> https://github.com/aslakknutsen/jacoco-integration-testcase/blob/master/pom.xml ? [12:37:44] <aslak> nickarls, example can be found here: https://github.com/joserodolfofreitas/jacoco-integration-testcase [12:40:07] <nickarls> aslak: do they work against AS7, too? [12:42:44] <aslak> nickarls, hmm, not sure, haven't tested i think [12:43:01] *** Jaikiran has joined #jbosstesting [12:43:05] *** Jaikiran has quit IRC [12:43:05] *** Jaikiran has joined #jbosstesting [13:04:46] *** pilhuhn is now known as pil-lunch [13:08:43] *** tdiesler has quit IRC [13:14:30] *** tdiesler has joined #jbosstesting [13:32:20] <jose_freitas> ALR: did you ping me yesterday, what was it? [13:32:57] <jose_freitas> good morning guys [13:32:57] <ALR> jose_freitas: I'm not sure. [13:33:16] <jose_freitas> something with the pull request I made, maybe? [13:33:28] * ALR looking [13:34:12] <ALR> jose_freitas: I put that upstream [13:36:09] <jose_freitas> yeah, just checked [13:36:21] <jose_freitas> ah, maybe that I need to sign the CLA? [13:36:33] <jose_freitas> or arquillian CLA will do it? [13:36:57] <ALR> jose_freitas: ShrinkWrap CLA would be nice too [13:37:05] <ALR> Technically you're supposed to do both [13:37:08] *** galderz has quit IRC [13:37:10] <ALR> jboss.org/cla I believe [13:37:13] <ALR> And Ill approve it. [13:37:28] <jose_freitas> ok [13:37:29] <ALR> jose_freitas: Oh, it might have been that I was looking for your JIRA username, [13:37:32] <ALR> But I found it [13:37:39] <ALR> And added you as a contributor to SW [13:37:49] <jose_freitas> ok, nice :) [13:43:31] *** ALR has quit IRC [13:47:30] *** lfryc has quit IRC [13:47:55] *** lfryc has joined #jbosstesting [13:57:48] *** vnvarsete has quit IRC [14:05:34] *** kevinpollet has joined #jbosstesting [14:07:52] *** pil-lunch is now known as pilhuhn [14:13:10] *** nilian has quit IRC [14:18:02] *** nilian has joined #jbosstesting [14:33:03] *** ldimaggi has joined #jbosstesting [14:49:31] *** galderz has joined #jbosstesting [15:03:14] <jose_freitas> nickarls: did you manage to test the extension on AS7? [15:03:18] <jose_freitas> jacoco-extension [15:04:47] *** oskutka has quit IRC [15:11:20] *** Jaikiran1 has joined #jbosstesting [15:11:29] *** Jaikiran1 has quit IRC [15:12:33] *** Jaikiran has quit IRC [15:13:18] *** Jaikiran has joined #jbosstesting [15:27:49] *** nilian has quit IRC [15:34:33] *** nilian has joined #jbosstesting [15:36:47] *** ldimaggi has quit IRC [15:41:16] *** oskutka has joined #jbosstesting [15:45:11] *** tdiesler has quit IRC [16:04:07] *** nilian has quit IRC [16:08:22] *** maschmid has quit IRC [16:08:48] *** bleathem has joined #jbosstesting [16:09:01] *** ldimaggi has joined #jbosstesting [17:07:44] *** alesj1 is now known as alesj [17:13:31] *** kevinpollet has quit IRC [17:34:12] *** kpiwko has quit IRC [17:36:50] *** galderz1 has joined #jbosstesting [17:38:55] *** galderz has quit IRC [17:41:05] *** galderz has joined #jbosstesting [17:42:25] *** galderz1 has quit IRC [17:56:34] *** alesj has quit IRC [18:00:12] *** Jaikiran is now known as Jaikiran|AFK [18:06:59] *** pilhuhn has quit IRC [18:15:29] *** nilian has joined #jbosstesting [18:17:38] *** danielbremer-ton has joined #jbosstesting [18:21:07] *** nilian has quit IRC [18:24:05] *** danielbremer-ton has quit IRC [18:25:04] *** rruss has quit IRC [18:36:32] *** Jaikiran has joined #jbosstesting [18:37:03] *** ianbrandt has joined #jbosstesting [18:37:07] *** Jaikiran|AFK has quit IRC [18:39:45] *** nilian has joined #jbosstesting [18:56:35] *** lfryc is now known as lfryc_brb [19:02:40] *** ALR has joined #jbosstesting [19:08:57] *** galderz has quit IRC [19:20:01] *** lfryc_brb is now known as lfryc [19:31:57] *** rbattenfeld has joined #jbosstesting [19:41:40] *** rbattenfeld has left #jbosstesting [19:43:41] *** vtunka has quit IRC [19:57:18] <jose_freitas> hey aslak, how is it going with jbossas 7? [20:00:16] <aslak> jose_freitas, fixing stuff.. [20:01:02] <aslak> jose_freitas, got a bunch upstream the other day, working on removing the REMOTE config stuff as we speak, but upgrading to the latest arq v where Before/After behavior changed a bit causes some failures here and there [20:01:33] <jose_freitas> :) [20:01:52] <jose_freitas> things never go exactly as we planned [20:02:01] <aslak> na [20:02:03] <aslak> :) [20:04:25] *** Jaikiran has quit IRC [20:11:54] *** lightguard_jp has joined #jbosstesting [20:16:29] *** lfryc is now known as lfryc_away [20:18:04] *** ge0ffrey has quit IRC [21:05:16] *** rruss has joined #jbosstesting [21:09:41] *** rruss has quit IRC [21:32:02] *** newtonm has joined #jbosstesting [21:33:04] *** michalhuniewicz has joined #jbosstesting [21:33:40] <michalhuniewicz> ALR, ping. [21:38:18] *** nilian has quit IRC [21:38:47] *** newtonm has left #jbosstesting [21:44:01] <ALR> michalhuniewicz: Hi [21:45:47] *** jeand has quit IRC [21:46:07] *** lfryc_away is now known as lfryc [21:48:29] <michalhuniewicz> ALR, you recommended to use JBoss for testing EJBs. [21:48:44] <ALR> AS7 yes [21:48:47] <michalhuniewicz> Question then, what if I want to test my EJB with stub or mock dependencies? [21:49:44] *** rruss has joined #jbosstesting [21:50:02] <ALR> Why on earth would you want to do that? :P [21:50:30] <michalhuniewicz> To test it in isolation. :) [21:50:45] <ALR> Isolation from? [21:51:04] <michalhuniewicz> Other classes. To, kind of, unit test it. [21:51:14] <ALR> Then in that case I'd unit test it. [21:51:27] <ALR> MyEjb bean = new MyEjb(); [21:51:46] <ALR> Outside the container. [21:51:47] <michalhuniewicz> Yes, but does it mean I must expose setters for its dependencies? [21:52:09] <ALR> You can do one of two things. [21:52:28] <ALR> 1) The bean impl class can have public setters for dependencies if your clients are using a business interface view [21:52:43] <ALR> Meaning that the client won't be seeing the setters; they'd be referring to it by interface [21:52:52] <michalhuniewicz> I see. [21:52:54] <ALR> 2) Put the test and the bean class in the same package [21:53:10] <ALR> Give the setters package-private (default) visibility scope [21:53:19] <ALR> The test in src/tes [21:53:26] <ALR> The bean impl class in src/main [21:54:08] *** rruss has quit IRC [21:54:32] <michalhuniewicz> I was thinking, what if in my bean I ask for deps using @Inject rather than @EJB, and then launch it inside Weld EE container? [21:57:16] *** bleathem is now known as bleathem_away [22:01:58] *** jeand has joined #jbosstesting [22:13:25] *** jeand_ has joined #jbosstesting [22:13:25] *** jeand has quit IRC [22:14:12] <michalhuniewicz> brb [22:14:13] *** michalhuniewicz has quit IRC [22:15:02] *** ldimaggi has quit IRC [22:15:14] *** mhuniewicz has joined #jbosstesting [22:15:22] <mhuniewicz> back [22:19:46] <mhuniewicz> aslak, hi [22:27:08] <mhuniewicz> ALR, ping again [22:28:05] <ALR> mhuniewicz: Yep. [22:28:20] <mhuniewicz> What do you think about my idea? To test it in Weld EE container then? [22:28:26] <ALR> EJBs? [22:28:29] <mhuniewicz> Aye. [22:28:30] *** rbattenfeld has joined #jbosstesting [22:28:31] <ALR> No. [22:28:45] <ALR> Weld is not an EJB Container. [22:29:09] <mhuniewicz> See, I don't like making changes in the code just to cater for tests. [22:29:13] <mhuniewicz> And that's what those setters are. [22:39:08] <mhuniewicz> ALR, what do you think? [22:40:43] <ALR> mhuniewicz: Sometimes you need to write your code to be testable [22:40:53] <ALR> Else, don't deploy your EJB Bean class [22:41:03] <ALR> But deploy an alternate bean class which extends from the real one [22:41:11] <ALR> And the alternate one adds in methods [22:41:14] <mhuniewicz> I see. [22:41:24] <mhuniewicz> Okay, thanks. I'll think about my options. :) [22:41:27] <ALR> But I don't see any problem in either of the 2 solutions I presented. [22:41:40] <ALR> 1) has a drawback only if you're looking to use no-interface views [22:42:04] <mhuniewicz> ALR, any drawbacks to using @Inject rather than @EJB? [22:42:36] <ALR> Aside from that they're used for different things by different specs? [22:42:50] <ALR> Well, used for similar things by different specs [22:43:00] <mhuniewicz> Well, the idea is the same. Couldn't we say I wanna be implementation agnostic? [22:43:28] <ALR> I think your premise is flawed from the start. [22:43:42] <ALR> JBossAS7 and Weld are not different implementations of the same thing. [22:43:47] <ALR> JBossAS7 and GlassFish are. [22:43:55] <ALR> Weld and OpenWebBeans are. [22:44:07] <ALR> But EJB and CDI are different concepts. [22:44:15] <ALR> You can't make that implementation-agnostic. [22:44:46] <mhuniewicz> Couldn't I say that I want this dependency injected and I don't care whether it's an EJB or not? [22:46:08] <ALR> Not as the specs are written no, now. [22:46:11] <ALR> *now, no [22:46:12] *** jose_freitas has quit IRC [22:46:22] <ALR> CDI uses @Inject [22:46:26] <ALR> EJB uses @EJB [22:46:29] <mhuniewicz> Why does it work, then? [22:46:52] <ALR> There are some cases it will [22:47:00] <ALR> EJBs *are* CDI beans. [22:47:28] <ALR> But you can't @Inject into an EJB alone. [22:47:41] <mhuniewicz> Is it OK to @Inject a CDI bean into an EJB if the CDI bean is @ApplicationScoped? [22:48:13] <ALR> 1) I don't know. I think maybe, if that EJB is also a CDI bean. [22:48:48] <ALR> 2) I'm not sure the scoping rules. Though the general rule is the wide can be injected into narrow scope. [22:49:04] <ALR> But I haven't personally done much CDI dev on real projects. [22:49:21] <ALR> So my expertise in best practices integrating the two ends there. [22:50:13] <mhuniewicz> ALR, what's the best way to replace one particular EJB bean implementation with another (same interface)? [22:50:40] <ALR> Like an @Alternative? [22:50:50] <mhuniewicz> Yes. In XML or something. [22:51:52] <ALR> Replace, not really, unless you exclude BeanImplA from your deployment [22:52:06] <ALR> But you can have 2 EJBs deployed side-by-side [22:52:18] <ALR> Each implementing the same business interfaces [22:52:31] <ALR> So long as the EJBs have different EJB Names. [22:53:03] <mhuniewicz> So there's nothing to allow me to replace one implementation with another without recompiling? [22:53:25] <ALR> Why would you need to recompile? [22:53:31] <ALR> You might need to repackage. [22:53:58] <mhuniewicz> I see. [22:54:10] <mhuniewicz> Thanks. [22:56:06] <ALR> Sure [22:57:49] *** rbattenfeld has left #jbosstesting [22:59:53] <ALR> mhuniewicz: Of course ShrinkWrap makes packaging up different variations of your application dead easy, right? [23:00:16] <ALR> mhuniewicz: I got something for you. :) [23:00:40] *** bleathem_away is now known as bleathem [23:00:58] <mhuniewicz> ALR, yes, it does. [23:00:58] <ALR> mhuniewicz: https://issues.jboss.org/browse/SHRINKWRAP-313 < Whaddya say? [23:01:03] <jbossbot> jira [SHRINKWRAP-313] Provide overloaded Archive.delete(String) [Open (Unresolved) Task, Major, Unassigned] https://issues.jboss.org/browse/SHRINKWRAP-313 [23:02:02] <ALR> mhuniewicz: http://community.jboss.org/wiki/ShrinkWrapDevelopmentAndContribution [23:02:21] <mhuniewicz> :) [23:04:40] <ALR> Not exactly an answer, is that? [23:04:54] <ALR> Ha, we'll suck you in somehow. [23:05:12] <mhuniewicz> No, no, I'm just trying to find out why someone would delete. [23:05:28] <mhuniewicz> If you need to delete it - don't add it? [23:05:52] <ALR> mhuniewicz: Sometimes folks import archives from a file. [23:06:00] <ALR> We already have "delete" support. [23:06:12] <ALR> This overloaded method just accepts a String. Not ArchivePath [23:06:25] <mhuniewicz> Yeah yeah I can see that. [23:06:36] <mhuniewicz> Sure, I can help. :) [23:06:39] <ALR> Awesome. [23:06:45] <ALR> That's a good easy first one. [23:06:54] <ALR> Delegate the overloaded method to the existing one. [23:07:03] <ALR> And add a test for it. [23:07:06] <ALR> And done-zo. [23:07:24] <mhuniewicz> Goed-zo. :) [23:27:15] <mhuniewicz> ALR, I just need to play with my project first. Otherwise I won't be able to sleep. [23:54:54] *** lfryc has quit IRC