greptilian logo

IRC log for #javaee, 2014-02-12

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:07 Naros joined ##javaee
00:34 AndroidLoverInSF joined ##javaee
00:37 AndroidLoverInSF joined ##javaee
00:44 Naros left ##javaee
00:50 AndroidLoverInSF joined ##javaee
00:52 AndroidLoverInSF joined ##javaee
01:06 magyar joined ##javaee
03:00 Naros_ joined ##javaee
03:00 Naros_ left ##javaee
03:04 sajjadg joined ##javaee
03:09 semiosis joined ##javaee
03:09 semiosis joined ##javaee
03:22 Voyage joined ##javaee
03:27 Voyage any one good in synchronized blocks?
03:51 Voyage any help for non-synchronized behaviour for the lines highlighted? http://pastie.org/8724549#1,9,41-42,46,49,100-101,191
03:52 kobain joined ##javaee
04:09 Voyage http://pastie.org/8724549#41-42,46,49,100-101,188-189,191
04:09 Voyage the highlighted method / block is synchronized..... that block/method should be accessed by one method at a particular time........
04:09 Voyage it should be like this =  first thread goes in the method, updates size, all others see that size. updated one.
04:09 Voyage the update should have been only made by the first thread. not others
04:09 Voyage 1, why its even being run .  its being run by all 11 threads. 2, it is runing without waiting for the prior thread to finish. "queue loaded, new  size ------------" its creating/ adding elements
04:20 sajjadg joined ##javaee
04:43 sfisque depends.  if each thread gets a fresh instance of your object, they will all run independently of each other
05:03 Voyage sfisque,  Thread thread = new Thread(new Crawler("https://www.google.com.pk/?gws_rd=cr&ei=-q8vUqqNDIny4QTLlYCwAQ#q=pakistan"/*new BasicDAO().getNonProcessedLink()*/));
05:03 Voyage sfisque,  got one catch,  synchronized methods are non-static.
05:03 sfisque why would they be?
05:04 Voyage but dont know about the synchrnoized(crawler.class)
05:04 Voyage sfisque,  I mean it should have been static
05:04 Voyage right?
05:04 Voyage in my case
05:06 sfisque how.  the method is an instance method (it's not marked as static) so how could that synchronized block be static?
05:06 sfisque makes no sense
05:06 sfisque the only thing syncrhonized does is give you a monitor lock before entering that block
05:07 sfisque what you want is a single instance owned by all the threads
05:07 sfisque i believe
05:07 sfisque if i understand what you are trying to do
05:07 sajjadg joined ##javaee
05:31 Bombe joined ##javaee
05:43 sajjadg joined ##javaee
06:07 sajjadg joined ##javaee
06:28 sajjadg joined ##javaee
06:50 sajjadg joined ##javaee
07:18 sajjadg joined ##javaee
07:22 ramsrib joined ##javaee
07:46 sajjadg joined ##javaee
08:02 sajjadg joined ##javaee
08:03 sajjadg joined ##javaee
08:18 fabioportieri joined ##javaee
08:34 sajjadg joined ##javaee
08:51 kaylors joined ##javaee
08:53 kaylors I have a JTable  within a JFrame in Netbeans. I used NetBean's Design view to create a table model with one column. Now I wanna add data to the table at runtime based on user input. How do I do it?
08:57 fabioportieri kaylors: #java, aniway, did you look at the javadocs? what about setModel() ?
08:58 kaylors Checking it out...
08:58 kaylors left ##javaee
09:16 cem__ joined ##javaee
09:30 sajjadg JTable is the worse thing I've ever worked with. so funny and unfriendly
09:32 fabioportieri with swing, things renders differently on different os.. which kinda sucks
09:51 sajjadg fabioportieri: exactly the opposite. they render the same everywhere
09:55 fabioportieri sajjadg: should be that way, but in reality it's not
09:56 fabioportieri one gui you develop on windows would have glitches ported to unix system
09:56 sajjadg fabioportieri: :-/ maybe. most things are the same. just needs little changes to be the same everywhere
09:57 sajjadg anyway. swing is dying for a long time.
09:57 sajjadg javafx is going to replace it soon. in a month or two
09:57 sajjadg jdk 8 ships with javafx I think
09:57 fabioportieri let's hope so, swing is a pita
10:15 acuzio Swing is not just a PITA ., its not been seriously updated in 15 years
11:22 jamesmcveity joined ##javaee
11:27 sajjadg joined ##javaee
11:30 fabioportieri joined ##javaee
11:39 sajjadg joined ##javaee
11:50 sajjadg_ joined ##javaee
11:53 sajjadg__ joined ##javaee
12:37 sajjadg joined ##javaee
13:01 sajjadg joined ##javaee
13:19 nobbis joined ##javaee
13:20 sajjadg joined ##javaee
13:35 nobbis left ##javaee
14:00 sajjadg joined ##javaee
14:28 Naros joined ##javaee
14:29 Naros left ##javaee
14:55 SoniEx2 joined ##javaee
15:10 jieryn joined ##javaee
15:10 jieryn joined ##javaee
15:27 sajjadg_ joined ##javaee
15:36 sajjadg__ joined ##javaee
15:40 neuro_sys joined ##javaee
15:46 Naros_ joined ##javaee
15:46 Naros_ left ##javaee
15:55 jieryn MUST a @Stateless bean have a public no-arg constructor? i have looked through jsr 220, but i can not find any specific requirement..
15:55 jieryn but websphere is dying on my @Stateless bean not having one
15:56 tjsnell joined ##javaee
15:57 sajjadg_ joined ##javaee
15:57 jieryn but it works in apache tomee
15:58 sajjadg_ joined ##javaee
16:00 acuzio websphere - haa haa
16:02 tjsnell hehe
16:06 pdurbin tjsnell: you're back! howdy
16:06 tjsnell I'm just here to cause trouble
16:23 semiosis i have a problem, and need your expertise, ##javaee...
16:23 Voyage joined ##javaee
16:24 semiosis there's a class in the jdk, sun.nio.fs.Globs, which has two package-private (no access modifier) static methods
16:25 semiosis i want to use those classes from my package, so i added a proxy class to my project... sun.nio.fs.PublicGlobs, with one *public* static method that calls the package private static method in the original class
16:25 semiosis here's the problem
16:25 semiosis when i try to run in IDEA it says that my class sun.nio.fs.PublicGlobs doesn't have access to method sun.nio.fs.Globs.foo (the package private static method)
16:26 semiosis when i try to run in maven it says that the original sun.nio.fs.Globs class can't even be found!
16:26 semiosis can anyone tell me what's going on???
16:37 sajjadg_ joined ##javaee
16:38 tjsnell generally it's a bad idea to use anything in sun.*
16:38 tjsnell oh wait
16:38 tjsnell bad idea to use com.sun.*
16:38 tjsnell never ever use sun.*
16:44 sajjadg joined ##javaee
16:44 semiosis tjsnell: please explain
16:45 tjsnell sun.* are internal implementation classes never intended for end user access
16:45 semiosis tjsnell: my backup plan is to just copy the code into my project, it is GPL+CP and i'm using this in an open source project
16:46 tjsnell heh
16:46 semiosis tjsnell: can you offer any alternatives?
16:46 tjsnell since I have no clue what those do, no.
16:46 semiosis this code converts a shell glob pattern into a regex
16:46 semiosis shell glob being, for example "**/*.gz"
16:47 semiosis it's used internally by the java.nio.file.Files stuff (NIO.2)
16:47 semiosis i found something called jakarta oro that might do this as well, but that's in the apache attic now
16:59 NationalCoder joined ##javaee
17:05 sajjadg joined ##javaee
17:16 ramsrib joined ##javaee
17:17 ramsrib left ##javaee
17:32 neuro_sy1 joined ##javaee
17:56 AndroidLoverInSF joined ##javaee
18:00 AndroidLoverInSF joined ##javaee
18:02 NationalCoder joined ##javaee
18:23 sajjadg joined ##javaee
18:27 whartung any reason I can't bundle a war with an EJB in it in to an EAR with another EJB module?
18:55 sajjadg joined ##javaee
18:57 pdurbin whartung: I thought Javd EE 6 brought the simplified "just use a war" model
18:58 whartung but it's only a subset of the JEE stack, you can't put everything in to a war
18:58 whartung notably MDBs
18:58 pdurbin ok
19:01 pdurbin whartung: so does the bundling you want work?
19:01 whartung I haven't tried it yet
19:03 weyer joined ##javaee
19:28 sajjadg Do I need to add a JAXB implementation to my project if I'm deploying to a glassfish AS?
19:28 sajjadg it seems that glassfish has a JAXB implementation by default :-/
19:28 sajjadg it's marshalling already but it's adding additional @ to the JSON output
19:29 sajjadg the solution is to use @XMLElement instead of @XMLAttribute but it's not working for me!
19:29 whartung jaxb is built in to glass fish. Jersey bundles the json support for it
19:30 sajjadg so if I have jersey dependency in my pom.xml then I don't need any other JAXB impl. good. ASes have lots of things :P
19:33 acuzio Not all of them good
19:34 sajjadg jersey and resteasy are both JAX-RS JSR implementation and former is bundled with glassfish and latter bundled/developed/included in jboss/wildfly. so if for example I have a working webservice that is using jersey and then I want to change my AS to jboss/wildfly can I use jersey with jboss/wildfly or I need to change jersey to resteasy?
19:35 sajjadg shit. netbeans started transfering maven index again
19:35 whartung ideally, you don't have to swap them out. That's what "coding to the standard" is supposed to by you. The reality may be different, but perfect world is that it would Just Work(tm).
19:40 sajjadg_ joined ##javaee
19:40 sajjadg_ jersey and resteasy are both JAX-RS JSR implementation and former is bundled with glassfish and latter bundled/developed/included in jboss/wildfly. so if for example I have a working webservice that is using jersey and then I want to change my AS to jboss/wildfly can I use jersey with jboss/wildfly or I need to change jersey to resteasy?
19:43 whartung ideally, you don't have to swap them out. That's what "coding to the standard" is supposed to by you. The reality may be different, but perfect world is that it would Just Work(tm).
19:49 CJ_ I really hate when libraries don't include any log statements in them.
19:49 whartung heh
19:49 whartung I know
19:56 sajjadg_ joined ##javaee
19:56 sajjadg_ perfect world! :-)
19:57 sajjadg_ what's the default jaxb in glassfish? moxy, jackson, ....?
20:03 tjsnell jackson is my guess
20:04 tjsnell reference impl using reference impl
20:04 sajjadg_ no it's jettison
20:06 sajjadg_ or maybe you're right.
20:06 sajjadg_ I don't know
20:06 sajjadg_ there's lots of evidence in the scene. I'm investigating
20:17 CJ_ Anyone know the deal with josql?  It seems to have disappeared from maven.
20:19 CJ_ Never mind.
20:31 sfisque joined ##javaee
21:25 Lappro joined ##javaee
21:51 sajjadg_ this @ is fucking aweful. in JAXB if you have xml attribute then you get @ before its name after marshalling and for property you get names without @
21:52 sajjadg_ it seems I should do something in client side
21:52 sajjadg_ old version of jersey used to has some workaround but in the last version I can't find any solution
21:53 sajjadg_ the worse part is that my xml uses attributes a lot! I don't know why! but they overused attribute
23:18 jamesTuvok joined ##javaee
23:39 drspockbr 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.