greptilian logo

IRC log for #javaee, 2014-01-17

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:02 pdurbin sfisque: so you're pretty happy with JPA
00:03 sfisque my only complaint is that it is tough to use when doing fairly "exotic" joins.  but otherwise, it's pretty good
00:03 sfisque it definitely solves the "dynamic query" problem in a fairly painless api
00:04 sfisque makes building query wizards less problematic than in the past ..  String.concat() and StringBuilder.append() are not nice to use for SQL
00:05 whartung yen, I use ELs ExpressionBuilder for that.
00:05 whartung I haven't converted over to Critera, as we're still not on JPA 2
00:05 whartung even then, not sure if it's worthy the effort
00:05 sfisque i find pre-2 jpa unusable now taht i've drank the koolaid
00:06 sfisque it's like hand rolling servlets compared to using a web framework
00:07 whartung we use the latest EL, but not JPA 2
00:12 pdurbin we started looking a bit at mongodb but... I'm pretty sure we're gonna stick with JPA and postgresql
00:12 sfisque pdurbin didnt you tell me that your org uses neo4j
00:13 pdurbin yeah, more as a library though... for analysis of graphml files
00:13 sfisque gotcha
00:14 pdurbin we were looking at mongo because we want to be flexible in the types of data we accept and process
00:14 pdurbin i.e support a few fields such as social science, astronomy, and biomed but be ready to support other fields in the future
00:15 pdurbin every field has its own set of metadata it cares about when in comes to publishing data
00:15 sfisque aye
00:15 pdurbin everyone will give their data a title of some sort. author. etc.
00:16 pdurbin but there's a lot of variation
00:16 pdurbin and do we want to have to cut a release every time we want to support other field? neuroscience or what have you...  not really
00:17 pdurbin so maybe a plugin architecture of some sort
00:17 pdurbin but on JPA and postgres, I guess
00:24 whartung well, remember this tenet -- database schema are designed around the questions to be asked of them, not the data to be stored.
00:24 sfisque yup
00:25 sfisque if you're just interested in purely data store/retrieve, there are simpler mechs to use.  rdbms are for asking questions
00:25 whartung yup
00:25 whartung you can always convert it later, depending on your volume
00:29 semiosis imo, unless your dataset is extremely large, use an RDBMS -- they're the most well understood
00:30 sfisque i guess the point though, is if you're not asking questions and just round tripping data, there are better mechs (flat files, nosql, object stream, etc.) for doing that
00:30 whartung or clobs/blob in the db
00:31 whartung those are at least transactional
00:31 sfisque i guess, but rdbms' dont have a monopoly on TXs.  any decent persistence mech will have some form of acid
00:32 whartung but then why manage two servers, two installs, two mechanisms of backup, blah blah blah blah
00:33 whartung reach for rdbms until it proves itself unworthy, rather than you think it's unworthy :)
00:33 * semiosis mixes mysql with glusterfs :O
00:34 semiosis ...in java
00:34 semiosis rdbms not the best thing to serve photos & videos to the web
00:34 pdurbin well, sure
00:35 sfisque thank you semiosis.  my point precisely.  why wait for production to fail when you can avoid that by thinking through the problem appropriately
00:35 whartung but they're not absolutely dreadful. All the major DBs will stream blobs if you ask them nicely.
00:35 sfisque of course they will.. but will it scale accordingly
00:36 * whartung has streamed videos from a DB
00:36 semiosis like i said, not the best
00:36 whartung but that doesn't mean it's unusable.
00:36 whartung is my point
00:36 pdurbin speaking of acid, has anyone worked with http://en.wikipedia.org/wiki/H-Store or http://en.wikipedia.org/wiki/VoltDB ? (or http://en.wikipedia.org/wiki/NuoDB I guess.) I heard about them at http://www.se-radio.net/episode-199-michael-stonebraker/
00:37 sfisque i mean, you could run an ecommerce site using berkelydb in the back end… if you really wanted… but would you make that decision "because it can" or woudl you consider the ramifications and use a more "appropriate" tool
00:37 pdurbin "The significance of the H-Store is that it is the first implementation of a new class of parallel database management systems, called NewSQL, that provide the high-throughput and high-availability of NoSQL systems, but without giving up the transactional guarantees of a traditional DBMS."
00:37 whartung alleyways give Stonebrakers stuff 10 years to settle down :)
00:38 pdurbin whartung: that interview with him is really good
00:38 semiosis pdurbin: sounds a little like http://en.wikipedia.org/wiki/MySQL_Cluster
00:38 whartung the primary thing that make bdb an issue, imho, is lack of a query language. But, other than that, BDB is fine. It has locks, it has btrees, it caches pages, blah blah blah.
00:39 pdurbin semiosis: hmm, well both seem to be "shared nothing"
00:39 semiosis and in-memory
00:39 pdurbin yeah
00:39 semiosis row-oriented
00:39 semiosis auto-sharding
00:40 whartung I have a catalog app that stores all of its images in a DB, but I cache them to the disk for serving them to the web…I think.
00:40 semiosis many similarities
00:40 whartung isn't all of his stuff currently memory based?
00:40 whartung Postgres started as Stonebrakers work.
00:40 pdurbin whartung: good point about the questions to be asked. and some of those questions we'll ask of solr, not necessarily the database itself
00:41 whartung the primary benefit of solr is the index features of lucene underneath it.
00:41 * whartung has written inverted indexes in SQL before...
00:41 pdurbin yep. sure
00:42 whartung how much data are you storing pdurbin ?
00:42 pdurbin I find solr much more hackable than lucene... easy to hit a web api to figure our what it can do
00:42 whartung yea, it's easier to integrate with in a SOA sort of way
00:42 * whartung has integrated lucene with a RDBMS also :D
00:43 whartung it wasn't transactional, but thems the breaks.
00:43 pdurbin whartung: in the database? buh. 5GB? I forget what prod has
00:43 whartung more?
00:43 whartung 6GB? 600 GB?
00:44 whartung if the database isn't bigger than the ram on a netbook, then look, I mean, really, who cares what you use lol
00:44 pdurbin let's say between 5 and 20 GB. not sure
00:44 sfisque because you can lock up a db with 100k TXs per minute, even if the
00:44 sfisque the TX is only a few bytes each
00:44 whartung what's your load pdurbin ?
00:44 whartung how many users?
00:45 pdurbin let's say thousands of users. not sure how to quantify load for ya
00:45 whartung how many of them on line at any one time? TPS
00:46 pdurbin you know... we have new relic... maybe that would tell me
00:46 whartung 1000's of idle users don't count for much :)
00:46 pdurbin :)
00:46 whartung the biggest traffic hit of most systems today is basically the access log.
00:47 pdurbin is it useful to think of the shape of your data? or is the answer always "square.... put it in a relational database" ;)
00:47 whartung relations databases data is shape as trees and graphs
00:47 whartung …with square nodes
00:49 * whartung ran a web site late 90's a http://en.wikipedia.org/wiki/SPARCstation_2 -- we had 10's of thousands of users registered on that site.
00:49 whartung *on a
00:49 whartung JSPs, servlets, and Oracle…pre-WARs
00:49 whartung running on JRun(!!)
00:52 whartung how much of your data is active on any day?
00:53 pdurbin whartung: I should just give you the new relic login ;)
00:53 whartung I don't know what that is
00:53 pdurbin javaeebot`: lucky new relic
00:53 javaeebot` pdurbin: http://newrelic.com/
00:53 whartung ah k
00:54 pdurbin it's pretty cool. it can tell you how many joins happen for a given http request
00:54 whartung wow -- adobe finally killed JRun only last year!
00:56 pdurbin a terrible loss?
00:57 whartung nah
00:57 whartung tomcat was just getting out the gate back then
00:57 whartung we actually started with Netscapes server, but it would randomly lock up
00:57 whartung so we got JRun instead. It was cheap enough, and the software moved right over \o/ standards!
01:07 pdurbin back when I ran netscape servers (mail and ldap) I didn't quite get what an "app" server was :)
01:07 sfisque TC didnt appear until after 2000.  back in 99 the only option was either the sun server or jserv plugin for apache (which was a P I T A to configure)
01:11 whartung 3.0 was in 1999, accordiing to Mr. Pedia
01:13 sfisque i could very well have been, but i do not recall the actual day that it was made available to the outside world.  it was basically sun turning over code to the ASF.  eventually it came out as tomcat to the rest of the world.  but before it was available, there wasnt much available for servlets other than jserv, sun server, and i think weblogic (back when it was called tenga server)
01:13 whartung yea
01:13 whartung well, we had netscape and jrun.
01:15 whartung and I know we were toying with tomcat of somekind
01:46 sfisque aye.  i always forget that netscape had their own server product.
01:49 pdurbin they were doing js on the server before it was cool: http://en.wikipedia.org/wiki/JavaScript#Server-side_JavaScript
01:51 sfisque yah, i vaguely remember SSI javascripting
02:12 tommmied joined ##javaee
04:46 kotten In JSF is there anyway to set value on one of the clients bean from within another bean?
04:55 sfisque inject the bean and call a setter
04:55 sfisque @Inject BeanType bean;        bean.setXXX( xxx );
05:05 cutepro joined ##javaee
05:05 cutepro hi
05:10 cutepro http://pastie.org/8638713#34,49,138  lines 35,50  and 144. http://i43.tinypic.com/4tld3o.png . I am getting 404 for response.sendRedirect("jsp​/emailconfirmation.jsp"); now . any clue why?
05:13 sfisque maybe change the path to "/jsp/emailconfirmation.jsp" ?
05:29 kotten sfisque , I constructed a reference to the calling bean dont know if this will work..
05:29 kotten @ManagedProperty(value="#{MessageBean}")
05:29 kotten private MessageBean messagebean;
05:29 kotten then i call this ones function to get what i want.. I suspect it wont work as it is viewscoped
05:44 sfisque i can't see why not.  the only issue i would see is if the bean is request scoped, setting the var and watching it disappear when the page transition happens
05:44 sfisque you "could" move the var into a session scoped bean and then inject the session scoped bean into both beans
05:44 sfisque that way it wont be effermeral
05:45 sfisque ***ephemeral
07:34 neuro_sys joined ##javaee
08:08 fabioportieri joined ##javaee
08:09 fabioportieri o/
08:16 neuro_sys \o
08:18 fabioportieri \o/ <- friday super happy mode
08:48 weyer joined ##javaee
08:48 firebird1 joined ##javaee
08:48 firebird1 hi
08:48 firebird1 Exception in thread "http-bio-8080-exec-9" java.lang.OutOfMemoryError: PermGen space
08:48 firebird1 ?
08:50 fabioportieri firebird1: it happens to me too sometimes with jsf mojarra and tomcat6
08:50 fabioportieri not sure the thread is the same, the error is tho
08:52 weyer joined ##javaee
08:53 firebird1 how to fix and what is this error ?
09:10 fabioportieri i fix by restarting the server, if it doesn't work you may want to augment memory space in the jvm
09:21 sajjadg joined ##javaee
09:52 weyer joined ##javaee
09:59 fabioportieri joined ##javaee
10:06 weyer joined ##javaee
10:09 firebird1 how to support japanese langiag
10:49 SEx2 joined ##javaee
11:34 firebird1 java is far touch then C :/
11:35 firebird1 magic<---ask
11:35 firebird1 magic--->give
11:36 fabioportieri uh?
11:37 firebird1 ?
11:46 neuro_sys wut?
12:15 cutepro hi
12:15 cutepro Whats the advantage of spring core? the core only
12:16 fabioportieri dependency managmentDI
12:17 cutepro ok, we have one. any other?
12:18 fabioportieri EL, context
12:18 cutepro spring expression language?
12:18 cutepro whats context here?
12:19 fabioportieri yes
12:19 fabioportieri the way spring access objects
12:20 fabioportieri aniway i'm not spring expert
12:20 firebird1 how to display status in primefaces datatable , status means row no
12:20 fabioportieri firebird1: look at varStatus attr
12:20 weyer joined ##javaee
12:21 firebird1 fabioportieri, i looked at the doc cant find varstatus
12:23 fabioportieri mm maybe in primefaces is not called that way
12:23 fabioportieri firebird1: should be called "var" if i'm not mistaken
12:24 firebird1 got it
12:24 firebird1 its not var
12:24 fabioportieri what was it?
12:24 firebird1 its not like loop it has its rowindex
12:25 fabioportieri woo primefaces exploding popup is nice
12:26 fabioportieri rowIndexVar should do it firebird1
12:26 firebird1 s
12:45 cutepro fabioportieri what is the advantage of DI in the first place
12:47 fabioportieri it follows single responsability principle
12:47 fabioportieri and even the open closed principle
12:48 fabioportieri permits a cleaner implementation of oop in general
12:48 cutepro what advantage does single responsibilty principle gives us?  + this can be atained without spring
12:48 fabioportieri yeah but you'll have to code your own stuff
12:48 cutepro ok
12:49 fabioportieri with spring you already have a framework
12:49 fabioportieri google SOLID
12:49 cutepro ok what advantage does single responsibilty principle gives us?
12:49 fabioportieri http://en.wikipedia.org/wiki/SOLID_%28object-oriented_design%29
12:50 fabioportieri cutepro: you have classes that have only one responsability -> easier to maintain
12:50 cutepro one responsibility? can you elaborate?
12:51 fabioportieri sure
12:51 fabioportieri http://en.wikipedia.org/wiki/Single_responsibility_principle
12:51 fabioportieri :)
12:52 cutepro k
12:53 cutepro ok. can you tell one place . by code or other, by which it facilitates?
12:55 fabioportieri sorry?
12:56 weyer joined ##javaee
12:57 cutepro np/
12:57 cutepro thanks !
12:58 fabioportieri DI enforces SRP cause your class will not have to act as a factory for its dependencies (other objects the class uses and instantiate)
13:00 cutepro ok
13:00 cutepro Parent o = new Child();   o.childMethod(); valid ? childMehtod() == a method in child class
13:03 fabioportieri uhh.. i think you need a cast if you do that, not sure now
13:03 cutepro ok
13:03 fabioportieri try it
13:17 firebird1 why we use datainputstream ?
13:52 tommmied joined ##javaee
14:24 weyer joined ##javaee
14:35 fabioportieri joined ##javaee
14:39 sheenobu joined ##javaee
14:42 Naros joined ##javaee
14:50 sajjadg joined ##javaee
15:32 weyer joined ##javaee
16:01 weyer joined ##javaee
16:19 Naros left ##javaee
16:33 syncsys joined ##javaee
17:14 kobain joined ##javaee
17:17 fabioportieri byee
17:19 neuro_sys joined ##javaee
17:41 sajjadg joined ##javaee
17:56 janpenuel joined ##javaee
18:26 sess joined ##javaee
20:57 syncsys in jpa , I think catch (PersistenceContextType    cant be catched?
20:59 sfisque any exception can be caught
21:02 kobain joined ##javaee
21:02 syncsys how to catch it? IDE says: incompatible types. Required: java.lang.Throwable Found: javax.persistence.PersistenceContextTyp
21:03 syncsys and do I need     @PersistenceContext(type = PersistenceContextType.TRANSACTIONAL  ON  private EntityManager entityManager;
21:05 sfisque does PersistenceContextType extend Exception?  i'm thinking it does not
21:06 sfisque if it's not some implementation of Throwable (aka exception) then you can't catch it
21:07 syncsys sfisque,  last line. http://docs.oracle.com/javaee/6/api/javax/persistence/EntityManager.html#merge%28T%29
21:08 syncsys http://docs.oracle.com/javaee/6/api/javax/persistence/PersistenceContextType.html
21:08 sfisque you need to catch TransactionRequiredException
21:08 sfisque not the type of the EM
21:08 neuro_sys joined ##javaee
21:08 neuro_sys joined ##javaee
21:08 sfisque as well as IllegalArgumentException
21:08 syncsys http://pastie.org/8643525
21:09 sfisque yah that third catch is garbage, delete it
21:09 syncsys why so?
21:09 syncsys why its mentioned in last line. http://docs.oracle.com/javaee/6/api/javax/persistence/EntityManager.html#merge%28T%29
21:11 syncsys sfisque,  now it says avax.transaction.TransactionRequiredException' is never thrown in the corresponding try block
21:12 syncsys http://pastie.org/8643538
21:44 syncsys sfisque,  sorry, disconnected
23:07 syncsys joined ##javaee
23:14 neuro_sy1 joined ##javaee
23:22 sfisque syncsys basically waht i said was the third catch is nonsense.  you only need the first two and if you're doing java7 you can do 1 combined catch
23:43 Naros 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.