Time |
S |
Nick |
Message |
00:49 |
|
|
ibaca joined ##javaee |
00:53 |
|
|
sfisque joined ##javaee |
01:38 |
|
|
__nh__ joined ##javaee |
02:16 |
|
|
__nh___ joined ##javaee |
02:32 |
|
|
javaeebot joined ##javaee |
02:34 |
|
|
crimsonfubot joined ##javaee |
02:38 |
|
pdurbin |
javaeebot: google Java EE |
02:38 |
|
javaeebot |
pdurbin: Java EE at a Glance - Oracle: <http://www.oracle.com/us/javaee/>; Java EE - Downloads: GlassFish and Java EE 7 | Oracle Technology ...: <http://www.oracle.com/technetwork/java/javaee/downloads/>; Java EE Technical Documentation - Oracle Documentation: <http://docs.oracle.com/javaee/>; Java Platform, Enterprise Edition - Wikipedia, the free encyclopedia: (2 more messages) |
02:39 |
|
sfisque |
javaeebot: google your mom |
02:39 |
|
javaeebot |
sfisque: Urban Dictionary: your mom: <http://www.urbandictionary.com/define.php?term=your%20mom>; Your mom - Uncyclopedia, the content-free encyclopedia: <http://uncyclopedia.wikia.com/wiki/Your_mom>; Maternal insult - Wikipedia, the free encyclopedia: <http://en.wikipedia.org/wiki/Maternal_insult>; xkcd: Your Mom: <http://xkcd.com/366/>; Your mom is at the club yourmomisclubbin.com: (1 more message) |
02:40 |
|
sfisque |
^_^ |
03:10 |
|
pdurbin |
sfisque: it's a start :) |
03:12 |
|
pdurbin |
@Named |
03:13 |
|
pdurbin |
I made so javaeebot doesn't respond to @ at the start of a line (like the other bot used to) |
03:30 |
|
sfisque |
cool |
03:31 |
|
sfisque |
javaeebot: what is the air speed velocity of an unladen sparrow |
03:31 |
|
javaeebot |
sfisque: Error: "what" is not a valid command. |
03:31 |
|
sfisque |
javaeebot: google what is the air speed velocity of an unladen sparrow |
03:31 |
|
javaeebot |
sfisque: style.org > Estimating the Airspeed Velocity of an Unladen Swallow: <http://style.org/unladenswallow/>; Monty Python and the Holy Grail (1975) - Quotes - IMDb: <http://www.imdb.com/title/tt0071853/quotes>; Airspeed Velocity of a Swallow - YouTube: <http://www.youtube.com/watch?v=y2R3FvS4xr4>; What is the airspeed velocity of an unladen swallow? - Wolfram Alpha: (2 more messages) |
03:32 |
|
sfisque |
lol, javaeebot thank you for refreshing my memory |
03:34 |
|
sfisque |
javaeebot: google intimating coconuts migrate |
03:34 |
|
javaeebot |
sfisque: Pennsylvanians ask feds to help disarm intimidating small-town ...: <http://endthelie.com/2013/08/06/pennsylvanians-ask-feds-to-help-disarm-intimidating-small-town-militia/>; Cosmic Coconut - Brennan - Memphis, TN - Yelp: <http://www.yelp.com/biz/cosmic-coconut-memphis>; The Cheesecake Factory - Coconut Grove - Coconut Grove, FL - Yelp: <http://www.yelp.com/biz/the-cheesecake-factory-coconut- (2 more messages) |
04:42 |
|
|
dangertools joined ##javaee |
04:42 |
|
|
dangertools joined ##javaee |
05:48 |
|
|
Quest joined ##javaee |
06:21 |
|
|
jenue joined ##javaee |
08:39 |
|
Quest |
any one using struts? |
08:45 |
|
|
dangertools joined ##javaee |
09:08 |
|
tjsnell |
no one with a clue or a good job |
09:10 |
|
Quest |
you know all here? |
09:10 |
|
Quest |
tjsnell why do you think struts should not be uses? |
09:10 |
|
Quest |
struts 2 i mean |
09:11 |
|
tjsnell |
it's old, uses ideas that went out of popularity many years ago as new and better ways to get the job done were developed |
09:11 |
|
tjsnell |
it's just clunky |
09:14 |
|
Fubar^ |
on the other hand, this channel is ##javaee old and clunky things is pretty much what we discuss here :) |
09:18 |
|
tjsnell |
yes if we're really living in j2ee days |
09:18 |
|
tjsnell |
jee not as much :) |
09:18 |
|
tjsnell |
as far as web frameworks there's a lot of much much nicer alternatives |
09:40 |
|
Fubar^ |
On a scale from 1 to 10 how annoying is type erasure? Feels like 10 to me right now... |
09:48 |
|
tjsnell |
heh |
09:48 |
|
tjsnell |
it's a 1 until it's a 10 |
09:48 |
|
tjsnell |
then it's a 1 again |
09:58 |
|
acuzio |
nonsense - |
09:58 |
|
acuzio |
Struts 2 is really bad |
09:58 |
|
acuzio |
struts 0.92 is great though , Quest you should use that |
10:19 |
|
Quest |
is this a sane way to generate 4 char lenght alpha numeric string ? System.out.println(new BigInteger(16, new SecureRandom()).toString(32)) ; |
10:37 |
|
pdurbin |
Fubar^: heh. old and clunky |
10:38 |
|
pdurbin |
sfisque: just `lucky` works with javaeebot too |
10:38 |
|
pdurbin |
javaeebot: lucky java ee |
10:38 |
|
javaeebot |
pdurbin: http://www.oracle.com/us/javaee/ |
10:39 |
|
pdurbin |
Quest: I take it that works |
12:57 |
|
|
jieryn joined ##javaee |
12:57 |
|
|
jieryn joined ##javaee |
13:02 |
|
|
zhein joined ##javaee |
13:42 |
|
balazare |
pdurbin: wouldn't radix be 36 instead of 32 to get the full range? |
13:43 |
|
pdurbin |
balazare: dunno. I didn't actually think about it. reminds me that I should set up some kind of REPL for Java. maybe I can just use Groovy for that |
13:44 |
|
balazare |
pdurbin: yeah that could work |
13:46 |
|
pdurbin |
I only recently realized Groovy has methodMissing, which is pretty cool: http://irclog.greptilian.com/javaee/2013-09-26#i_25962 |
13:48 |
|
balazare |
pdurbin: sweet, that makes it cleaner |
13:48 |
|
pdurbin |
that was a great talk |
13:52 |
|
pdurbin |
and I'm kind of more interested in Groovy now that Gradle is getting more adoption... I think it heard it's the default build tool for Android now |
14:07 |
|
pdurbin |
"The Android core library is well documented with guides, references, and how-tos, and most importantly the IDE and packaging system recently got a big boost with Android Studio and Gradle." -- http://venturebeat.com/2013/09/09/forget-android-fragmentation-use-cloud-and-apis-for-easy-android-development/ |
14:08 |
|
tjsnell |
Idea++ |
14:09 |
|
pdurbin |
:) |
14:31 |
|
|
Fubar^_ joined ##javaee |
14:33 |
|
|
Quest joined ##javaee |
15:00 |
|
Quest |
I have user class, board, board privileges. how can I get the boards for which the user has some privileges (should be added in userList of boardPriviliges class) http://pastebin.ca/2461182 |
15:11 |
|
|
Naros joined ##javaee |
15:14 |
|
balazare |
Quest: Something like this should get you close: select b from Boards b, BoardPrivileges p where b in p.boardList and :user in p.userList |
15:25 |
|
Quest |
balazare, select b from Board b join b.boardPrivilegesList bp join bp.userList u where u.id = :id ? |
15:27 |
|
Quest |
brb. 5 mins |
15:28 |
|
balazare |
Quest: that looks about right |
15:42 |
|
Quest |
thx |
17:06 |
|
SoniEx2 |
am I doing this license stuff right: https://github.com/SoniEx2/TheModernClassicGame/commit/17134b71fc4bae2e7134170ce014d10a213b9e19 |
17:06 |
|
SoniEx2 |
https://github.com/SoniEx2/TheModernClassicGame/tree/master/lib |
17:13 |
|
SoniEx2 |
well fine nobody tells me :/ |
17:23 |
|
pdurbin |
SoniEx2: GPL? I guess so |
17:23 |
|
SoniEx2 |
I'm mostly talking about the lib part |
17:32 |
|
sfisque |
as an aside, soniex2, griping in channel is not going to get a person much traction. if no one chimes in quickly, it's safe to say we're probably idling/eating/working/busy. if you're patient, someone will probably chime in at some point if they check their scrollback |
17:34 |
|
pdurbin |
also, I am not a lawyer :) |
17:35 |
|
SoniEx2 |
well I asked it on another channel 2 hours ago and they didn't answer me yet |
17:35 |
|
SoniEx2 |
I'm just asking if I'm doing the lib licenses part right |
17:51 |
|
pdurbin |
SoniEx2: it's a GPL question, right? |
17:56 |
|
pdurbin |
javaeebot: lucky Cannot resolve reference Local ejb-ref |
17:56 |
|
javaeebot |
pdurbin: http://stackoverflow.com/questions/12823527/getting-cannot-resolve-reference-local-ejb-ref-not-implementing-parent-interface |
17:57 |
|
tjsnell |
SoniEx2: you need to ask more interesting questions :) |
17:59 |
|
SoniEx2 |
pdurbin: not really |
18:03 |
|
pdurbin |
SoniEx2: I don't understand your question, then |
18:09 |
|
SoniEx2 |
well am I including the lib licenses properly? |
18:09 |
|
SoniEx2 |
and stuff? |
18:47 |
|
|
sess joined ##javaee |
19:42 |
|
Quest |
sess, getting lazy iniialization error. http://pastebin.ca/2461244 |
19:42 |
|
Quest |
strange. its in service with @Transactional |
19:43 |
|
sess |
youre not guaranteed to avoid it while inside a transaction |
19:43 |
|
sess |
it has to be the same transaction |
19:43 |
|
Quest |
sorry? |
19:43 |
|
sess |
as soon as you leave the service layer, lazy loading will not be possible |
19:43 |
|
sess |
even if you enter it again with the same object |
19:43 |
|
sess |
only Managed objects can lazy load |
19:44 |
|
sess |
they have to be fetched from the DB in the current transaction to be managed |
19:44 |
|
Quest |
what do you mean. I did a user.getBoardList() INSIDE the service method. why its not loading it then? |
19:45 |
|
sess |
because you got the user object from a controller? |
19:45 |
|
Quest |
yes. but it is passed to the service method as param |
19:45 |
|
sess |
entityManager.find(user.class, 1).getBoardList() works |
19:45 |
|
sess |
sending in a user from controller wont |
19:46 |
|
sess |
because the user is detached |
19:46 |
|
sess |
as soon as you leave the service layer |
19:46 |
|
Quest |
so you mean , I should do a Users u = new Users(); u = user |
19:46 |
|
Quest |
in service^ |
19:46 |
|
Quest |
oh |
19:46 |
|
sess |
that doesnt really do anything? |
19:46 |
|
sess |
you should either not leave the service layer in the first place |
19:46 |
|
Quest |
<sess> that doesnt really do anything?? |
19:46 |
|
sess |
or fetch the user again |
19:47 |
|
Quest |
hm |
19:47 |
|
Quest |
ok. |
19:47 |
|
Quest |
ill fetch user again |
19:47 |
|
sess |
thus an ID is the proper parameter |
19:47 |
|
sess |
rather than a user |
19:47 |
|
Quest |
why not just Users u = new Users(); u = user |
19:47 |
|
Quest |
in service? |
19:47 |
|
sess |
why would you create a new user? |
19:47 |
|
sess |
i dont see the point in that code at all |
19:47 |
|
Quest |
just to avoide queries and daos |
19:48 |
|
sess |
but you need data from the database.. |
19:48 |
|
Quest |
getBoardListByUser(Users user){ Users u = new Users(); u = user ; List<Boards> boardList = new ArrayList<Boards>(u.getBoardList()); |
19:48 |
|
sess |
youre creating a new instance of a user |
19:48 |
|
sess |
throwing it away |
19:48 |
|
sess |
then reassigning the variable to the same user as before |
19:49 |
|
sess |
it does essentially nothing except wasting electricity |
19:49 |
|
Quest |
hm |
19:49 |
|
Quest |
a minut then |
19:49 |
|
sess |
to use lazy loading you need to use the entitymanager in this service call |
19:49 |
|
sess |
no way around it |
19:49 |
|
sess |
via find or merge |
19:50 |
|
sess |
i still think you should just initialize the list as soon as you fetch the user |
19:50 |
|
sess |
and skip this method completly |
19:51 |
|
tjsnell |
who are you talking to? |
19:51 |
|
tjsnell |
I didn't think I had anyone on ignore |
19:52 |
|
sess |
mw? |
19:52 |
|
sess |
me? |
19:52 |
|
Quest |
http://pastebin.ca/2461247 ? |
19:52 |
|
Quest |
tjsnell, i was talking to sess |
19:52 |
|
sess |
Quest: why are you creating a new user object |
19:52 |
|
sess |
you just overwrite it on the next line |
19:53 |
|
sess |
Quest: http://pastebin.ca/2461248 |
19:53 |
|
sess |
just do this |
19:53 |
|
sess |
you dont need 2 methods |
19:53 |
|
sess |
if you call this you get a user object and the list is populated |
19:55 |
|
Quest |
sess, 1. why Hibernate.initializ . what if i want to avoid it? 2. in my controller I need a separate call to get user. and after that, a seperate call to get boards of that user. so I have to make a serice method that has a user param and gets me the boardList. now how do I get the board list? |
19:57 |
|
sess |
why would you need seperate calls if you have all data? |
19:57 |
|
sess |
if you dont always want the boardlist, you could send in a parameter determening if you want the data or not |
19:58 |
|
sess |
or you can make one getUser |
19:58 |
|
sess |
and one getFullUser |
19:59 |
|
Quest |
sess, I may be getting user from some other place. |
19:59 |
|
sess |
in that case you might just want to avoid lazy loading completly |
19:59 |
|
sess |
and query for the boards seperatly |
19:59 |
|
sess |
select b from board where b.user = :user |
19:59 |
|
sess |
something like that |
20:01 |
|
Quest |
and the :user will be the detached user from method param? |
20:01 |
|
sess |
yes |
20:01 |
|
sess |
or using its id |
20:01 |
|
sess |
might be cleaner |
20:02 |
|
Quest |
detached would work? |
20:02 |
|
sess |
yes |
20:02 |
|
Quest |
hm. ok |
20:03 |
|
|
Visual_E joined ##javaee |
20:03 |
|
Quest |
then why this is not working? just because the service method is not using any entityManager ? http://pastebin.ca/2461247 |
20:04 |
|
sess |
does it throw lazy exception? |
20:04 |
|
Quest |
didnt checked yet |
20:04 |
|
sess |
so what is not working |
20:04 |
|
Quest |
is entityManage compulsorry for lazy init? |
20:04 |
|
Quest |
well. |
20:05 |
|
Quest |
<Quest> sess, getting lazy iniialization error. http://pastebin.ca/2461244 |
20:05 |
|
sess |
the object has to be managed for lazy initialization to work |
20:05 |
|
Quest |
this was not working^ |
20:05 |
|
sess |
ues because user is not managed |
20:05 |
|
Quest |
sess, my argument was that it should be managed auto if its inside @Transactional |
20:05 |
|
Quest |
service layer^ |
20:05 |
|
sess |
it doesnt work like that |
20:06 |
|
sess |
when you leave the service layer |
20:06 |
|
Quest |
ok |
20:06 |
|
sess |
ALL objects become detached |
20:06 |
|
sess |
only way to attach them again is via entitymanager.merge |
20:06 |
|
Quest |
but beforeleaving service layer. the object (List) is returned... |
20:06 |
|
sess |
yes but you are using the user object |
20:06 |
|
sess |
which is passed from controller |
20:06 |
|
sess |
and is detached |
20:07 |
|
sess |
the exception is tthrown from user.getBoardList |
20:07 |
|
Quest |
hm |
20:07 |
|
Quest |
got it |
20:07 |
|
sess |
what youre doing could aswell be done in the controller |
20:07 |
|
sess |
theres no difference |
20:07 |
|
Quest |
so either I write query or user entity manager |
20:08 |
|
sess |
well you use entity manager with queries aswell |
20:08 |
|
sess |
but if you want new data |
20:08 |
|
sess |
you need to use the entity manager |
20:09 |
|
Quest |
entitymanager.find is better nO? |
20:09 |
|
sess |
use find if you want a single object and have the id |
20:09 |
|
Quest |
the list is also an object |
20:09 |
|
sess |
a single entity* |
20:09 |
|
Quest |
hm |
20:09 |
|
Quest |
got it. |
20:09 |
|
Quest |
let me see what I can code... thanks!! |
20:10 |
|
sess |
np |
20:10 |
|
sess |
hibernate is harsh to learn |
20:11 |
|
Quest |
sess, wait. this should work http://pastebin.ca/2461247 as the DAO is using entityManager. it uses user.GetEmail (detached) but returns an attached user (u) |
20:12 |
|
Quest |
right? |
20:13 |
|
sess |
yes |
20:13 |
|
Quest |
ok |
20:13 |
|
sess |
but new Users() does nothing |
20:13 |
|
sess |
remove it |
20:13 |
|
Quest |
hm |
20:13 |
|
sess |
and fetching the boards instead of the user |
20:13 |
|
sess |
is more efficient |
20:14 |
|
sess |
if you only want the boards |
20:14 |
|
Quest |
then. Users u = userDAO.getUserByLoginId(user.getEmail()); |
20:14 |
|
sess |
thats better |
20:15 |
|
Quest |
sess, since how much time are you using hibernate? |
20:17 |
|
sess |
been using jpa for almost 3 years |
20:17 |
|
sess |
hibernate for perhaps 2 |
20:22 |
|
Quest |
i see |
20:26 |
|
Quest |
I started a month or 2 ago |
20:27 |
|
sess |
i didnt even know what annotations were when i started :D |
20:27 |
|
sess |
harsh times |
20:28 |
|
Quest |
hm.. |
20:28 |
|
Quest |
annotations started near 2008 i gues |
20:30 |
|
|
PaperCup01 joined ##javaee |
20:31 |
|
Quest |
sess, some how I am out of errors |
20:31 |
|
Quest |
but not getting boards (empty may be). will check for details... nice talking to you really |
20:32 |
|
sess |
:) |
20:35 |
|
|
PaperCup01 left ##javaee |
20:39 |
|
Quest |
strange not outputting board title in jsp. |
20:39 |
|
Quest |
http://pastebin.ca/2461265 |
20:41 |
|
sess |
model.put("boards",boardList); |
20:41 |
|
sess |
items="${board}" |
20:41 |
|
sess |
look closely |
20:41 |
|
sess |
also forgot ${} on c:out |
20:43 |
|
sess |
legacy app btw? If using servlet 2.5 or higher i think, you dont need c:out, you can just type ${booard.title} |
20:43 |
|
Quest |
<c:out value="${board.title}" /> |
20:44 |
|
Quest |
using spring 3.2. dont know which servlet does it uses |
20:45 |
|
sess |
try skipping c:out |
20:45 |
|
sess |
its very verbal |
20:45 |
|
sess |
its from java EE 1.4 i think |
20:45 |
|
sess |
what app server are you on |
20:45 |
|
Quest |
the app logic worked by the way |
20:46 |
|
sess |
cool |
20:46 |
|
Quest |
my tomcat is java ee 6 |
20:46 |
|
sess |
you can skip c:out then |
20:46 |
|
Quest |
that should have servlet 3 |
20:46 |
|
Quest |
Iam quite happy that my app logic worked! |
20:47 |
|
Quest |
thanks to you |
20:48 |
|
sess |
:) |
20:48 |
|
sess |
off to bed now |
20:48 |
|
sess |
see ya around |
20:51 |
|
Quest |
see you! :) |