greptilian logo

IRC log for #javaee, 2014-02-11

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
00:03 AndroidLoverInSF joined ##javaee
00:09 Jhosepth Bueno, gracias de todas formas.
00:13 AndroidLoverInSF joined ##javaee
01:23 jeffl8n joined ##javaee
01:23 Jhosepth left ##javaee
02:15 javaeebot` joined ##javaee
02:35 cem_ joined ##javaee
03:00 sajjadg joined ##javaee
03:06 cem_ how to update specific component in field instead of @form
03:07 cem_ or panel
03:07 cem_ <p:ajax event="change" process="" update="panel"></p:ajax>
03:11 cem_ pdurbin:
03:11 cem_ anyone jsf
03:12 cem_ primefaces
03:18 cem_ there is no customization in jsf
03:21 cem_ how to update specific component in field instead of @form
03:46 sajjadg jaxb is generating output like this:  {"@index":2,"@text":"foo"} and I have problem using @ with in angularjs
03:46 sajjadg is there a way to remove them?
04:49 lexybabybaby joined ##javaee
04:55 SEx2 joined ##javaee
08:22 fabioportieri joined ##javaee
09:23 ramsrib joined ##javaee
09:37 weyer joined ##javaee
09:50 ramsrib joined ##javaee
10:59 weyer joined ##javaee
11:45 sajjadg joined ##javaee
11:48 fabioportieri guys i need help with ibatis over collections in in clause: http://pastebin.com/mte2n9rp
12:10 fabioportieri i guess i can't do it with one query only
12:19 sajjadg joined ##javaee
12:23 pdurbin fabioportieri: you're using this? http://en.wikipedia.org/wiki/IBATIS
12:23 fabioportieri pdurbin: yes
12:24 pdurbin why? ;)
12:24 fabioportieri the client uses it.. so i have to too
12:25 pdurbin is there a forum for it? a mailing list?
12:25 fabioportieri yes probably
12:25 fabioportieri tough the modern version is called mybatis
12:26 pdurbin yeah, that's what I gathered from http://ibatis.apache.org
12:26 fabioportieri but i'm thinking i can't do that, if iwant to use that construct i need to pass a collection/array/etc in the parameterClass
12:28 fabioportieri so, i should refactor the query and put it as a subquery to another select that accepts the collection as parameterclass
12:29 fabioportieri or,easier, move the in logic in the java code
12:30 sajjadg pdurbin: ...[why?] nice ;)
12:37 pdurbin sajjadg: maybe it's awesome. I don't know :)
12:39 sajjadg pdurbin: I liked how you said why. it was so nice and honest :-) I am very sensetive about choosing between available options. iBatis is not the best choice in most cases ;) but as they say: "no one gets fired for using apache softwares" ;)
12:41 pdurbin :)
12:43 fabioportieri i don't think mybatis is too bad
12:47 fabioportieri people revert from orm to plain sql aniway :p
12:50 sajjadg I relized that more than arguing about techs I should do some work. I used to spends lots of times comparing and benchmarking without doing anything good like a journalist!
12:52 sajjadg pdurbin: how are you? how are your angles? :-)
13:46 fabioportieri fuck me
14:22 acuzio no thanks
14:25 Naros joined ##javaee
14:25 Naros left ##javaee
14:34 * fabioportieri points a nipple to acuzio direction
14:35 sajjadg joined ##javaee
14:38 pdurbin sajjadg: my angularjs?
14:41 weyer joined ##javaee
14:56 sajjadg pdurbin: :-) no. I meant your daughters (angels) sorry typo
14:59 pdurbin sajjadg: oh, oh. stopped by the school this morning to register the little one for kindergarten
15:15 fabioportieri joined ##javaee
15:53 sajjadg pdurbin: I taught you said they both to school! how fortunate/happy you are to have two little girl. I wish I could marry sooner and have children. God bless them. :-)
16:03 pdurbin thanks :)
16:05 neuro_sys joined ##javaee
16:05 neuro_sys joined ##javaee
16:09 huhlig joined ##javaee
16:09 weyer joined ##javaee
16:25 cem1 joined ##javaee
16:33 sajjadg joined ##javaee
17:10 rwb joined ##javaee
17:58 kobain joined ##javaee
18:00 AndroidLoverInSF joined ##javaee
18:33 sfisque joined ##javaee
18:46 AndroidLoverInSF joined ##javaee
18:57 huhlig joined ##javaee
19:21 Voyage joined ##javaee
19:21 Voyage hello
19:22 Voyage Is this channel live?
19:24 whartung more lively some times than others
19:25 Voyage Question: if I only need 1 connection with many threads accesing it. I dont need a pool but I do need a datasourse management?
19:25 sfisque no, we're all dead here
19:25 sfisque depends.  are you the client or the server?
19:25 Voyage JDBC, posgtres
19:25 Voyage s/posgtres/postgres
19:26 sfisque you want a pool
19:26 Voyage for one con?
19:26 sfisque what type of app is using this connection?
19:26 Voyage normal app
19:26 Voyage nothing special
19:26 Voyage 5 threads
19:26 Voyage one connection
19:27 Voyage just dont want each thread/ query to create new connections each time
19:27 Voyage need to keep 1 connection open all the time
19:27 sfisque oh.  yah then one conn be fine i guess
19:27 Voyage theres a catch
19:28 Voyage ojacobson> Thing is, even if Connection, ResultSet, Statement, and so on are all internally thread-safe -- that is, if concurrent calls from multiple threads never corrupts its data structures or causes it to emit broken messages to the underlying dbms -- you still can't use one connection to run two queries at the same time . ojacobson> use a DataSource (which is usefully thread safe, being a factory for connections) instead, and have each task obtain it
19:28 Voyage s own connection from the datasource
19:29 Voyage so what do I need to make many threads share 1 connection object?
19:30 sfisque i guess the question is, what is the point of multi-threading if you only have one connection.  you're still syncronizing all the work because you can only perform one operation at a time against the db
19:31 sfisque either go full MT with a conn per thread, or get rid of the threads and just use the one connection sequentially
19:33 sfisque or use a worker thread and build a queue of "operations" that callback when they are completed.  then you're threads can just "submit work" and "respond when their work nugget completes"
19:33 Bombe Voyage, which part of “you can not process multiple requests at the same time with a single connection” have you not understood in the last two hours?
19:33 pdurbin last two hours?
19:34 Bombe Yes, he’s been in ##java with the same issue, too.
19:34 Bombe Which is where ojacobson’s quote from above is from.
19:34 pdurbin oh
19:37 Voyage Bombe,  is correct
19:38 Voyage Bombe,  so you mean , in short and in optimistic way, that the number of threads should be equal to the number of connections?
19:39 Bombe Voyage, that has about nothing to do with one another. Use a connection pool, get a connection from it whenever you need something from the database, problem solved.
19:40 Voyage Bombe,  that is understood but the question remains
19:40 Voyage Bombe,  as   “you can not process multiple requests at the same time with a single connection” , then there must be threads == no. of cons
19:41 Voyage Bombe,  if I have 10 threads, but 5 connections.  only 5 threads can issue requests at a single time. correct ?
19:42 * Voyage provides that the concept / app to be discussed here is totally dbmc and thread dependant
19:44 Bombe Obviously.
19:44 Voyage :)
19:45 Bombe The connection pool can however block until a connection is free.
19:45 Bombe So, again, use a connection pool, problem solved.
19:46 Voyage my concluded optimization == #threads == #connections == #of cpu cores
19:49 Voyage Second question:  If I just use the same Connection for each thread at a same time, there will be  an automatic queue of requests behind the current request processed by the connection object for some thread?
19:50 Voyage that one is only for understanding and not practical motives^
19:51 Voyage sfisque, ?
20:01 sfisque no, you'd have to build that queue yourself.
20:01 sfisque but there's no need for a queue if every thread has it's own connection (whether pooled or not)
20:02 sfisque since each thread is "internally synchronous", every operation is atomic and synchronized within the context of the thread
20:44 AndroidLoverInSF joined ##javaee
20:51 Voyage sfisque,  hm
20:52 Voyage using 1 con for all threads. just for sake of understanding (I know iam not doing the right way but for learning) http://pastebin.ca/2638731
20:53 Voyage whats the exception about?
20:55 Voyage private static Connection connection = getConnection(); was done
20:55 Voyage at start
21:09 AndroidLoverInSF joined ##javaee
21:43 AndroidLoverInSF joined ##javaee
22:29 Voyage looks like my app is runing but dont go more than 2 cons     http://pastie.org/8723891     logs at bottom
23:13 tjsnell joined ##javaee
23:37 huhlig joined ##javaee
23:47 AndroidLoverInSF joined ##javaee
23:49 AndroidLoverInSF joined ##javaee

| 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.