greptilian logo

IRC log for #javaee, 2013-11-04

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:00 SLovenberg joined ##javaee
00:03 kobain_ joined ##javaee
00:44 SLovenberg joined ##javaee
00:54 cem_ there are lot of games which awesome but still angry bird,minecraft got to top how ?
00:59 cem_ ???
01:01 SoniEx2 cem_: make a lwjgl game
01:01 SoniEx2 give it mods
01:02 SoniEx2 then get a youtuber to play it
01:05 pdurbin SoniEx2: what do you like about lwjgl?
01:05 SoniEx2 pdurbin: minecraft :3
01:05 pdurbin :)
01:06 SoniEx2 also Slick2D
01:09 cem_ SoniEx2: how many stories have you created ?
01:09 SLovenberg joined ##javaee
01:10 SoniEx2 cem_: http://slick.ninjacave.com/
01:11 SoniEx2 also it's not an abstraction... not quite at least...
01:20 cem_ these days a 12 years kid makes java app and have quite success in it :P
01:21 SoniEx2 writing java is easy
01:21 SoniEx2 C is a pain :/
01:21 SoniEx2 D is normal
01:22 SoniEx2 (so basically difficulty: ASM = hardcore, C = hard, D = normal, Java = easy, Lua? = easiest)
01:23 cem_ one of my friend use work in asm said it was easy until i showed him C :)
01:23 cem_ later he never went to asm at all
01:23 SoniEx2 :P
01:24 SoniEx2 you can do ASM in D...
04:15 Quest joined ##javaee
04:48 sfisque joined ##javaee
05:39 dangertools joined ##javaee
05:39 dangertools joined ##javaee
07:41 AlexCzar joined ##javaee
07:56 tangatools joined ##javaee
07:56 tangatools joined ##javaee
08:02 SLovenberg joined ##javaee
08:35 sess ASM isnt hardcore, it's stupid :V
08:40 pleroma joined ##javaee
10:26 sajjadg joined ##javaee
10:26 sajjadg I'm confused with grizzly and jersey! what's the relation between jersey+grizzly+tomcat ?
11:00 balazare joined ##javaee
11:08 pdurbin sajjadg: I assume you know what tomcat is. it's a servlet container
11:08 pdurbin javaeebot: lucky jersey java
11:08 sajjadg right
11:08 javaeebot pdurbin: http://jersey.java.net/
11:08 pdurbin "RESTful Web Services in Java."
11:08 pdurbin javaeebot: lucky grizzly java
11:08 javaeebot pdurbin: http://grizzly.java.net/
11:09 pdurbin "NIO Event Development Simplified"
11:11 balo lucky I am. Yoda, my name is.
11:11 balo javaeebot: lucky I am. Yoda, my name is.
11:11 javaeebot balo: http://www.yodaspeak.co.uk/
11:11 balo :DDDDD
11:11 balo awesome
11:13 acuzio joined ##javaee
11:46 pdurbin I guess grizzly is a supported jersey container: https://jersey.java.net/documentation/latest/modules-and-dependencies.html
11:48 MegaMatt joined ##javaee
12:19 acuzio yes
12:35 pdurbin so many containers in java ee
12:35 sajjadg :)
12:36 sajjadg use tomcat
12:36 sajjadg if you need an AS then use galssfish or Jboss...
12:38 AlexCzar sajjadg, not Glassfish, if you don't use it (and are happy with it) already
12:38 pdurbin or TomEE
12:39 pdurbin AlexCzar: not glassfish?
12:39 sajjadg hey AlexCzar :) I prefer JBoss but redhat applying sanction against us (Iran) and I have hard time getting it. Oracle apply the sanction too but I can get glassfish hardly.
12:39 AlexCzar pdurbin, when you have a problem with glassfish it's reasonably harder to get help from the community compared to Jboss, for example
12:40 sajjadg then for Containers go with Tomcat and for AS go with JBoss
12:40 pdurbin AlexCzar: well, let's see if anyone replies to my https://java.net/projects/glassfish/lists/dev/archive/2013-11/message/0
12:42 AlexCzar pdurbin, you see, your message is already 3 days old and goes without reply, I can't remember similar situation with any of the Jboss problems I had at the time I was using it
12:42 AlexCzar I'm talking 4 years in the past
12:43 sajjadg AlexCzar, then we had a winner here :)
12:43 sajjadg AlexCzar, what about containter?
12:44 sajjadg AlexCzar, do you use JBoss with Spring!?
12:44 AlexCzar sajjadg, no :)
12:44 acuzio sajjadg: FWIW - a few of the main JBoss guys hang out in ##java and are very helpful -
12:44 AlexCzar sajjadg, for the past 4-5 years I've been working with Spring and using tomcat
12:45 AlexCzar it's just until then I worked in a company which had several JEE apps running on pre-historic version of JBoss
12:47 AlexCzar I migrated a couple of them to Spring and Tomcat, then I quit and started working in a startup where I made all technology decisions, clearly my choice of the time was Spring/Tomcat
12:47 AlexCzar I'm still most comfortable with this combination, although the company I'm working for now needs wider technology spread than this
12:50 sajjadg AlexCzar, what do you mean by wider techs?
12:52 AlexCzar sajjadg, custom servers, nio stuff, thrift, etc.
12:53 sajjadg AlexCzar, and Spring/Tomcat don't suite you there?
12:53 AlexCzar sajjadg, Spring does sometimes, but Tomcat being a Servlet container just is not suited for some tasks
13:05 jypie joined ##javaee
13:08 sess joined ##javaee
13:22 jypie hi all
13:23 pdurbin jypie: hello
13:24 jypie :) what are you up to?
13:24 pdurbin putting a valid cert on glassfish
13:24 jypie oh :)
13:26 pdurbin we have a wildcard cert we use for Apache. I'm trying to re-use it
14:10 SExJ joined ##javaee
14:12 Guest74379 joined ##javaee
14:23 acuzio wild-card cert  ., heh
14:47 kobain joined ##javaee
14:58 pdurbin acuzio: yeah, it's not working. "ProtocolChain exception"
14:58 pdurbin this seems helpful: http://i-cat.blogspot.com/2009/02/glassfish-and-intermediate-ssl.html
14:58 pdurbin but I think I'm going to just get an individual cert
15:32 AlexCzar joined ##javaee
15:35 tommmied joined ##javaee
15:37 sajjadg Tomcat (Servlet container) vs. Grizzly (NIO framework) For RESTful applications?
15:39 sfisque javaeebot lucky grizzly java
15:39 javaeebot sfisque: http://grizzly.java.net/
15:42 sfisque i'm guessing with grizzly, you're basically writing your own container, vs getting a container for free with tomcaty
15:42 sfisque they give you the tools, you "put it all together"
15:42 sfisque i know glassfish makes use of grizzly.  i see that package often in stack traces
15:43 sfisque so, arguably, if you used a modern EE container, you'd be using grizzly, anyway
15:53 sajjadg sfisque, Glassfish uses grizzly, but JBoss uses netty. but about tomcat and jetty? what do they use!? non?
15:54 sajjadg grizzly and netty are NIO implementation. I think tomcat implements NIO itself!
15:56 Naros joined ##javaee
16:07 SoniEx2 how do I use ASM?
16:10 SoniEx2 I mean this ASM: http://asm.ow2.org/
16:12 cem_ joined ##javaee
16:13 cem_ osan
16:13 cem_ Konbawa
16:33 cem_ java.util.zip.ZipException: invalid entry crc-32
16:36 sfisque i've seen that before.  from what i recall, it can be when an archive is compressed with an algorithm that java does not grok
16:40 fabio__456 joined ##javaee
16:50 Naros sfisque: remember the other day you mentioned it gets tricky when you want to Join & Fetch a collection?
16:52 Naros For hibernate as the provider, it seems ok to cast the Fetch<> to a Join<> and use them interchangably, but not sure if that is the correct approach.
16:52 Naros Otherwise, it appears if you create a Join<> and Fetch<>, it creates two references in the generated SQL to that particular entity.
17:00 cem_ how to zip ?
17:01 SExJ joined ##javaee
17:03 SExJ joined ##javaee
17:07 SExJ joined ##javaee
17:09 MegaMatt cem_: http://stackoverflow.com/questions/1206970/creating-zip-using-zip-utility
17:10 cem_ oh! i visited that thread already
17:14 SExJ joined ##javaee
17:24 SExJ joined ##javaee
17:26 SExJ joined ##javaee
17:32 SoniEx2 could someone help me with a forth VM in ASM?
17:37 SoniEx2 (basically ASM is what I'm gonna use to compile words... it'll help avoid possible stack overflows... not entirely sure how to handle recursive/loop words, tho...)
17:38 SoniEx2 (well, at least forth doesn't have returns, so it's a lot easier...)
17:38 SExJ joined ##javaee
17:49 SoniEx2 oh well :/ I tried...
18:00 SoniEx2 sfisque: could you help me?
18:13 pdurbin "Certificate chain length: 4" \o/
18:13 pdurbin but does it work?
18:21 sfisque exactly naros.  hibernate has a slightly different inheritence graph.  under JPA you cannot cast one to the other.  under hibernate, you can
18:21 Naros how would you do it non-hibernate?
18:22 sfisque you have to do both, and swallow the double joins, OR craft the "troublesome" part of the query as a "view" and model the view as a readonly entity and use that entity for joins
18:23 Naros I see.
18:24 Naros One last question.
18:24 Naros One query fetches parent, a filtered Set<> of children and a filtered Set<> of grand-children.
18:24 Naros One query needs to fetch the first grand-child non-filtered.
18:24 Naros Is there anyway to model this without doing 2 unique queries?
18:26 sfisque so you want    X -> childOfX[ 0 ]-> grandChildOfX[ 0 ]?  or do you want X->entireSetOfChildren -> grandChildOfX[ 0 ]
18:26 Naros The first.
18:26 Naros Work Order -> Operation -> Service
18:26 Naros I need a specific operation and a specific filtered set of services (active vs all)
18:27 pdurbin it works!!
18:27 Naros But in the case of active may mean no services get returned, i need to get the top 1 of services to fetch some denormalized attributes :P
18:27 Naros We used to fetch all services in the hibernate criteria way and let the view filter.
18:27 Naros But trying to push that off to the database for cases where large number of service grand-child could exist but be deactivated
18:28 * Naros shakes his fist at SAP BI giving me flat denormalized structures.
18:28 sfisque you might want to craft a view for this and model it.
18:29 Naros Hm.
18:29 sfisque that way the view can do whatever native sql optimizations you can throw at it, and the model only cares about the returned data
18:29 sfisque we have a view like that here that does a recursive join, which is impossible in jpa
18:30 sfisque the one thing to keep in mind, only do this if the resultset is a top level object.  if you start doing jpa joins against the model of the view, it can play havoc with the rdbms's explain planner
18:30 sfisque we have some pathological queries like that which drive oracle bonkers
18:31 sfisque people started consuming some of the views as "join linkages" and all havoc ensued
18:32 * sfisque looks for a 2x4 to start LARTing his co-workers
18:32 pdurbin combining http://stackoverflow.com/questions/906402/importing-an-existing-x509-certificate-and-private-key-in-java-keystore-to-use-i/8224863#8224863 and http://i-cat.blogspot.com/2009/02/glassfish-and-intermediate-ssl.html was the solution
18:32 Naros hehe, believe me know that all too well.  We used to have this table in oracle long time ago called XSR_USER_ACCESS_V which joined a plethora of oracle-apps tables to give us some role authorizations.  We then in turn used that view in a number of places, even against oracle's own views and zomgz.
18:32 Naros And that was before JPA, hehe pure JDBC :/
18:33 sfisque >.<
18:33 Naros hehe, yah
18:33 Naros in cases where it was hitting say po_lines_all view, it was sslllooooowwwwww
18:35 sfisque yah.  we have one that consumed a bunch of tables and another view (flattens a recursive relationship) and then joined against it.  i think oracle's explain planner finally settled on something that was like O( n^9 ), which of course scaled very well!
18:37 Naros lol
18:37 Naros one more quick question.
18:37 Naros lets say I have a CPK with 5 fields
18:38 Naros of which I want to query against 4 of the 5 CPK values
18:38 Naros field0 through field3
18:38 Naros typical just to list those as individual predicates to the 4 fields in the CPK metamodel?
18:38 sfisque yah
18:38 Naros ugh, starting to hate CPKs
18:39 Naros insane verbosity
18:39 Naros would prefer like a new Id(field0, field1, field2, field3), findbyExample(id)
18:39 sfisque does jpa support QBE?  i know hibernate has (or had) it at one point
18:40 sfisque and it's the core of mybatis
18:41 Naros not entirely sure, i haven't gotten that far into JPA
18:41 sfisque man i hate job searching.  the down side of being a contractor
18:41 Naros im still a jpa2 noob
18:41 sfisque i know a fair amount, but i havent really touched QBE other than reading about it
18:41 sfisque javaeebot lucky query by example jpa support
18:41 javaeebot sfisque: http://docs.spring.io/spring-integration/reference/html/jpa.html
18:42 sfisque javaeebot lucky query by example jpa support -spring
18:42 javaeebot sfisque: http://www.playframework.com/documentation/1.0.1/jpa
18:44 sfisque looks like it was slated for consideration in jpa2, but dropped:   from SO :: m sorry to say that we didn't actually get to do QBE in JPA 2.0. Criteria API does not have any special operators for it so entity equality is just like in JP QL, based on PK value. Sorry, but hopefully we'll be more successful on that front in the next go-round. For now it is one of those vendor features that every vendor supports, but is not in the s
18:45 sfisque so you can grab the native peer behind the jpa facade, and do it if need be and supported by the impl/peer
18:45 sfisque http://stackoverflow.com/questions/2880209/jpa-findbyexample
18:46 Naros gotcha.
18:46 Naros or just do it the verbose way and be spec compliant :P
18:46 Naros without vendor-specifics
18:47 sfisque right
18:54 whartung I so miss QBE from back in the old Informix 4GL days -- it was so great
18:55 sfisque write a dsl that calls into JPA?
18:55 whartung nah, QBE was a form mode in I4GL. You were presented a form, you filled it in, and it generated a SQL filter that you could use.
18:55 whartung it was elegant and simple
18:56 whartung and handled things like >123 or 123:456 or ABC|DEF
18:58 whartung it was a simpler time, when app developers were actually productive...
18:59 sfisque ROFL
19:18 kobain joined ##javaee
19:20 Quest when hibernate pulls objects from database, it doesnt pulls them according to id , ascending order?
19:22 sfisque it pulls them however the db returns them.  if you don't supply an ordering, order is "indeterminate"
19:22 Quest how can i supply the order ascending/descending
19:22 Quest without passing a query^
19:22 sfisque Collections.sort()
19:22 sfisque and supply your comparator
19:22 Quest hm
19:24 Quest sfisque,  i would implement interface Comaparable and do the compare() ?  or jus tcollection.sort()?
19:25 sfisque both.  if you dont pass in a comparator, you're going to get the native Object.hashCode() ordering
19:26 Quest both?
19:26 sfisque or whatever default compareTo() is defined in the hierarchy
19:26 Quest hm
19:26 sfisque collections.sort() has two versions.  one takes a comparator, one uses the objects native comparison
19:27 Quest whats a  objects native comparison
19:27 Quest Object.hashCode() ordering ^ ?
19:27 sfisque depends.  some objects implement comparable, some dont
19:27 Quest mine dont
19:27 sfisque for those that don't, hashCode() is the default ordering
19:28 Quest I never knew what hashCode() is. would read it
19:28 sfisque so you would implement Comparator, and pass that to Collections.sort with your Collection<?>
19:28 sfisque it's the "unique-ish" key for an object so the jvm can track them uniquely for things like GC, proxying, etc.
19:28 sfisque it
19:29 sfisque it's part of the "equals()" contract
19:31 pdurbin I just wrote a little howto: http://wiki.greptilian.com/java/glassfish/howto/reuse-a-wildcard-ssl-cert-from-apache/
19:32 Quest hm
19:34 Quest sfisque,  thanks
19:35 sfisque nifty
19:35 Quest sfisque,  hascode is the  memory addresss type of thing or just a unique code for a unique object
19:37 sfisque can't be a memory address.  the jvm does not expose that to the java layer.  it's "just a number" as far as your code is concerned.  the contract is basically this:   hashCode returns a number that is unique for that object type.  if two object's of the exact type (discard erasures and sub/super classing) have the same hashCode() they "should" be considered equal().  if they aren't, it can break things like Comparator, Map, and
19:37 sfisque bah
19:37 sfisque well, he'll see it in the log
19:56 kobain_ joined ##javaee
19:57 Quest joined ##javaee
19:59 Guest4970 hascode is the  memory addresss type of thing or just a unique code for a unique object
19:59 Guest4970 * Disconnected (Connection tim
20:01 zoot read the logs Quest
20:05 Guest4970 oh, I nearly forgot we had logs
20:06 Guest4970 got it. thx
20:08 kobain joined ##javaee
20:18 kobain_ joined ##javaee
20:19 SoniEx joined ##javaee
20:24 kobain joined ##javaee
20:41 kobain_ joined ##javaee
20:55 pdurbin huh. "For those of you who will get this problem, it was related to the fact that the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files was not installed and it was not letting me use encryption better than AES-128" -- http://stackoverflow.com/questions/9422545/decrypting-encrypted-assertion-using-saml-2-0-in-java-using-opensaml/9500718#9500718
20:58 SExJ joined ##javaee
20:59 pdurbin I don't know if I even have that
20:59 SExJ joined ##javaee
21:00 sfisque you have to explicitly upgrade the containers JCE provider for full encryption.  there is a download from oracle
21:00 sfisque it's fairly trivial but not obvious
21:01 SExJ joined ##javaee
21:01 SoniEx2 --forth " test" .
21:01 SExJ test
21:02 SoniEx2 --forth " test" . .
21:02 SExJ testEmpty stack
21:02 SoniEx2 I may be doing that wrong...
21:04 SoniEx2 --forth " test  test" . .
21:04 SExJ test  testEmpty stack
21:04 SoniEx2 well I'm not doing that wrong...
21:04 SoniEx2 --forth " test  test " . .
21:04 SExJ test  test Empty stack
21:04 SoniEx2 :D
21:05 SoniEx2 the only problem is recursion and I don't have a timeout...
21:06 kobain joined ##javaee
21:18 sfisque recursion is like venture capitalism, you should always have an exit strategy
21:18 sfisque :-)
21:19 SoniEx2 lets see... OutOfMemoryError sounds like a good exit strategy...
21:19 sfisque oh yeah.  turing machine, here we come!!
21:21 kobain joined ##javaee
21:25 SExJ joined ##javaee
21:27 SoniEx2 --forth : test " just testing ;)" ;
21:27 SoniEx2 I can't tell if that worked...
21:27 SoniEx2 --forth test
21:27 SoniEx2 eh I guess not :/
21:30 SoniEx2 --forth : test " just testing ;)" ;
21:30 SoniEx2 --forth : test " just testing ;)" ;
21:31 SoniEx2 oh wait
21:31 SoniEx2 --forth : test " just testing ;)" . ;
21:31 SoniEx2 --forth test
21:31 SoniEx2 huh...
21:31 SoniEx2 --forth test .
21:31 SoniEx2 --forth " test" test
21:32 SoniEx2 --forth test
21:32 sfisque —forth spam the crap out of us
21:32 SExJ spam?
21:32 SoniEx2 fine I'll test somewhere elase
21:32 SoniEx2 else*
21:33 sfisque this channel isnt really for testing s/w.  make a temp channel for it
21:33 cem_ J omg all i see quit-joined loop
21:33 SoniEx2 fixed
21:41 pdurbin whartung and sfisque: #openam is becoming my sso channel: http://irclog.perlgeek.de/openam/2013-11-04#i_7812160 :)
21:41 whartung cool pdurbin
21:42 sfisque nifty
21:43 * pdurbin shakes fist at ADFS
21:44 sfisque is that the oracle JSF impl?
21:44 sfisque oh wait, thats ADF
21:44 sfisque what's ADFS
21:44 sfisque ?
21:44 pdurbin javaeebot: lucky windows adfs
21:44 javaeebot pdurbin: http://en.wikipedia.org/wiki/Active_Directory_Federation_Services
21:44 sfisque gotcha
21:47 SExJ joined ##javaee
21:52 SExJ joined ##javaee
21:56 SoniEx2 how do I do an HTTP GET in Java?
21:57 whartung you can use URL.openStream
21:57 whartung but most folks use the Apache commons HTTP client suite
21:58 sfisque unless you're doing something fancy, the vanilla jdk java.net will do fine, but as whartung indicates, the apache lib will help too
21:59 SoniEx2 ok
21:59 SoniEx2 what about POST?
22:00 whartung HttpURLConnection is the JDKs way of doing that
22:00 whartung I've never reallyused the JDK stuff, always used Apaches
22:01 whartung though I thin kthe current kit is not the most intuitive to use
22:01 sfisque afaik httpurlconnection will perform get or post
22:01 sfisque at least it did last time i used them
22:01 sfisque as for PUT or DELETE, not sure if it supports those
22:01 whartung yea, should work
22:01 whartung probably doesn't care
22:11 SExJ joined ##javaee
22:11 MegaMatt joined ##javaee
22:35 SExJ joined ##javaee
22:45 cem_ SExJava not again
22:48 sfisque sexj must be 14.  it keeps leaving and coming back in.  upto no good, i say...
22:48 sfisque :P
22:49 SExJ joined ##javaee
22:49 SoniEx2 cem_: it's SoniExJava
22:52 cem_ is that your bot ?
22:52 SoniEx2 yeah
22:52 cem_ :D
22:53 cem_ I made my bot too much better then javaeeb o t
22:55 cem_ i tried i channel :D they kicked it :D
22:55 cem_ other *
23:17 SExJ joined ##javaee
23:21 MegaMatt joined ##javaee
23:29 SExJ joined ##javaee
23:31 SExJ joined ##javaee
23:45 cem_ Bye ALL lots of love for this channel :)

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