greptilian logo

IRC log for #javaee, 2013-10-15

Please see http://irclog.greptilian.com/javaee for which days have been logged.

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
02:07 Technodrome joined ##javaee
02:13 kobain_ joined ##javaee
02:47 Quest joined ##javaee
03:42 Guest56954 joined ##javaee
03:58 Pikkenstein joined ##javaee
04:57 SoniEx2 joined ##javaee
05:46 dangertools joined ##javaee
05:46 dangertools joined ##javaee
07:57 johnkozak84 hello guys
07:58 johnkozak84 I have a question. I am trying to deploy a ejb but everytime a restart the server there is a different class (3rd party lib) missing
07:58 johnkozak84 how come it returns different errors
08:00 johnkozak84 i would expect always the same exception
08:33 [[thufir]] joined ##javaee
08:45 sess johnkozak84:  perhaps it loads them in a non deterministic order
08:46 sess and you are missing multiple classes
08:48 johnkozak84 clearly classes are missing :)
09:38 jbwiv joined ##javaee
11:11 cem_ joined ##javaee
11:11 cem_ hi
11:15 pdurbin cem_: good morning
11:18 cem_ pdurbin: I started with java is it possible to convert one array type to another array type for example : Object[] to String[] ?
11:20 cem_ Its possible , so both have same reference ?
11:21 cem_ they dont have
11:22 cem_ i just cant digest they convert haha
11:22 pdurbin you can "cast" an Object to a String with ( )
11:23 cem_ They are Array
11:24 cem_ Object[] pdurbin = {"good","morning"};
11:25 cem_ :P
11:25 cem_ I cant digest it :D
11:29 cem_ Wow! pdurbin you ROCK!
11:40 cem_ I meant the variable Thankz
12:02 pdurbin glad that helped
12:51 tommmied joined ##javaee
13:14 Naros joined ##javaee
13:26 Technodrome left ##javaee
13:47 cem_ joined ##javaee
14:03 cem_ pdurbin:  there ?
14:06 Pikkenstein joined ##javaee
14:06 pdurbin cem_: yep. I'm still having trouble with OIOSAML: http://shibboleth.net/pipermail/users/2013-October/012485.html
14:09 cem_ what is that ?
14:12 pdurbin https://svn.softwareborsen.dk/oiosaml.java/sp/trunk/docs/intro.html
14:28 cem_ java 6 is quite dear to everyone.
14:48 Naros Anyone here familiar with myeclipse and maven by chance?
14:52 Naros I have two projects, a webapp and a taglib.  The webapp depends on the taglib project and when deploying the webapp in non-production mode, it simply copies the taglib project into the webapp rather than using the taglib as a JAR.  The problem is that doing this leads to the taglib descriptor not being seen and generating errors.  When deploying the webapp in production mode, it uses the jar file and the taglib's descriptor is s
14:56 cem_ hey javaeebot
15:01 tjsnell ~eclipse--
15:07 pdurbin javaeebot: lucky myeclipse
15:07 javaeebot pdurbin: http://www.myeclipseide.com/
15:07 Naros hehe
15:07 cem_ javaeebot:: h
15:07 javaeebot cem_: Error: "h" is not a valid command.
15:07 cem_ javaeebot:: lol
15:07 javaeebot cem_: Error: "lol" is not a valid command.
15:07 cem_ javaeebot:: 'kjkjkj
15:07 javaeebot cem_: Error: "'kjkjkj" is not a valid command.
15:08 Naros just thought I'd ask in case anyone else had ran into this or knew what i might have overlooked with my maven dependency configurations.
15:09 cem_ javaeebot:: java6
15:09 javaeebot cem_: Error: "java6" is not a valid command.
15:09 cem_ javaeebot: java6
15:09 javaeebot cem_: Error: "java6" is not a valid command.
15:09 cem_ I like it
15:10 cem_ javaeebot: eclipse
15:10 javaeebot cem_: Error: "eclipse" is not a valid command.
15:10 cem_ ?
15:10 cem_ WHY
15:10 pdurbin cem_: please stop
15:13 cem_ :(
15:24 kobain joined ##javaee
15:26 Quest joined ##javaee
15:26 Quest whats an easy and proper way to delete an entity in database? this delete should reflect all linked tables to it. like many to many or many to one relations ships. ?
15:33 cem_ left ##javaee
15:35 Quest is this dao method sane enough? http://pastebin.ca/2466960
15:38 sfisque joined ##javaee
15:39 Naros Quest: you can cascade deletion to children entities in certain cases.
15:40 Naros This way when you delete the parent, those children when they become orphans are removed too.
15:43 Quest ok. how to do that? but before that. how to remove just this one box. is my method sane?
15:43 scripty joined ##javaee
15:43 scripty left ##javaee
15:44 Naros Why are you allocating a box?
15:47 Naros Quest: look at this http://pastebin.ca/2466966
15:48 Naros my findById() method throws an EntityNotFoundException
15:48 Naros I also translate IllegalArgumentException to EntityNotFoundException too
15:48 Quest k
15:48 Naros but pass up TransactionRequiredException to the caller.
15:48 Naros Keep in mind that remove in my case is generic
15:49 Naros so I have something like BoxDAO extends GenericDAO<Box,BoxId>
15:49 Naros and GenericDAO has the remove method.
15:51 scripty joined ##javaee
15:51 scripty how long it wiill take to learn javaee ? :P
15:52 Naros Quest: http://pastebin.ca/2466997
15:52 Naros there's an example included with findbyId
15:54 Naros I prefer checking for exceptions rather than null checks on find methods personally
15:54 Naros but you can see I disable that using the variable throwNotFoundIfNotExists
15:54 SoniEx2 scripty: why are you learning javaee?
15:54 Naros Learning JavaEE or anything is highly subjective :P
15:55 scripty to work with web based application
15:55 Naros So depend(tm) :P
15:55 sfisque scripty : depends on what you mean by "learn javaee".  i've been using the ee platform for 14 years, and i still learn new things
15:56 Quest Naros,  ignoring exception handling for now, how about this ? http://pastebin.ca/2466999
15:56 scripty sfisque Yes
15:56 Naros Quest: combine lines 2 and 3 into something like this then
15:57 Naros Boxes box = entityManager.find(Boxes.class, id);
15:57 Naros IDK understand why you feel compelled to do "Boxes box = new Boxes()" just to replace that instance of Boxes with another if found from the DB
15:57 Quest Naros,  ok.
15:58 Naros If you need a null instance of a variable, its safe enough to write "Boxes box;"
15:58 Quest k
15:58 sfisque in fact, unless you're building a new entity instance from user input (or some input stream), you pretty much should never new one.
15:58 Naros Precisely.
15:58 Quest but how will i know that if entityManager.remove(box);   was succesfull or not?
15:58 Naros It will throw an exception :P
15:59 sfisque null gates and catches , as naros has indicated
15:59 Naros This is why I disapprove of your "ignoring exceptions right now" comment.
15:59 Quest whats the difference b/w Boxes box = new Boxes();       and        Boxes box = entityManager.find(Boxes.class, id);       ?         either one WILL create a new box object any way. Naros  sfisque
15:59 Naros The first one allocates one on the heap
16:00 Naros then you turn around and disgard it when entitymanager returns a value
16:00 Naros it's memory allocation overhead
16:00 sfisque one creates a detatched entity with no PK, the other fetches one from the DB or null
16:00 Quest Naros,  got it. exception cannot be ignored in THIS case. agreed
16:00 Naros Exception handling shouldn't be ignored in any case :P
16:00 Naros because you won't come back and add it when the project timeline gets too close otherwise
16:00 Quest Naros,  oh got it again.
16:00 sfisque think of EM.find() as deserialization, not creation
16:01 Quest sfisque,  got it
16:01 sfisque you either get an "existing one" from the db, or null
16:01 Naros ^
16:01 scripty left ##javaee
16:01 Naros be aware IIRC if you use the hibernate session to find though and one isn't found, it throws an exception and doesn't return null in this case.
16:02 Naros only JPA returns null
16:02 Naros i know you've dabbled with hibernate prior, hence my warning is all
16:03 Naros That's another reason why we use an EntityNotFoundException so whether we're using hibernate directly or JPA - the service tier code looks identical.
16:04 scripty joined ##javaee
16:05 sfisque aye.  but bear in mind Q that exceptions are costly.  not that you shouldnt use them, but "generally" (aka not specific cases) you want to use things like != null or other tests before relying on an exception for code execution dispatch.  what naros has described though is a way to unify two different API's at a boundary point, which is a fine use of using an exception as a code branch
16:06 Naros yep, goes back to the testing for null discussion we had a few weeks ago.
16:06 sfisque :-)
16:06 Naros would null ever be a logical value and if so, exceptions are the right route to avoid lots of code changes :P
16:07 johnkozak84 Hey guys! I am trying to connect to EJB using credentials but why i use ProgrammaticLogin it get No LoginModules configured for default error
16:07 johnkozak84 any good tutorial around ?
16:07 Naros sfisque: did you see my myeclipse conundrum earlier?
16:07 Naros not sure if you've dabbled with ME before or not
16:08 sfisque i did not
16:08 Naros I has 2 projects, a webapp and the other is a taglib.  Both are maven projects and when running the webapp in development code, seems MyEclipse just wants to copy the compiled target class structure of the taglib into the target webapp structure rather than use the taglib jar from the local repo.
16:09 Naros any idea how to force development mode deployment of the webapp to use the jar instead.
16:09 Naros cause it doesn't find the meta-inf/taglib.tld file otherwise since it isnt jar'd
16:09 scripty I dont like frameworks :/
16:10 sfisque johnkoszak84 : i am assuming you've annotated the EJB (or method) to require a particular role?  and you're trying to auth to connect to that bean?
16:10 Naros scripty: frameworks, while in many cases are painful to learn, they do shave tons of time off development that would otherwise be extremely costly
16:10 sfisque naros, i did write a freeware ME app some years ago, but i did it in the oracle mobile ide
16:10 scripty I quit on 2010 still it exist :(
16:11 Naros Ah
16:11 Naros It works if I run the webapp in production mode since that generates a WAR rather than an exploded structure in the servlet container's webapp folder.
16:12 Naros Just means changes to JSPs aren't realtime that way :(
16:12 Quest Naros,  why use these sequentially
16:12 scripty that too same frameworks lol
16:12 sfisque a war?  an ME project should produce a jar and jad pair
16:12 Quest wait
16:13 Naros sfisque: why would ME generate a jar for a webapp :P
16:13 Quest catch(IllegalArgumentException e) {
16:13 Quest }
16:13 Quest catch(TransactionRequiredException e) {
16:13 Quest }catch(IllegalArgumentException e) {
16:13 Quest }
16:13 Quest catch(TransactionRequiredException e) {
16:13 Quest }
16:13 sfisque ME == micro edition… aka smart phone/embd device
16:13 Naros Oh we are talking two things then.  ME = MyEclipse
16:13 sfisque oh, ROFL
16:14 Naros damn acronyms.
16:14 sfisque myKnowledge.contains( myeclipse ) == false;
16:14 sfisque ^_^
16:14 scripty And same questions are asked again and again ROFL
16:14 johnkozak84 sfisque: Yes, I am using annotations. Yes that is why I am trying to do
16:14 Naros K; I'll resort to the forums.
16:15 sfisque johnkozak84 : have y ou configured a jaas provider so the container can auth/auth properly?
16:15 Quest i mean first this  IllegalArgumentException e      and then this  TransactionRequiredException
16:16 Naros Quest: what is your question?
16:16 johnkozak84 sfisque: I added only the users to glassfish: Security / Realms / file
16:16 Naros oh wait, i see it
16:16 johnkozak84 and then used ProgrammaticLogin.login
16:16 Naros are you asking why I didn't do something like catch(Exception1 | Exception2) { }  versus two catch blocks ?
16:17 johnkozak84 I guess i am missing a few steps here
16:17 sfisque are the ejb's deployed as a standalone jar or inside a war/ear?
16:17 Quest Naros,  why catch these exceptions for .remove()  IllegalArgumentException e      and then this  TransactionRequiredException
16:17 johnkozak84 inside ear
16:17 Naros Because remove() throws them
16:17 Quest hm
16:17 Quest k
16:17 sfisque have you configure the ear to use the security provider that you configured?
16:18 Naros I catch IllegalArgumentException and convert it to a standard exception (EntityNotFoundException) since that was sufficient for us.
16:18 Naros I catch TransactionRequiredException merely to log the warning in the logs and rethrow it.
16:18 Quest Naros,  http://docs.oracle.com/javaee/6/api/javax/persistence/EntityManager.html#remove(java.lang.Object)
16:18 Naros Yep, see it throws those two exceptions :P
16:19 Quest Naros,  IllegalArgumentException will handle if the box == null            ?             (ignore my if block though)
16:19 sfisque i'm not sure on the specifics of securing direct access to glassfish remote beans, but i'm guessing you need to add a deployment desciptor to the ejb jar file to make glassfish tie the security realm to the ejbs deployed in that jar
16:19 johnkozak84 sfisque: no
16:19 Quest Naros,  and why didnt you do  catch(Exception1 | Exception2) { }  versus two catch blocks ?
16:19 johnkozak84 sfisque: how do you call that ? do you have any link for it
16:20 Naros As sfisque said earlier, our DAO layer in most cases uses JPA but in certain cases uses the Hibernate JPA provider where we need hibernate specific stuff.  So we "mask" certain JPA and Hibernate stuff into a single response mechanism so that the service tier code doesn't care whether the DAO invoked JPA or Hibernate.
16:20 sfisque javaeebot lucky EJB jaas secure standalone remote jar descriptor
16:20 javaeebot sfisque: http://docs.oracle.com/cd/B14099_19/web.1012/b15505/access.htm
16:20 Naros and the reason I didn't use catch(ex1 | ex2) in this case was because i wanted to handle each exception differently.
16:21 Naros one was rethrown while the other was recast into a different exception type
16:21 sfisque that shoudl be a good starting point johnkoz
16:21 johnkozak84 sfisque: thanks
16:21 Quest Naros,  ok
16:24 Quest http://pastebin.ca/2467011
16:26 Naros that looks fine altho i'd clean up all those return statements :)
16:26 Naros I'd move return false as the last line of the method and not return anything in the catch blocks.
16:26 Naros and remove the else {} block
16:26 Naros but that's just my code OCD complex
16:27 sfisque or, create a boolean flag, initialize to false, and if EM.remote executes fine, set to tru, and return the flag at the bottom
16:27 Naros That's another way to do it as well. :)
16:28 Naros And probably ideal tbh.
16:28 sfisque but like naros inidcates, you don't want "returns" feathered through the code . it creates difficutly reading and maintaining
16:28 sfisque it has the "goto" smell when a method has 3+ return statements
16:28 Quest so how the code should be?
16:29 sfisque at 02:  boolean retFlag = false;
16:29 Naros http://pastebin.ca/2467015
16:29 sfisque at 07 : retFlag = true
16:29 sfisque or that
16:29 Naros lol
16:29 sfisque what naros linked
16:29 sfisque :-)
16:30 * sfisque nods sagaciously at naros
16:30 * Naros giggles.
16:31 Quest ah. sensefull
16:33 Quest i mean nice
16:33 Naros My apologies Quest, I am just overly sensitive on code technique :P
16:34 Naros I think it's best if you learn this early on cause programmers are bad about this thing and lots of code reviews get rejected purely on that type of behavior
16:34 Quest Naros,  i like that
16:35 Naros Had a guy who was a stickler to me when I first started out and I guess I took a page from his book :)
16:35 Naros First 2 months, I think about every project I worked on was rejected due to silly stuff
16:36 Quest servlet and EE containers have their on database pools. so they should be configured as such. I think JDBC dont have a pool by default? we con.close() every time?   hibernate would maintain a pool I GUESS.   what if I want to make pools in a desktop / server application? should I just use apache pools libs ?
16:37 Naros It's best to provide JPA or Hibernate a DataSource which has a pool associated to it.
16:37 Quest just want to reuse the same connection. as my app is haveing 700 threads * many connections
16:37 Naros let it do it's own plumbing
16:37 Quest yes, DataSource but I am on pure JDBC
16:38 Quest Naros,  hibernate/jpa dont do pooling by default? i once saw a hibernate settings that said connection pool = 5
16:38 Naros I just setup a JNDI pool in the servlet container
16:38 Naros and pull that JNDI resource in my webapp
16:38 Quest there is no servlet
16:39 Naros you're running this in tomcat yes?
16:39 Naros oh wait, desktop app sorry
16:39 Naros herp derp
16:39 Quest no
16:39 Quest desktop
16:40 Naros There are various database pool implementations you can use, including one from apache
16:40 Naros Just configure it up somewhere when the app starts and hand it off to JPA
16:41 Naros er well, maybe not precisely that simple cause i forget you aren't using spring either :)
16:42 Naros Makes me feel lucky that few lines of XML configs and bam it just works
16:42 Quest Naros,  there is no JPA
16:42 Quest just jdbc
16:42 sfisque there is only ZUUL
16:42 Quest no spring either.
16:43 Quest Naros,  so doing ALL that with spring is much easier?
16:44 Naros We talked about this before Quest.  With spring I just use transaction demarcation annotations and it does all the JDBC stuff for me.
16:44 AlexCzar joined ##javaee
16:44 Naros @Transactional public void someMethod(String param1, Integer param2) { Entity e = dao.findbystuff(param1, param2); /* do stuff with entity */ }
16:45 Naros I have a datasource configured in xml and pass that to the spring jpa provider.
16:45 Naros Then the annotation opens the connection for me and closes it when it finishes.
16:45 Naros Rollbacks if it's readonly, etc.
16:46 Naros There are several ways to accomplish this i think without spring too
16:46 Naros My that's where my experience is presently with what i work on daily.
16:46 Quest hm
16:47 Naros You could write your own annotation stuff too that does what spring gives me if you wanted.  IDK what JavaEE may offer specifically.
16:47 sfisque you can do transaction demarcation with jdbc.  but raw jdbc is going to force you to do lots of String manipulation (either directly or via MessageFormat)
16:47 Naros I gave up on straight JDBC years ago personally.
16:47 Quest Naros,  i have that datasource in xml but for hibernate with spring
16:48 sfisque aye naros, but for small CLI apps, jpa would be swatting a fly with a bazooka
16:48 sfisque for EE, jdbc would be pure insanity
16:48 Naros perhaps, but i love using bazookas :P
16:48 Naros i like big booms!
16:48 sfisque i'm more of a RailGun dewd myself
16:48 sfisque :P
16:48 Naros lol
16:49 Quest sfisque,  jdbc has one advantage. its faster than hiberante
16:49 Quest frameworks do extra stuff that fasilitates people but make it slow
16:49 sfisque well, yes, you get performance going "to the metal" but you lose development cycles
16:49 Quest true
16:50 Quest my app is small. just one DAO class
16:50 Quest but the use / load is huge
16:50 Quest so choosed jdbc
16:50 sfisque frameworks are not about performance generally, they are about predictable coding results, uniform solution, and maintainaability
16:50 Quest its basically a web crawler with 700 threads
16:50 sfisque 700 threads?  why on earth?
16:50 sfisque you can do that with 2-4 threads just as well
16:51 Quest am.  700 worker threads
16:51 * sfisque goes and barfs in the corner behind the couch
16:51 Naros he wants to kill the cpu with context switching :P
16:51 Quest sfisque,  i see that 5 threads dont give such performance . dont know why
16:51 sfisque what are you doing that requires that much parallelization?
16:51 Naros Quest: let me ask you something - how many cores is the production machines going to have?
16:52 sfisque 23409583408345358 cores
16:52 sfisque :P
16:52 sfisque he's going to lease time on that new chinese cluster
16:52 Quest sfisque,  web crawler
16:52 Quest Naros,  3 cores
16:52 Naros on an 8 core processor assuming that each core is 2 hardware threads, you'd want to have no more than 13-14 threads tops.
16:53 Naros that's to maximize performance and avoid context switching
16:53 sfisque when you say webcrawler you mean crawling a server or crawling a splash of servers because the links take you there?
16:53 Quest Naros,  sfisque  well then why i get good performance on >100 threads and not even half for 10
16:54 Quest sfisque,  crawling web pages
16:54 Naros Because it may run faster doesn't always equate to better performance :P
16:54 Naros that poor poor poor cpu chip :/
16:54 * Naros comforts the dying cpu on it's last days.
16:54 Quest Naros,  no. i am saying it by counting the web pages crawled and watching network bandwidth
16:54 sfisque ROFL
16:55 Quest Naros,  you mean the cpu will die?
16:55 tjsnell 700 threads means the fast majority of your cpu time is context switching
16:55 * sfisque wonders how long it will be until Q's isp starts charging him by the Gb block
16:55 Naros A CPU can only do so much in parallel and that's based on the maximum number of hardware threads the CPU supports
16:55 Quest tjsnell,  yes. it is using 100% cpu but performing as well
16:55 tjsnell hell, tomcat can handle over 10,000 connections with about 100 threads
16:56 sfisque i'm guessing it's probably only using 3%, and the other 97% is the cpu crying to itself in the corner
16:56 tjsnell or less
16:56 Naros So with 700 threads, you're basically overworking the CPU to the point where you're negating it's ability to schedule time slices for each thread efficiently.
16:56 Quest then why i get good performance on >100 threads and not even half for 10, i am saying it by counting the web pages crawled and watching network bandwidth
16:56 tjsnell unless you have a really nifty computer
16:56 sfisque beowulf cluster….. bazing!!!
16:56 Naros less threads will mean it will use less bandwidth and take longer, but the machine won't be laggy because the CPU is being thrown into oblivion :P
16:57 Naros classic case of throw more threads is the solution syndrome if you ask me.
16:57 Quest am..well why theres so huge performance difference then
16:58 Naros if you want distributed work, you create multiple crawlers running on multiple machines in a cluster, where each node uses a maximum cpu thread count setting.
16:58 Naros bring nodes online when you have excessive work and offline when the workload is lower
16:58 Quest hm
16:58 Quest understood but why such huge performance difference
16:59 Naros profile your CPU and get back to us :P
16:59 Naros can you do anything on that machine when 700 threads are running?
16:59 Quest iam now using 100 threads and 40% of cpu used. performance is 30% of that of 700 threads
16:59 Naros on a 3 core machine?
16:59 Quest Naros,  yes. i am chating and developing on netbeans at the same time
17:00 tjsnell not using NIO I suppose?
17:00 Quest sory its. core13 with 2 cores
17:00 tjsnell 1 thread per connection?
17:00 dangertools joined ##javaee
17:00 dangertools joined ##javaee
17:00 Quest tjsnell,  each thread makes its own connection(S) to jdbc postgres . desktop app.   and the db is on the same machine as wel
17:00 tjsnell ouch
17:01 tjsnell that's painful
17:01 Quest ho. now the performance just reached == 700 threads for some seconds
17:01 Quest tjsnell,  it is, but i just want to understand the reason
17:01 Quest performance again 30%
17:01 Quest 100 thread runing
17:01 tjsnell it's hard to say, you have a crappy design
17:01 Quest cpu usage 50%
17:01 Naros Here's the skinny Quest.  It may work and visually you may not notice pain points.  But if you profiled the hardware, I would expect you would.  Just because something works doesn't mean it's the optimal design is all.
17:01 tjsnell so I really don't want to try to understand it :)
17:02 Quest i am saying it by counting the web pages crawled and watching network bandwidth
17:02 Quest Naros,  i have profiled the software with netbeans profiler and the hardware too
17:03 Quest it just seems that more threads do more
17:03 Quest ..
17:03 Naros We had hibernate search using I think 10 threads to mass index millions of records and while we could do that in under 10 minutes, the load on the system was enormous.  We reduced the thread size to 4 and noticed that it the system performance was significantly better and took only 2 minutes longer.  And that's on a 4 core virtualized box.
17:03 Naros Not saying hibernate search = your solution because they're entirely different beasts.
17:04 Naros just that more threads, running faster isn't always the answer.
17:04 Quest Naros,  asynchronus threads?
17:04 tjsnell threads are threads
17:04 tjsnell there's no such thing as sync or async threads
17:04 Naros It was doing a much of database fetching, work queue and batching to create indices of searchable terms.
17:04 Quest i suspected he might not have decoupled the request / response .    request / worker relationship
17:05 tjsnell if you force your threads to sync a lot, stop and write better code
17:05 Quest mine are synchronous though
17:05 tjsnell right, suck design
17:05 Quest Naros,  tjsnell  at the end of the day. the better app is the one which performes better. and the 700 thread one is much much better.  now i just wanted to know why
17:06 Quest as many said that this level can be reached with just 10 threads
17:06 tjsnell right and you're ignoring our advice on how to make it better
17:06 tjsnell so I'll just move on
17:06 tjsnell good luck
17:06 Quest no . i mean:
17:06 Naros Quest: solution is smaller thread pools & clustered design :P
17:06 Naros distributed work
17:06 Quest many said that this level can be reached with just 10 threads .  i just wanted to know why
17:07 tjsnell with proper design
17:07 tjsnell have you read jcip?
17:07 Naros Depending on how you interact with the threads and what they do, 10 threads can probably easily do what you're needing it to do.
17:07 sfisque because a thread is near worthless if it is spending most of its lifecycle pending/waiting
17:07 tjsnell you don't need a thread per connection
17:07 Quest Naros,  agreed. but why in my specific app . theres a huge perfoamcne diff b/w 10 and 700   and still people say that max or same performance can be reached with 10. and only use no more than 15 .          why
17:07 tjsnell that's bad unscalable design
17:08 sfisque all you're doing is using threads as a book keeping mech, and that's an obvious anti-pattern
17:08 tjsnell Quest:  you have a shit design, who knows why it's better like that. It's not worth figuring out.
17:08 Quest agreed. i have a shit design. why it performs so good with insane amount of threads? and dont do much with 15
17:09 sfisque i'm guessing the better performance is purely a product of diminishing returns.  eventually it would start to decline but he hasnt hit that equilibrium point
17:09 Quest tjsnell,  ok.. got your point.
17:09 * Quest agrees with sfisque
17:09 tjsnell good is relative, we're telling you how to exceed your current design
17:10 Quest the equilibrium point is not reach. but i still wonder. why why such insane no. of threads do that good
17:10 Quest and 15 or even 20 dont
17:10 tjsnell it's an insane design and not worth figuring out
17:10 tjsnell do it right and blow this design away speed wise
17:10 Naros Quest consider this.  8 threads fetching network data and 2 threads processing the results.   You might even be able to optimize that to 9 fetches and 1 processing thread.
17:10 Quest going to test with 2000 thread
17:10 Quest s
17:10 tjsnell do not do 1 thread per connection
17:10 sfisque ROFL
17:11 Naros Right, hence my recommendation of 9 connection threads on the network :P
17:11 sfisque why stop there, go for 32k threads
17:11 sfisque go big or go home
17:11 * Naros covers his face with his palm.
17:11 * sfisque lights his pipe and sits back, waiting for the smoking crater that used to be Q's processor
17:11 Quest cpu 100 %   net bandwitdh 100%   performance 100% +         and constant.   database connection drops , too many as 100 con limit.
17:11 tjsnell Quest:  take note, sfisque and I are in full agreement, that means something :)
17:12 Naros Quest: One thing I've learned is decomposition is a great way to significantly improve performance.
17:12 Quest cpu 70%
17:12 Quest net 70
17:12 Naros Decompose the fetch & process into smaller tasks, submit those tasks to a thread pool and watch it scream
17:13 sfisque exactly.
17:13 Quest well now all is 0%
17:13 Naros This is how game engines are able to handle and process tons of data, even data-oriented design in fractions of milliseconds :p
17:13 Quest the app just froze
17:13 tjsnell of course it did
17:13 Naros Yep
17:13 Naros expected just that
17:13 sfisque rethink your workflow into chunks (like legos) and have a couple threads just process 1 chunk at a time
17:14 tjsnell who here is surprised?
17:14 sfisque (chunk == task)
17:14 * sfisque is disappointed that there is no smoking crater
17:14 Naros Task-based processing is definitely how you can get enormous throughput on the smallest of hardware and scales extremely well.
17:15 * Naros pokes Quest, you don't have a fire yet do you?
17:15 * Naros sounds the alarm!
17:15 sfisque aye.  and if you wanted to get "fancy" you could have 7 fetchers, 2 processors, and 1 monitor that handled deadlocked thread situations
17:15 Quest well heres the small ap. this class has 100 threads doing optimum
17:15 * Naros nods.
17:15 Quest http://pastebin.ca/2467025
17:16 Naros But do you see how your crawl() method does everything
17:16 Naros decompose that method into smaller tasks
17:16 Naros a fetch from website task
17:16 Naros a process result from website task
17:16 Naros and an executor that is just processing pending tasks
17:18 Naros you can still use the 1 network connection per fetch task in this design with small sized thread pools for the executor.
17:18 Naros and the database push could use a database thread pool to avoid the expensive jdbc open/close process.
17:18 Quest hm. agreed. but was trying to understand this small app as it is
17:19 Naros As sfisque said earlier, you just had not hit the breaking point of your design and now you've seen it doesn't scale
17:19 Quest ignore the new logging thing. its bad design though
17:19 Naros When the work for a single machine becomes too much, the next logical step is to distribute it
17:20 Quest but the questino still lies. why insane amount of threads work too good . 700 and why suggested sane amount 15 dont perform even 30% of that
17:20 Naros keep that in mind with your design from the start if you expect such a work load.
17:20 Quest lyes
17:20 tjsnell it's a bad design!
17:20 tjsnell give up
17:20 tjsnell you're wasting time
17:20 tjsnell do it right
17:20 sfisque aye, once you create a "proper" multi thread pool, you're 1 step shy of doing true "distributed work".  you can then do things like farming effort to a pool of servers (cluster)
17:20 Naros 700 threads worked because you hadn't hit the brickwall was all.
17:20 tjsnell forget about why your bad design performs the way it does
17:20 Quest tjsnell,  agreed.
17:21 Quest but why
17:21 tjsnell then you don't agree
17:21 tjsnell why doesn't matter
17:21 sfisque i'm with naros.  it's not bad that Q did this experiment.  he learned from it.
17:21 tjsnell you don't learn by trying to understand how shitty design performs
17:21 tjsnell yeah
17:21 tjsnell it's time to move on though
17:21 Naros Quest: are those sites you're crawling local on your test cases or remote on other servers?
17:21 sfisque but now it's time to learn from the mistakes
17:22 sfisque sure you do tjsnell.  part of learning is understanding why the failure happened
17:22 Naros local as in on your internet or remote as in internet?
17:22 Naros *intranet local i meant
17:22 Quest tjsnell,  its not about improving the design now. that can be done any time. its about understanding why insane no. of threads work best
17:22 Quest sorry for being stubbon
17:22 * tjsnell moves on
17:22 tjsnell I'd fire one of my employees if they kept this up :)
17:22 sfisque i stand by my theory.  you were seeing diminishing returns until you "hit the wall"
17:23 Quest thanks at <sfisque> i'm with naros.  it's not bad that Q did this experiment.  he learned from it.
17:23 Quest Naros,  remote
17:23 Quest thanks for sfisque> sure you do tjsnell.  part of learning is understanding why the failure happened
17:23 Naros It's always worth experimenting with "flawed" designs to understand the benefits from a "proper" design.
17:23 tjsnell I disagree
17:23 Quest tjsnell,  :)
17:24 tjsnell quest is proof
17:24 * sfisque nods at naros' wisdom
17:24 tjsnell wow
17:24 Naros But there is value in heeding people's recommendations about proper design rather than continue to beat a dead horse until it's puree.
17:24 tjsnell so sick
17:24 tjsnell you learn by studying the masters, not the fools
17:25 sfisque both
17:25 sfisque you learn by studying both success and failure
17:25 Quest I just cant undertand one thing.      in any app 15 threads are suffice.   thats not the case with mine.      why i get much much more performance with 700 while all say that 15 would also do the same.?  end of story.  app class for ref http://pastebin.ca/2467025
17:25 Quest Naros,  your point was exactly my point
17:25 sfisque bear in mind that at some point, everything has to be tried a first time, and then it becomes realized wether it's a bad/good solution
17:26 Naros Quest: A lot of that depends a lot on what the thread is actually doing.
17:26 Quest Naros,  well i just issued the print http://pastebin.ca/2467025
17:26 Quest thats all what the app does
17:26 Quest small class.
17:28 Naros We mentioned decomposing your thread stuff into tasks.  If I look back 5-8 years ago, we developed game engines where specific components were given it's own thread.  Today, we no longer do that and allocate a shared thread pool that is used by the entire engine.  There are still a few legacy components that don't fit with that design, but those are handled in case-by-case situations.  But that's just a model that worked well fo
17:28 Quest ah, my hardisk got full by so much hyperlinks saved!!!!! iam amazed to see so much performance
17:29 Quest Naros,  no no. the recomendations are honored but first need to understand as it is
17:29 Naros My point is simple, use the right tool for the job rather than the same hammer to install the window :P
17:29 Quest hm
17:30 Quest i was studing a bad tool doing actually good..........
17:30 Naros keep your crawler as-is.
17:30 Naros create a new one with the approach we're suggesting
17:30 Quest apparently though
17:30 Naros then compare the two
17:30 Quest hm.
17:30 Naros see which one can out-perform the other with insane work loads
17:31 Naros I bet you my lunch our suggestion will win hands down.
17:31 Quest executor service, one fetcher of links , and one thread to process them. and one thread to interact with DB . so 3 thread app?
17:31 Naros Close but no.
17:31 Quest then?
17:32 Naros Try like 7-8 fetchers, 1 processing thread.
17:32 Quest fetchers?
17:32 Naros make it configurable so you can tweak the numbers ofc.
17:32 Naros fetchers = network link downloads
17:32 Quest the fetching and saving is from db
17:33 Naros DownloadURL could ask the DB for a URI and then fetch it from the remote server.
17:33 Naros Create 7-8 of these
17:33 Naros DownloadURL submits a task called ProcessURL with the response
17:33 Naros have something else processing these
17:33 Naros using 1 or 2 threads
17:33 Quest hm
17:34 Naros decompose that crawl() method into smaller tasks.  perhaps read up on decomposition.
17:34 Quest k
17:34 Naros decomposing in a task based architecutre.
17:34 Quest Thanks Naros  sfisque  tjsnell !
17:35 Naros Good luck!
17:35 Quest thanks:)
17:35 Quest dinner
17:35 Naros lunch time for me :P
17:35 Quest :)
17:35 Quest left ##javaee
18:21 johnkozak84 sfisque: I had no luck with the security credentials
18:41 sfisque i found when i did something similarly on jboss, i exposed an annotated webservice with the same role restriction, and used that as a test enpoint.  once i connected and auth/auth'ed to the WS, i found that the connecting to the ejb was ready.  maybe go that route (easier to test a WS endpoint in a browser page)
18:42 pdurbin "Removing trailing comma in array-typed annotation attribute - some versions of javac dislike it" -- https://netbeans.org/projects/javafx/lists/commits/archive/2012-09/message/81
18:42 * pdurbin wonders which versions
18:44 sfisque hrm, no jira ticket in the commit msg.  blech
18:44 johnkozak84 with jboss it was working but things are slightly different with glassfish.
18:45 pdurbin sfisque: the trailing comma thing? see https://netbeans.org/bugzilla/show_bug.cgi?id=214498#c6
18:45 sfisque aye.  i find jboss' treatment of jaas superior to GF, but you lose the console admin (i wish jboss would add an admin console and not force editing xml files)
18:45 johnkozak84 indeed
18:45 sfisque there ya go, 1.6
18:46 sfisque i guess u23 fixed it
18:46 sfisque and the nb patch is for pre-23 compiles
18:47 pdurbin yeah, my javac is 1.6.0_51
18:49 sfisque we finally vetted and deployed on 7 recently so we're good here.  though we do not use javafx
18:50 sfisque is javafx used in anyway for web apps, or is it primarily browserless RIA tech?
18:53 pdurbin could use javafx in applets, I guess
18:54 sfisque aye, probably i guess.  it's one of the few java tech's i've not fiddled with, so i know scant about it
18:57 pdurbin James Gosling uses JavaFX in a desktop app built on Netbeans Platform (or whatever you call it)
18:59 sfisque yah.  from what i know of it, it's similar to using Flex (actionscript) to build RIA's that can talk to remote services (WS/REST/Blaze/etc.)
18:59 sfisque you can build FLex apps or applets that run in the shockwave plugin
19:00 sfisque so i guess jfx is similar.  i was unsure if there was a way to run jfx natively (like compile to JS option, etc.)
19:00 sfisque ***natively in the browser
20:15 Quest joined ##javaee
20:37 Pikkenstein joined ##javaee
20:40 jbwiv left ##javaee
20:51 Naros sfisque: remember my ME issue :P
20:52 Naros anyhow, solution was to disable workspace resolutions
20:52 sfisque ah
20:53 Naros in case any other ME'er stumbles into that issue
20:53 sfisque make an ##MyEclipse and make that the channel MOTD
20:53 sfisque :-)
20:53 Naros lawlz, no thank you
20:54 Naros i already have no hair left trying to figure out this silly top-down, left-to-right array sorting mechanism for a series of table links :/
20:55 Naros didn't follow the typical for( x ) { for ( y) { index = (y*cols) + x; } :/
20:55 sfisque underlying sparse matrix?
20:56 Naros Not sure if that's the tech name for it.  But basically fill a table of X columns starting from left and moving right.  But you have maxrows = ceil(options / columns) but the caveat was you wanted to maximize filling columns rather than rows.
20:57 Naros but only following the max fill column logic for the last row.
20:57 sfisque OH, i see.  yeah, table pivoted across the xy diagnal
20:58 Naros already bad enough I has little hair to start with :E
20:59 Naros anyway, brings me to something else
20:59 Naros we had some AOP stuff we layed atop of our domain model objects in certain cases for various workflow, security, etc concepts.
21:00 Naros when all this was in a single project, I just saw the AOP applied methods and not the properties.
21:00 Naros but when applying the AOP stuff to the domain project, the application sees these public properties i guess because technically aspectj makes all these things public.
21:01 Naros But technically doesn't it make more sense to apply the aspectj stuff from the app project?
21:02 sfisque dunno.  it's been a very long time since i've touched aspectj
21:02 Naros Okies.
21:02 sfisque all of my aspect coding last 6 years or so has been either vanilla EE interceptors or custom EE annotations
21:03 Naros In our case they're mostly custom EE annotations that the aspectj compiler woven in during build time.
21:04 sfisque aye.  all of the custom ones we've been using are "rolled in house"
21:04 Naros hm
21:04 Naros Perhaps there is a different way you could share on how to accomplish the same goal?
21:05 Naros Basically I have an annotation lets say Cancelable which applies a cancelable property and a setter & a getter method
21:05 Naros But when I see that entity compiled in the main app, the cancelable property shows up as some public property
21:06 Naros and i think that was due to aspectj
21:06 Naros so how could i do the same without aspectj
21:06 sfisque is the anotation processor rewriting the source before compile, or instrumenting the compiled byte code?
21:07 sfisque i've not done anything with "compile time" processing, so i''ll fumble along with you :-)
21:07 Naros i believe rewriting before compile since it uses ajdt (ijc i believe is the util) to compile
21:08 Naros but im open to a different approach if it gets me to the same end-game.
21:09 sfisque as far as generating the mutator/accessor you're eaither going to gen code, instrument byte code, or have some proxy manager interpose a proxy that provides the impls.  i'd say using aspectj is going to be your best ROI, unless you want ot remove it from your build and go "home brew".  then you can use apt to do some code gen, but you'll have to spend time "rolling your own"
21:10 Naros Yah i dont necessarily want to spend any considerable time on this to be honest.
21:11 Naros I probably could use spring's AOP module to do a lot of this and let it be webapp dependent, but that's basically the proxy concept if i understand spring aop
21:11 sfisque so if i understand you want aspectj to run when the subproject is run, but it's running when you are doing the top build?  or vice versa?
21:11 Naros No aspectj runs only for the child project as I have it configured.
21:11 sfisque yah, spring works like EE, it uses proxies where applicable.
21:11 Naros But when i use that domain class in the main app, I see something like
21:11 Naros entity.$_somepublicstuff_cancelable as a property
21:12 sfisque ah, so it's wiring in an inner class so it's doing poor mans proxying with a delegate
21:12 sfisque i assume
21:13 Naros Going the proxy approach, is there any significant performance hits when lets say a resultset of several hundred entities are loaded ?
21:14 Naros The other approach would be to hardwire this stuff as transient things into the domain model rather than weave it
21:14 sfisque well, you're going to swallow a few instruction executions during the "pass through", so i _could_ be a performance hit, but i'm guessing if the impls that are being proxied/delegated are light, it should be modest or unnoticable
21:14 sfisque aye
21:15 Naros Hm
21:16 Naros A majority of this is purely around security
21:16 Naros isViewable, isReadable, isWritable, isDeletable
21:16 sfisque ah
21:17 Naros entities get passed through a security layer which inspects the user's rights and flags entities accordingly.
21:17 Naros Then proper logic dispatch can make proper decisions on what to permit
21:18 Naros or where to route the user
21:19 sfisque there is the standard @DeclareRoles() but AFAIK that just gates on/off and does not do any special dispatch, though i guess you could modify that with an @InvokeAround interceptor
21:19 sfisque but that's pure EE and wont work in the servlet layer or non-contained enviroment
21:19 Naros yah sounds simiilar to the @PreAuthorize, @PostAuthorize, and @PostFilter spring security counterparts.
21:20 Naros where those get delegated off to a security permissions evaluator with the object of interest.
21:20 sfisque yah, similar
21:20 Naros which is precisely what we have
21:21 Naros but that evaluator is not only responsible for checking authorization permissions but sets these bools which feels bad.
21:21 Naros if(user.hasRole('delete role')) { entity.setDeletable(true); }
21:22 sfisque i guess that gives you "exportability" so that out of container consumers (REST, CORBA, etc.) can obey the security model on their end
21:23 sfisque or exposure in the web client
21:23 Naros yah, since the service tier has the security wrapping it, it doesn't matter the external medium.
21:23 Naros whether struts, ec.
21:23 sfisque #{bean.deletable} versus #{controller.methodWrappedAroundEJB{blah)}
21:24 Naros yah
21:24 Naros but these methods are what we aspected in rather than making them part of the base entity because our entities dont share a common parent.
21:24 sfisque but that can get dicey because decoupling the security that way assumes the consumer is "on board" with enforcement
21:24 sfisque gotcha
21:25 Naros for this app, the security model must be enforced regardless of the consumer.
21:25 sfisque right.  i was hinting at the concept that a bean bubbles up with a flag set to false, but the UI disobeys it and renders the button anyway, even though pressing the button results in a security violation and no data
21:25 Naros but services aren't shared across different apps so there lies another issue with my implementation
21:26 sfisque yah.  granular security in a decoupled environment is rough.
21:26 Naros Yah that's true.
21:27 Naros only real way to do it would be that the service stuff would have to be somehow shared across multiple apps, which I doubt is doable.
21:27 sfisque reminds me of the opendoc endeavor back in the 90's.  where they were tyring to bundle "app like functionality into the document" what we need is a way to bundle security into the payload
21:27 whartung They call that DRM sfisque
21:27 Naros heh yah
21:27 sfisque tehre are impls, but no real standard yet.  like SASL
21:28 sfisque aye whartung, but i was thinking more enforcment and less on/off gating
21:28 whartung that's a mere detail :)
21:28 sfisque like i have a payload, and the payload says i can read and modify a few attributes, but part of the payload is read only
21:29 sfisque drm tends to be on/off.  you can read or you cannot
21:29 whartung DRM is DRM, it can be as fine grained as you like "Do anything 10 times" "Do anything for 30 days, then just read", "everyone but sfisque can use this"
21:30 sfisque aye, but that's an artifact of the enclosing sandbox, not the object itself
21:30 whartung I had the mistake of using a DRMd PDF once -- it was horrible.
21:30 whartung yea, it's unrelated to the payload
21:31 whartung we have XACML for this today, for those willing to actually abide by it
21:31 whartung and SAML
21:31 whartung it works well for this
21:31 sfisque odoc was based on the concept that you embedded app functionality into the doc itself, so ify your doc had a small table, it would embed a grid viewer for rendering the data, and it travelled with the doc
21:31 sfisque it would be neat to conceive of a way to do that with security enforcement
21:32 sfisque like i want this field encrypted and the decryptor is IN the payload and somehow obeys certain rules for running or not running
21:32 sfisque or this field is r/w only if you have a certain credential (pw/cert/key/etc.)
21:32 whartung XACML is that fine grained
21:32 whartung (can be)
21:33 sfisque aye but does the impl travel with the payload or is it part of the viewer app?
21:33 sfisque that's kind of what i'm hinting at.  basically a payload as a standalone with its security sandbox in tow
21:33 whartung well I guess it depends on the payload. SAML can be embedded, no reason XACML can't
21:34 whartung it's one of the attributes of XML that makes it awesome, in all of its "HOLY S*** this crap is complicated"-ness
21:34 sfisque i think we have our million dollar idea.  lets get coding.  who's going to startup the github :P
21:34 whartung namespaces are awesome :)
21:34 whartung I'll do the T-shirt
21:35 sfisque Secure Payload And Zoom… SPAZ
21:35 * Naros concurs with the acronym.
21:35 sfisque >.<
21:35 * Naros spazes out.
21:36 whartung domains taken
21:36 whartung :D
21:36 sfisque of couse it is
21:36 whartung of course
21:36 sfisque iirc, it was around 97 that all the three letter domains evaporated.  i'm sure 4 letter ones soon followed
21:57 Pikkenstein joined ##javaee
22:55 pdurbin tjsnell: heh. you and sfisque in full agreement :)
22:57 tjsnell it's bound to happen on occasion
22:57 pdurbin :)
23:01 sfisque you know.  cats and dogs living in harmony....
23:02 sfisque the end of the world… as we.. .know it
23:05 pdurbin learn from the masters and your mistakes, I say :)
23:13 * sfisque agrees with pdurbin
23:13 whartung Yea, I like learning from your mistakes pdurbin
23:13 sfisque rofl
23:13 ibaca joined ##javaee
23:26 pdurbin whartung: http://knowyourmeme.com/memes/im-ok-with-this :)
23:26 sfisque |o
23:27 sfisque that was supposed to be  my in the moment emoticon of a thumbs up
23:27 sfisque |n
23:27 whartung heh
23:27 sfisque h
23:27 sfisque b
23:27 sfisque there we go
23:27 sfisque _b
23:27 sfisque O_b
23:28 sfisque d_0_b
23:28 sfisque double thumbs up
23:31 whartung http://xkcd.com/1270/  "Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics." lol
23:31 Pikkenstein joined ##javaee
23:33 sfisque man i would KILL for an online example of interfacing with camel server that doesnt use any camel classes on the client side.  gah!
23:33 whartung stick an HTTP listener on it
23:42 sfisque have to use JMS.  problem is, the current impl uses the camel producer to encode and send the message.  i want to remove camel from our build since, for all intents and purposes, we're just talking JMS to an endpoint, we shouldnt care who is on the other end of the queue, wether its came, mule-esb, drools, or whatever
23:43 whartung right
23:43 whartung why would you need an camel producer
23:43 sfisque but the guy who built it (left recently) wasnt very versed in jee, so he just put camel on both sides and punted
23:43 whartung yea
23:43 sfisque that's the very question i'm asking :P
23:44 sfisque i guess i'll have to download the camel source and see what the producer is doing under the hood.  /sigh
23:44 whartung s'alright, a client was having an issue using one of our client jars. We like to send client jars to interface with our web services and such, so they don't have to build them from WSDLs and what not if they use java.
23:44 whartung one was complaing about conflicts
23:44 whartung and they dragged me in.
23:45 whartung turns out, rather than sending out a nice neat jar with just the client artifacts, the knuckleheads send them "everything.
23:45 sfisque that's annoying.  i mean, the whole point of soap was that the client shouldnt care.  you consume the wsdl and run with it
23:45 whartung They send them then entire maven dependency tree.
23:45 sfisque O M G
23:45 * sfisque comforts whartung
23:45 whartung This jar has our WEB FRAMEWORK in it (!!!) O.O /o
23:46 whartung among other things...
23:46 sfisque moments like that tempt me to quit this industry and just go work in a book store
23:46 whartung I like book stores
23:46 sfisque me too.  we have "the" powells here.
23:46 sfisque it's immense
23:46 whartung may as well jump from one dying industry to another… :)
23:46 sfisque ROFL
23:46 * sfisque cries a little inside
23:47 whartung I think we have A Powells in Pasadena, I've not been there.
23:47 sfisque powells == the bomb
23:48 sfisque half of the top floor in the one here (takes up a whole city block) houses the "rare books room".. climate controlled, proper lighting, etc.  /swoon
23:48 whartung ooh
23:48 whartung My wife winces every time I bring home a book
23:48 whartung I have boxes of them -- in the garage
23:49 whartung we cleared out our storage locker recently
23:49 tjsnell I don't understand, why do you need the camel source?
23:49 whartung She's lile "oh, what in here…oh, more books…you take it"
23:49 sfisque lolz
23:50 whartung do any of you use a build facility that can actually build a single java file in your project in < 2m?
23:50 whartung I should say
23:50 whartung a single changed java file
23:51 whartung Because I think maven was invented by people paid by the hour...
23:51 sfisque ROFL
23:51 sfisque you can add arquillian to that list
23:51 sfisque lets turn a 4min build into 45min build with integration tests
23:52 whartung yea, this is without the tests.
23:52 tjsnell -skipTests=true
23:52 tjsnell weird
23:52 whartung I have to build the WAR, then the EAR, two separate tasks
23:52 tjsnell I can build camel with one file change in under 2m
23:52 whartung God help me if I build from the top level.
23:52 tjsnell skipping tests
23:52 whartung do you do work on camel?
23:52 tjsnell yah
23:53 tjsnell I'm a committer
23:53 sfisque ooohhh..
23:53 whartung oh cool
23:53 tjsnell sitting here at dinner pondering what new component I could write :)
23:53 sfisque is there a clean way to talk to camel via JMS without consuming camel classes on the client side?
23:53 sfisque i cannot find a tutorial or explanation of how online
23:53 tjsnell shouldn't matter on the client side
23:53 whartung "Why would anyone want to!?!" -- <3 tjsnell
23:53 tjsnell JMS sans camel right?
23:53 tjsnell on the client?
23:54 sfisque camel on the "far side"
23:54 tjsnell ahh
23:54 sfisque our current impl has camel on both sides
23:54 tjsnell shouldn't matter either way
23:54 sfisque i want to remove camel on "our side"
23:54 tjsnell stuff your data in the queue, camel or not shouldn't matter
23:54 tjsnell does your route do anything to the payload?
23:54 sfisque well the way it was done, how it's encoding is hidden.
23:54 sfisque it does ALOT
23:54 sfisque we send a templ with mapping
23:54 tjsnell Offline for a few, just finished dinner and heading back to the hotel
23:54 tjsnell brb
23:55 sfisque and camel does heavy lifting
23:55 sfisque kk
23:55 whartung ever do any JCA sfisque ?
23:55 sfisque yes
23:55 sfisque in fact, it's one of my bragging rights :P
23:55 whartung so, when you call the MDB, does the container manage the MDB pool for you?
23:56 whartung not quite sure how that works
23:56 sfisque never used mdb in my jca's
23:56 whartung ok, have you ever done any in bound JCA ?
23:56 sfisque yes, but not message driven
23:56 sfisque file consumption end point
23:56 whartung then what did they call?
23:56 sfisque straight calls into EE/JTA
23:57 whartung you can call a session bean?
23:57 whartung a remote EJB?
23:57 whartung most of the examples have it marshaled through an MDB to get "into" the container
23:57 sfisque you can do pretty much anything, you're "in the container".  since you're usually using XA, you can even do file i/o
23:57 sfisque but you HAVE to properly manage your JTA boundaries
23:58 whartung jca is so confusing :)
23:58 sfisque you won't get injection, but you can do JNDI lookup
23:58 sfisque in a way, the servlet layer is like JCA
23:58 sfisque you get connectivity to the EE layer but you're also "outside" as well as "inside"
23:59 whartung yea
23:59 sfisque the tough part is writing a proper driver to the spec, and managing the transaction boundaries
23:59 sfisque other than that, it's just like writing pojos with business logic

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

Please see http://irclog.greptilian.com/javaee for which days have been logged.