Time |
S |
Nick |
Message |
00:04 |
|
Quest |
oh |
00:04 |
|
Quest |
VB? |
00:04 |
|
sfisque |
VirtualBox |
00:04 |
|
Quest |
oh |
00:04 |
|
Quest |
so you have appropriate hardware for solaris? |
00:05 |
|
sfisque |
rackmounts with dual proc opteron MB's with dual core opterons |
00:05 |
|
sfisque |
hand built :P |
00:05 |
|
Quest |
hm. thats the solaris specific hardware? |
00:05 |
|
sfisque |
yes |
00:05 |
|
Quest |
I never used solaris. i wish i did |
00:05 |
|
Quest |
how much does minimal cost? |
00:06 |
|
Quest |
low specs |
00:06 |
|
Quest |
and solaris is just linux right? just more java based. if iam corect |
00:06 |
|
sfisque |
depends on what you're doing. you can run solaris on a notebook if you're just developing. if your'e running a server, i'd recommend at least 2 cores and 2gb of ram |
00:06 |
|
sfisque |
negative.. solaris == unix |
00:06 |
|
sfisque |
like hpux or aix |
00:07 |
|
Quest |
i have a pc. i dont think i can run solaris on that. |
00:07 |
|
Quest |
solaris requires specific hardware |
00:07 |
|
sfisque |
nah. |
00:07 |
|
sfisque |
x86 solaris runs on commodity hardware |
00:07 |
|
sfisque |
you're thinking sparc solaris |
00:07 |
|
sfisque |
that requires sparc procs |
00:08 |
|
xll11 |
Anyone knows a good pdf reader for Windows? |
00:08 |
|
sfisque |
adobe ? |
00:08 |
|
sfisque |
reader |
00:08 |
|
xll11 |
I usually use Adobe but maybe there's something better out there |
00:08 |
|
sfisque |
ghostscript? |
00:08 |
|
sfisque |
tehre should be a windows port |
00:08 |
|
sfisque |
re at the least a gtk port |
00:08 |
|
xll11 |
I'll look into it |
00:08 |
|
xll11 |
transitioning from linux to windows is not easy |
00:09 |
|
xll11 |
I gave up and re-installed windows on my laptop |
00:09 |
|
sfisque |
/condolences |
00:09 |
|
sfisque |
run windows inside a VM :P |
00:09 |
|
sfisque |
then you get linux and windows :P |
00:09 |
|
xll11 |
Ill run linux inside a vm :D |
00:09 |
|
sfisque |
you'll get better performance the other way around. windows is not very good at being a VM host |
00:09 |
|
sfisque |
but it actually runs well in a VM |
00:10 |
|
sfisque |
and you can reboot often and still get work done :P |
00:10 |
|
xll11 |
:P |
00:10 |
|
Quest |
sfisque, so theres x86 solaris that can run on a pc? |
00:10 |
|
xll11 |
Anywy, I'm off to bed! night. |
00:11 |
|
sfisque |
code strong ! |
00:11 |
|
Quest |
sfisque, do you know spring and hibernate? |
00:11 |
|
sfisque |
i know hibernate fairly well. i know enough spring to be dangerous :P |
00:11 |
|
Quest |
silly question though. we talked about spring last two days |
00:11 |
|
Quest |
hm. |
00:12 |
|
Quest |
I am in the middle of creating my first spring / hibernate classes |
00:14 |
|
Quest |
sfisque, going to ask something in a minut |
00:14 |
|
sfisque |
oh noes! |
00:14 |
|
* sfisque |
hides |
00:14 |
|
Quest |
lolz |
00:15 |
|
Quest |
its not complicated for a danerous |
00:15 |
|
Quest |
dangerious |
00:16 |
|
Quest |
sfisque, http://pastebin.com/KpCDp10D |
00:17 |
|
sfisque |
ok what's the ? |
00:18 |
|
sfisque |
i see the stubbed code |
00:18 |
|
Quest |
the question is... iam stuck. I dont know how to proceed. i read tutorials but somehow.. |
00:19 |
|
Quest |
sfisque, annotations are missing. ok, how to use factory.. well nevermind. how would you have done if you wrote the code. to work it 100 % |
00:19 |
|
sfisque |
in your UserDAO you need to get a Hibernate session, and you'll use that session to do db read/writes |
00:19 |
|
Quest |
wait |
00:19 |
|
sfisque |
since you're using spring, you can have spring inject it |
00:20 |
|
Quest |
sfisque, isnt hibernate session or quering in DAOs discouraged and should be done in Service classes? |
00:21 |
|
Quest |
isnt it advised to don't put @Transactional on your DAOs |
00:21 |
|
sfisque |
depends on how your doing your separation of concerns. in EE you'd be doing it ina session bean so you get a JTA boundary |
00:22 |
|
Quest |
generally, your service tier is where you define your transaction boundaries.? |
00:22 |
|
Quest |
a service method is typically a chunk of things that if all pass, commit otherwise fail and rollback |
00:23 |
|
Quest |
sfisque, nevermind. what next? |
00:23 |
|
sfisque |
right. but since you're not in EE, you get to decide where your boundary is. if you have a service object to handle the transaction, then what function is the DAO performing? (this is why EE doesnt bother with DAO objects) |
00:23 |
|
Quest |
hm |
00:24 |
|
Quest |
service might combine more than one dao and performs all in one go? |
00:24 |
|
Quest |
but for simle apps a only either dao or service might be needed |
00:24 |
|
sfisque |
i see, so the service is a facade for multiple data actors |
00:24 |
|
sfisque |
right |
00:25 |
|
Quest |
sfisque, any ways. how would you take it up? |
00:25 |
|
sfisque |
depends on what your'e trying to accomplish |
00:25 |
|
Quest |
sfisque, any ways. how would you take it up in this simple example. just consider both service and dao have to be used? |
00:25 |
|
sfisque |
depends on the problem. do i have to do a 2 phase commit? is the transaction on a single object? do i have to perform validation pre/post commit? |
00:26 |
|
Quest |
2 phase, single object as shown in the code. pre validation . yes. |
00:26 |
|
Quest |
to check if the creater is loged in. but that is hidden here |
00:26 |
|
Quest |
can be ignored for now |
00:27 |
|
sfisque |
do you want the write in the DAO? and if so, is there anything happening in the service that cares if the dao rolls back? |
00:27 |
|
Quest |
i would see a service as a collection of dao calls. ignore this case has only one call though. |
00:28 |
|
Quest |
so the service would just call the dao method. |
00:28 |
|
Quest |
in this very example |
00:28 |
|
Quest |
but the question is. my basic level code isnt correct and funtional |
00:28 |
|
Quest |
sfisque, i would like to call session factory in the service class though |
00:29 |
|
Quest |
I cant figure out how |
00:30 |
|
sfisque |
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/orm.html#orm-hibernate-straight |
00:31 |
|
sfisque |
you declare a SessionFactory, expose a mutator, and Spring injects it |
00:31 |
|
sfisque |
as long as spring has one configured |
00:32 |
|
Quest |
hm. it has opend session factory in dao. |
00:32 |
|
Quest |
i would do that in service. |
00:32 |
|
Quest |
then what to do in dao? |
00:32 |
|
Quest |
silly question |
00:33 |
|
Quest |
let me read that. first. |
00:33 |
|
sfisque |
granularity |
00:34 |
|
Quest |
sfisque, in a large app. what do you think. boundry be in service or in dao? |
00:36 |
|
sfisque |
service. if you're modeling a dao as a single table/view, then it should just be a payload object (entity in EE terms). if the DAO is something more versatile (small app) then you can put the xact that deep. in a real N-tier app, keep the DAO's as simple pojos and keep the r/w boundaries in the service layer |
00:42 |
|
sfisque |
id you keep your DAO object as a clean payload object you can float it between layers as a VO (until you reach a time when you need more granular VO's) |
00:42 |
|
sfisque |
**if |
00:43 |
|
Quest |
hm |
00:44 |
|
sfisque |
then you can use the DAO is an interchange object that converts a VO into a "persistable nugget" and vice versa |
00:44 |
|
sfisque |
**as a |
00:44 |
|
Quest |
i have entity classes seperate |
00:45 |
|
Quest |
those are for hibernate maping |
00:45 |
|
sfisque |
so in your example.. it appears the "users" object is a VO. so you would use the DAO to convert that into a "data representation" for the (entity) for the service to persist |
00:45 |
|
Quest |
those with @Entity things |
00:45 |
|
sfisque |
right |
00:45 |
|
Quest |
VO? |
00:45 |
|
sfisque |
or have you mapped the Users() object as an entity? |
00:45 |
|
sfisque |
value object |
00:45 |
|
sfisque |
pojo |
00:45 |
|
Quest |
i have a seperate Users class. that is an @entity |
00:46 |
|
sfisque |
aye. |
00:46 |
|
sfisque |
well, i hvaea to bounce. time to commute. |
00:46 |
|
sfisque |
code strong! |
01:25 |
|
|
crimsonfubot joined ##javaee |
01:29 |
|
|
grug joined ##javaee |
01:31 |
|
|
Maziz joined ##javaee |
01:36 |
|
|
pdurbin left ##javaee |
01:36 |
|
|
pdurbin joined ##javaee |
01:36 |
|
grug |
does this channel have a factoid bot? |
01:36 |
|
Quest |
it has a loggin bot |
01:36 |
|
pdurbin |
grug: nope. is that good or bad? ;) |
01:37 |
|
pdurbin |
Quest: and another bot I just added :) |
01:37 |
|
Quest |
oh. what does it do? |
01:37 |
|
grug |
pdurbin: factoid bots in developer channels are usually pretty helpful |
01:38 |
|
grug |
i.e. like the factoid bot in ##java |
01:39 |
|
Quest |
hm |
01:39 |
|
pdurbin |
some of the javabot factoids are quite useful |
01:39 |
|
Quest |
grug, you mean like ~Google something bots ? |
01:39 |
|
pdurbin |
crimsonfubot: google java ee |
01:39 |
|
crimsonfubot |
pdurbin: Java EE at a Glance - Oracle: <http://www.oracle.com/technetwork/java/javaee/>; Java Platform, Enterprise Edition (Java EE) Downloads: GlassFish ...: <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) |
01:40 |
|
pdurbin |
that's the longer version. you can also use `lucky` |
01:40 |
|
pdurbin |
crimsonfubot: lucky java ee |
01:40 |
|
crimsonfubot |
pdurbin: http://www.oracle.com/technetwork/java/javaee/ |
01:46 |
|
pdurbin |
I don't understand... I run `/msg chanserv deop ##javaee pdurbin` but I get "You are not authorized to perform this operation" |
01:46 |
|
|
_Tenchi_ joined ##javaee |
01:47 |
|
Quest |
hm |
01:47 |
|
Quest |
pdurbin, flags and privileges |
01:57 |
|
pdurbin |
Quest: what about them? do you have a solution for me? |
01:58 |
|
Quest |
pdurbin, private chat? |
01:58 |
|
Quest |
pdurbin, did you got my private message? |
02:00 |
|
Quest |
pdurbin, you there? |
02:01 |
|
pdurbin |
I'm reading "+o - Enables use of the op/deop commands" but when I type "/msg chanserv flags ##javaee pdurbin +o" I get the same "not authorized" error |
02:01 |
|
Quest |
you can op deop your self. |
02:01 |
|
pdurbin |
oh. that was easy. just "/deop" \o/ |
02:01 |
|
Quest |
can you op your self now? |
02:01 |
|
pdurbin |
nope |
02:01 |
|
pdurbin |
but that's ok |
02:02 |
|
Quest |
when you rejoin, you will get auto op |
02:02 |
|
grug |
why did you set mode +i |
02:02 |
|
pdurbin |
yeah, that's weird |
02:02 |
|
grug |
and +p |
02:02 |
|
pdurbin |
grug: who? me? I didn't change any flags |
02:02 |
|
pdurbin |
or modes or whatever |
02:02 |
|
Quest |
* pdurbin sets mode +p ##javaee |
02:02 |
|
Quest |
* pdurbin sets mode +r ##javaee |
02:02 |
|
Quest |
* pdurbin sets mode +i ##javaee |
02:03 |
|
pdurbin |
huh |
02:03 |
|
grug |
the channel is now invite only |
02:03 |
|
Quest |
lolz |
02:03 |
|
pdurbin |
that happened because I typed "/deop" ?!? |
02:04 |
|
pdurbin |
Quest: oh good. you're the op. you can fix everything :) |
02:06 |
|
Quest |
though I am not good with technology |
02:06 |
|
Quest |
pdurbin, do you know spring and hibernate? |
02:06 |
|
pdurbin |
nope. we use java ee and jpa |
02:06 |
|
Quest |
why not any framework? |
02:07 |
|
Quest |
pdurbin, what implementation of JPA? |
02:07 |
|
pdurbin |
eclipselink |
02:07 |
|
Quest |
hm.. |
02:07 |
|
Quest |
why not any framework? why just javaee |
02:07 |
|
pdurbin |
we use jsf. netbeans calls jsf a framework :) |
02:07 |
|
Quest |
am. ya. and it is too |
02:09 |
|
Quest |
pdurbin, dont you think componenet based frameworks get slow under heavy user load as compared to request/ response based frameworks. jsf vs spring |
02:10 |
|
pdurbin |
do they? I don't know |
02:10 |
|
Quest |
hm. ok |
02:10 |
|
Quest |
they do according to my research. abit |
02:11 |
|
pdurbin |
ok |
02:12 |
|
pdurbin |
I pretty much agree that Java EE is good enough: http://irclog.greptilian.com/javaee/2013-07-18#i_10585 ... I'm not compelled to try Spring... not yet anyway |
02:12 |
|
grug |
##java has some people who worked on writing sprint if you have any questions for them i'm sure they'd be happy to answer them |
02:13 |
|
Quest |
grug, are you inviting? |
02:15 |
|
grug |
could you please rephrase your question |
02:16 |
|
Quest |
grug, are you inviting to join ##java ? |
02:17 |
|
grug |
i was just saying that ##java has some spring devs in there that you could talk to |
02:27 |
|
grug |
i'm not sure how else you could interpret that |
02:27 |
|
Quest |
I was just checking your love with #java :) |
02:28 |
|
grug |
you're not really making much sense |
02:28 |
|
Quest |
yes. iam have a intelligence problem |
02:28 |
|
Quest |
iam a bit goof :) |
02:29 |
|
|
Xabster joined ##javaee |
02:30 |
|
grug |
i can tell |
02:32 |
|
|
grug was kicked by ChanServ: User is banned from this channel |
02:38 |
|
|
Xabster left ##javaee |
02:46 |
|
|
mshaw joined ##javaee |
02:46 |
|
|
mshaw was kicked by ChanServ: User is banned from this channel |
03:18 |
|
|
sfisque joined ##javaee |
03:18 |
|
|
sfisque1 joined ##javaee |
03:22 |
|
|
Topic for ##javaee is now Java (general & all kinds of) and Java Enterprise Edition (Java EE) discussion. | logs at http://irclog.greptilian.com/javaee/today |
04:30 |
|
|
ron joined ##javaee |
04:30 |
|
ron |
heh |
04:30 |
|
|
ron left ##javaee |
05:43 |
|
|
xll11 joined ##javaee |
06:33 |
|
|
mbc joined ##javaee |
07:29 |
|
|
sl33k joined ##javaee |
08:37 |
|
|
eutheria joined ##javaee |
10:07 |
|
pdurbin |
sfisque: you said you were curious about bots. I added crimsonfubot and all the config is here: https://github.com/pdurbin/greptilian-vagrant |
10:10 |
|
pdurbin |
sfisque: that's a Vagrant environment. since you like VirtualBox you might be familiar with Vagrant |
10:10 |
|
|
neuro_sys joined ##javaee |
10:21 |
|
|
sl33k joined ##javaee |
10:43 |
|
|
Maziz joined ##javaee |
12:09 |
|
|
Quest joined ##javaee |
12:31 |
|
pdurbin |
Quest: I have a question for you, when you have a moment |
12:32 |
|
Quest |
sure |
12:32 |
|
Quest |
I may reply with delays but i have moments pdurbin |
12:33 |
|
pdurbin |
Quest: a couple days ago you were kicked and banned from ##java. Then you revived this channel. Already you have kicked and banned three vistors to this channel. Is this correct? |
12:33 |
|
Quest |
correct |
12:33 |
|
pdurbin |
Quest: I find this very upsetting |
12:34 |
|
Quest |
yes, me too. |
12:34 |
|
Quest |
pdurbin, I was kicked from #java because of asking relevent (stupid as they say) questions |
12:35 |
|
Quest |
pdurbin, some people came here and got kicked because of abuse, and not asking tech releted questions |
12:35 |
|
Quest |
pdurbin, thats all I would say. and yes. it was upsetting for me too. |
12:36 |
|
pdurbin |
Quest: I think you are too quick to kick and ban people from this channel. |
12:37 |
|
Quest |
yes, I tolerate stupid questions those show eagerness to learn (i do that too) but abuse is not allowed here. as long as I am op. |
12:37 |
|
Quest |
let me show you some logs |
12:39 |
|
Quest |
pdurbin, I private mesaged you those |
12:40 |
|
Quest |
pdurbin, did you got them? |
12:40 |
|
pdurbin |
Quest: I would rather everyone see. The logs are public at http://irclog.greptilian.com/javaee anyway. I'd rather sort this out on a weekend when I have more time but I wanted to make my feelings clear. |
12:42 |
|
Quest |
pdurbin, i dont really care about them now. if they want to chat about java. they are welcomed. not otherwise |
12:42 |
|
pdurbin |
Quest: yes, let's focus on Java EE and not drama :) |
12:43 |
|
Quest |
agreed. |
12:46 |
|
pdurbin |
Quest: it's my understanding the hibernate supports JPA these days but there's an older non-JPA way of using hibernate as well. I'm curious which way you use hibernate. |
12:46 |
|
Quest |
jpa way |
12:46 |
|
Quest |
many reasons, |
12:47 |
|
Quest |
hibernate or any implimentor should follow JPA. it may introduce some specifics of its own though |
12:47 |
|
Quest |
but it should be compliant with jpa |
12:48 |
|
Quest |
2. if later on, you need to change the implimenter say from hibernate to some ther. you wont have to change much things. |
12:48 |
|
Quest |
pdurbin, getting buys,. see you laters |
12:48 |
|
Quest |
busy |
13:08 |
|
sl33k |
. |
13:53 |
|
|
kobain joined ##javaee |
13:57 |
|
|
Naros joined ##javaee |
13:59 |
|
pdurbin |
.. |
15:59 |
|
|
sfisque joined ##javaee |
17:10 |
|
|
noord joined ##javaee |
17:22 |
|
|
clevasseur_ joined ##javaee |
17:46 |
|
|
whartung joined ##javaee |
18:28 |
|
xll11 |
Hello guys! good evening |
18:28 |
|
sfisque |
greets |
18:29 |
|
pdurbin |
xll11: what's new? |
18:29 |
|
xll11 |
not much, got OOP exam monday |
18:29 |
|
xll11 |
but I don't really know what I should study, as I've been coding constantly lately |
18:29 |
|
whartung |
hope you don't oops your OOP exam |
18:30 |
|
xll11 |
me too :P |
18:30 |
|
sfisque |
exprience is the best teacher P |
18:30 |
|
whartung |
eh, coding and exams are different things. |
18:30 |
|
whartung |
"Explain arcane detail that you never use" |
18:31 |
|
whartung |
"List the properties of X, including the 3 you've completely forgotten about" |
18:31 |
|
xll11 |
yeah, its with open material tho, so I plan to print some good refrence stuff |
18:34 |
|
xll11 |
trying to commit my github changes |
18:34 |
|
xll11 |
so clumsy |
18:39 |
|
xll11 |
ah, finally |
18:39 |
|
xll11 |
https://github.com/nadav2051/diaryProject/tree/master/Diary |
18:39 |
|
xll11 |
there is my project! |
18:40 |
|
xll11 |
I've made an diary sort of thing, that takes password, and then you fill in text fields and it encrypts them |
18:40 |
|
xll11 |
sort of like diary |
18:41 |
|
xll11 |
saves them in a dat file, and use ObjectInputStream to read from that file each time a entry is called (entry is an entry objects, contains the text body encrypted in AES, the passkey in md5 digest, and the encryption key) |
18:41 |
|
xll11 |
if anyone has some suggestions/tips for approval it'll be much appreciate |
18:41 |
|
xll11 |
d |
18:41 |
|
sfisque |
storing the keys with the data seems like it defeats the purpose |
18:43 |
|
whartung |
feel free to suggest an alternative |
18:43 |
|
xll11 |
yeah, I do realize its a bad security design, and I've originally didn't include the key with the Entry object, but then I realized that remembering a AES key is long and clumsy, so I thought maybe I can store it on the object in a md5 digest, and have a user-chosen passkey, and when it recieves this passkey, it will return the aes key for the decryption |
18:44 |
|
xll11 |
tbh, when I built it, I didn't realize how complicated the security will be |
18:44 |
|
whartung |
welcome to the real world |
18:44 |
|
xll11 |
but also, keep in mind that it was intended for private use and the main point of entry would be to gain phsyical access to the computer then |
18:44 |
|
sfisque |
that's part of why it works. if security was easy, it would be easy to circumvent |
18:46 |
|
sfisque |
as an aside, since javadb is part of jdk and freely distributable, you can store your info in a db, that way you get extra functionality like jdbc, sql, etc. for doing interesing stuff like searching multiple records, etc. |
18:48 |
|
xll11 |
to work with JDBC, I need to install MySQL or other equilivant SQL server on my computer, right? |
18:48 |
|
whartung |
no, he just mentioned javadb which comes with the jdk |
18:48 |
|
whartung |
you can use that |
18:49 |
|
sfisque |
the only downside, you'd have to bundle the javadb jar with your "product" |
18:49 |
|
sfisque |
but it's not "that big" |
18:50 |
|
xll11 |
oh, thats pretty awesome |
18:50 |
|
xll11 |
I've been looking for a good way to store info into sqlish type of thingm |
18:50 |
|
xll11 |
for JTable application |
18:51 |
|
sfisque |
:-D |
18:51 |
|
xll11 |
On another note, for how long does this channel exists? |
18:51 |
|
sfisque |
until the thought police show up |
18:51 |
|
sfisque |
:P |
18:51 |
|
whartung |
it'll exist forever |
18:51 |
|
xll11 |
I'm usually at ##Java and I've never heard of this one untill someone started advertising it there |
18:51 |
|
whartung |
whether anyone shows up is a different issue |
18:52 |
|
* sfisque |
winks at whartung |
18:52 |
|
xll11 |
:P |
18:52 |
|
sfisque |
worse case, it'll be three of us, just kibbitzing |
18:52 |
|
xll11 |
it's pretty cool, very intimate |
18:53 |
|
sfisque |
well it IS focused, supposedly we're talking about JEE. though no one is going to poo poo if we wander or meander |
18:54 |
|
xll11 |
Ignorant question incoming - what's the difference between Java and Java EE? |
18:54 |
|
xll11 |
for instance I'm using the Eclipse Java EE but I just thought its just a Eclipse product name |
19:01 |
|
pdurbin |
crimsonfubot: lucky java ee wikipedia |
19:01 |
|
crimsonfubot |
pdurbin: http://en.wikipedia.org/wiki/Java_Platform,_Enterprise_Edition |
19:01 |
|
pdurbin |
xll11: ^^ |
19:08 |
|
sfisque |
java -> language; java ee -> specifications and frameworks that solve "common" enterprise problems (ACID, transactional boundaries, service bus, directory access, email, messaging, etc.) |
19:10 |
|
sfisque |
as for eclipse EE, just like netbeans EE, it's just the IDE bundled with enough bootstrap to develop an EE application (jdbc drivers, EE container, common libraries and frameworks (JSF, ORM providers, etc.) |
19:27 |
|
javanewb |
Quest was a banning machine yesterday, that seemed pretty poopoo |
20:05 |
|
sfisque |
aye, but in context, there was alot of rudeness on other people's parts too. we didn't need people logging into the channel with fake names that were inflammatory (one person logged in as "assgoblin" said something, and then bounced.... |
20:14 |
|
javanewb |
welcome to irc |
20:15 |
|
sfisque |
i know... i'm just saying that the banning frenzy in some ways was warranted |
20:19 |
|
pdurbin |
I'm optimistic... it'll be ok in the long run :) |
20:20 |
|
javanewb |
me too |
20:29 |
|
Quest |
sfisque, I dont want to put this http://pastebin.com/ZQd1YVxj in the dao. rather I want commit several small DAOs in a service method in ONE GO. (though in my example theres only one comit in DAO and In Servce class as the app is small) |
20:29 |
|
Quest |
sfisque, any solution? |
20:31 |
|
Quest |
javanewb, pdurbin sfisque i only concern technology chat. if some one is rude. he is out. I dont care anything else. theres no reason to get rude in _any case_ |
20:35 |
|
sfisque |
that's kind of messy. you basically saying you want the service to handle the tx, but the dao to handle the writes. you then have to put extra logic in your dao to 1) make sure you haev an active tx 2) create one is not 3) get the same session handle as the calling service 4) or pass it in, thus blurring you API |
20:36 |
|
sfisque |
i'd say if you need to do a complicated commit, then DAO is NOT the pattern to follow |
20:36 |
|
Quest |
yes |
20:36 |
|
Quest |
exactly |
20:36 |
|
Quest |
http://pastebin.com/McJynmfr |
20:37 |
|
Quest |
sfisque, everything you said is on the same page of mine. but words != code and that is the problem |
20:37 |
|
Quest |
i just dont want small dao comits |
20:37 |
|
sfisque |
so basically you'd need your service to do createTx; write( A ); write( B ); write( C ); commit(); forget the DAO calls and have the service do the heavy lifting inside the Tx boundaries |
20:37 |
|
sfisque |
basically, mimic wat EE does |
20:38 |
|
Quest |
http://pastebin.com/McJynmfr tells it all |
20:38 |
|
Quest |
sfisque, hm. ya |
20:39 |
|
Naros |
@sfisque: the DAO pattern can be abstracted to a generic dao that can be extended with entity-specific methods where necessary. |
20:39 |
|
crimsonfubot |
Naros: Error: "sfisque:" is not a valid command. |
20:39 |
|
Naros |
sfisque: the DAO pattern can be abstracted to a generic dao that can be extended with entity-specific methods where necessary. |
20:40 |
|
Naros |
but i agree, the transaction boundaries should be at the service tier where say "createUser()" is annotated with @Transactional |
20:40 |
|
Quest |
hm. now we are talking crimsonfubot |
20:40 |
|
Quest |
@ |
20:40 |
|
pdurbin |
Naros: sorry... bug in crimsonfubot. pull requests welcome! https://github.com/pdurbin/greptilian-vagrant/blob/master/modules/server1/files/home/supybot/crimsonfubot.conf :) |
20:40 |
|
sfisque |
right, but if you're doing anything "real world" (aka NOT the pet shop), where you're doing complex R/W on object graphs that are huge, dao is just going to be a handcuff |
20:41 |
|
Naros |
We use it in a large scale ERP application without issues. |
20:42 |
|
sfisque |
how many simultaneous users and how big are the data tables? |
20:42 |
|
Quest |
sfisque, very.... |
20:42 |
|
Quest |
sfisque, oh you were asking Naros . ok |
20:42 |
|
sfisque |
yes |
20:42 |
|
sfisque |
:-D |
20:43 |
|
Quest |
by the way Naros sfisque my app in futre would get 10000 userbase and 1500 concurent users |
20:43 |
|
Quest |
so iam pretty touchy at it |
20:43 |
|
Naros |
We have 3 web apps in the production cluster with some entities having upwards of 100+ columns and millions of rows. |
20:43 |
|
Quest |
Naros, is having 100 + columns a good DB design in the first place? |
20:44 |
|
sfisque |
depends |
20:44 |
|
Naros |
It depends on the data |
20:44 |
|
Quest |
Naros, doesnt it calls for normalization |
20:44 |
|
sfisque |
how big are the graphs? |
20:44 |
|
Quest |
oh. ya. the graphs might have huge columns |
20:44 |
|
sfisque |
no, i'm talking object graphs |
20:44 |
|
Naros |
When you ask how big are the graphs? Do you mean dependencies or number of unique entity pojos? |
20:45 |
|
Naros |
for example, the item pojo is related to hundreds of other pojos |
20:45 |
|
sfisque |
are we talking graphs that are purely top down and only several objects deep, or do we have LARGE graphs that intertwine |
20:45 |
|
Naros |
large graphs that intertwine |
20:46 |
|
sfisque |
well, somehow you've managed to get dao to scale then. my experience is dao has bad scalability issues. it's too granular and causes lots of issues when graphs get complex |
20:47 |
|
Naros |
If we run into corner cases where the DAO methods aren't ideal, we create custom DAO methods for those corner cases. |
20:47 |
|
sfisque |
ah |
20:49 |
|
|
Topic for ##javaee is now Java (general & all kinds of) and Java Enterprise Edition (Java EE) discussion. | logs at http://irclog.greptilian.com/javaee/today. We are a bit more friendly, you may keep silence as a response but you have no right to insult/abuse a person in any case. |
20:51 |
|
Quest |
sfisque, so how do you find to do in terms of code as you said. you basically saying you want the service to handle the tx, but the dao to handle the writes. you then have to put extra logic in your dao to 1) make sure you haev an active tx 2) create one is not 3) get the same session handle as the calling service 4) or pass it in, thus blurring you API |
20:51 |
|
Quest |
sfisque, have you coded similar things before? |
20:52 |
|
Naros |
Your DAOs are only accessed via service methods |
20:52 |
|
Quest |
yes. |
20:53 |
|
Naros |
that way, you dont have to worry about transactional boundaries, the service (business logic) dictate those |
20:53 |
|
Quest |
yes. |
20:54 |
|
sfisque |
how do you keep the DAO's from getting blurred when the graphs get complex |
20:56 |
|
Naros |
is that directed to me or Quest? |
20:56 |
|
Quest |
you of-course because my skill level is not that high yet |
20:56 |
|
Quest |
its just my passion that i think is high |
20:56 |
|
sfisque |
anyone. i've only seen DAO's become an obstacle once object graphs get "real world sized" |
20:58 |
|
Naros |
You mean like where I need to get a list of parts but I need to load additional child collections and such for the view? |
20:59 |
|
sfisque |
reads are easy to partition, i'm more thinking selective writes when you have N -> M -> 1 -> X -> Y where the variables are collections of object an 1 is a single instance |
21:00 |
|
sfisque |
where the decision to write one of the M's depends on data in an X (or the end result of writing an X) |
21:01 |
|
javanewb |
properly done DAOs work quite nice in real world apps |
21:01 |
|
Naros |
wouldn't that depend on the relationships between N, M, 1, X, and Y as to which gets committed and cascades to children? |
21:01 |
|
Quest |
got to leave. |
21:01 |
|
Quest |
javanewb, what are properly done daos? |
21:01 |
|
Naros |
Quest: ok. just trying to get spring to play nice. you be around later or this weekend? |
21:01 |
|
Quest |
javanewb, any specific thing you mean by that? |
21:01 |
|
javanewb |
I've seen lots of DAOs designed by those that obviously had no idea what they were doing |
21:02 |
|
Quest |
Naros, no no. I will be back in 20 |
21:02 |
|
Naros |
ok |
21:02 |
|
sfisque |
not just relationship, also business rules. and yes javanewb, anything done properly works well. i'm just saying i've seen DAO-based stuff have issues when the project size scales up |
21:02 |
|
javanewb |
there's so many ways to do it wrong |
21:02 |
|
Quest |
Naros, but the code i was talking about is the bottleneck. I need it to work in order to proceed. as soon as possible |
21:02 |
|
javanewb |
no, not if it's done right |
21:02 |
|
javanewb |
we've done some that are scaling quite large |
21:02 |
|
Quest |
javanewb, hm |
21:02 |
|
whartung |
the dirty secret of Java Enterprise programming is that it's not OO at all, it's more Services. |
21:02 |
|
javanewb |
as in 1000s of transactions a sec |
21:03 |
|
sfisque |
i'd argue it's not either / or , but both |
21:03 |
|
whartung |
at the 30K foot level, the OOness pretty much falls out. |
21:03 |
|
Quest |
whartung, I see world shifting from OO to patterns and frameworks. and basic Java stays underneath. |
21:03 |
|
sfisque |
you need separation of concerns and good "object layout" but you also have to keep performance foremost in mind |
21:04 |
|
sfisque |
well yah but at 30k foot, all of the tech falls out |
21:04 |
|
sfisque |
at 30k foot you can be doing it in perl or C# |
21:04 |
|
sfisque |
or with monkeys and adding machines :P |
21:06 |
|
whartung |
the rich object domain modeling just doesn't work very well, it's all pushing models through layers. |
21:18 |
|
sfisque |
aye. i've had to "re-educate" much of the team i'm on to use <Tuple> queries when we need to "ask focused questions" rather than just loading graphs and "hoping for good performance" |
21:19 |
|
whartung |
right, exactly |
21:19 |
|
sfisque |
but doing things like that can cause dao constructs to get blurry real fast |
21:19 |
|
whartung |
but also, you don't put persistence logic in to your entities either. |
21:19 |
|
whartung |
JPA mucks with it a bit with lazy loading... |
21:20 |
|
sfisque |
yah, don't get me started. i had to reverse engineer an entire entity line here. they were injecting the EM into the entities. made my eyeballs twitch |
21:21 |
|
whartung |
haha |
21:21 |
|
whartung |
yea..no…uhuh |
21:21 |
|
Naros |
sfisque: ouch |
21:21 |
|
sfisque |
yah. ive spent 18 months here just fixing "bad judgement calls". havent coded anything fresh in ages |
21:22 |
|
|
Maziz joined ##javaee |
21:27 |
|
Naros |
I've found putting some persistence logic in the entity isn't necessarily bad. |
21:27 |
|
Naros |
for example, using @PreInsert and @PreUpdate constructs |
21:27 |
|
whartung |
but you can readily put those in a support class, and not the entity itself |
21:27 |
|
Naros |
setting things like who created/updated the entity and the creation/last update dates |
21:27 |
|
whartung |
and that's not so bad since they can't be used outside of the scope of the EM anyway |
21:28 |
|
sfisque |
aye but those are purely structural. you're forbidden to anything with the EM in those interceptors |
21:29 |
|
Naros |
Right but in the case I mentioned, there is no need to interact with the EM |
21:29 |
|
sfisque |
aye. that's exactly what they were intended for. |
21:29 |
|
Naros |
I think it's just important to clarify that having some logic in entities is OK. |
21:29 |
|
Naros |
Even some @Transient methods |
21:30 |
|
Naros |
But that logic varies on a case-by-case basis |
21:30 |
|
sfisque |
yah. as long as it's structural it should be fine. when the entity starts getting coupled to objects that are not directly referencable in the graph, bad things start to crop up.. like weeds in a sidewalk |
21:31 |
|
Naros |
No doubt |
21:32 |
|
Naros |
But I've seen the argument for rich domain objects before where the EM is injected into the entity with all the persistence logic exposed via the entity. |
21:32 |
|
Naros |
In some applications, that might be acceptable. But in the case where the entity is your model, I tend to disagree. |
21:34 |
|
sfisque |
yah. then you start seeing all sorts of bad stuff (like web tier making db calls by invoking entity methods with an EM injected.) F U N! |
21:35 |
|
sfisque |
at that point, you just suggest going to raw scriptlets and who cares about any type of boundaries :P |
21:37 |
|
xll11 |
do you guys find annotations useful? |
21:37 |
|
xll11 |
still haven't figure where it would be a good fit |
21:37 |
|
sfisque |
i once had an interviewer say "in our product (running in JBoss) we spawn threads to solve some problems... can you tell me why we might do that...", i just looked at him kind of shocked, and said, "i could ask you the same question.. " :P |
21:37 |
|
sfisque |
do you love XML? |
21:37 |
|
sfisque |
xll11: do you love xml? |
21:38 |
|
sfisque |
or are you asking about "custom" annotations? |
21:39 |
|
sfisque |
because in EE, anotations save you from having to write oodles of configuration xml |
21:39 |
|
xll11 |
custom annotations |
21:39 |
|
xll11 |
ah,. I still havent had the pleasure of working with xml |
21:40 |
|
sfisque |
they can be good when you want to "soft code" stuff like custom ordering of objects in a collection, or marking objects as interested/ignoring some form of functionality |
21:40 |
|
whartung |
lol sfisque |
21:42 |
|
sfisque |
whartung: i assume that in reference to the threading? |
21:42 |
|
whartung |
yea |
21:42 |
|
sfisque |
yah. needless to say, i didnt get that job :P |
21:42 |
|
sfisque |
i'm kind of thankful |
21:43 |
|
whartung |
:) |
21:43 |
|
Naros |
sfisque: i dislike the fact we have spawned threads in ours for some long running crap |
21:44 |
|
Naros |
ive been pushing to offline that junk to another application for months now, finally got the go ahead from management to do it once we've got certain milestones completed. |
21:44 |
|
sfisque |
they didn't like the idea of asking the container for a worker thread from the pool? |
21:45 |
|
Naros |
Im more concerned about these tasks that cause the web container's JVM to `OOM' |
21:45 |
|
sfisque |
ouch |
21:45 |
|
sfisque |
yah, that production systems frown on OOM :P |
21:45 |
|
Naros |
I'd rather have some offline app cause the JVM to crash and still save face with the user community. |
21:46 |
|
Naros |
For some reason, they want to enable users to export to excel large volumes of data through a web interface |
21:47 |
|
sfisque |
not a strange request, but definitely something that should run "offline" |
21:47 |
|
sfisque |
or at the very least have the process in a separate container from the web tier so you get fault tolerance |
21:47 |
|
Naros |
Originally the request blocked while it wrote the file, then streamed the file to the client. That got moved to a background worker thread system. |
21:48 |
|
sfisque |
yah i was very happy when @Asynch was added |
21:48 |
|
Naros |
precisely. |
21:48 |
|
sfisque |
we have an upload facility that did that, until i made it thread safe moved it all to an @Asynch process. hey, lets lock the container while i upload this 100k line csv file :P |
21:49 |
|
Naros |
yep, that's still one area on my todo list for uploads. |
21:49 |
|
Naros |
but generally uploads aren't too bad for us and rarely used, but the data export feature we a hot ticket. |
21:49 |
|
Naros |
*was |
21:50 |
|
sfisque |
i discovered a nice "feature" in CDI when i moved our upload. when you're in an @Asynch method, there's no CDI context, so you get lots of lovely NPE's. wooweee... that was fun! |
21:51 |
|
sfisque |
at least not in the reference impl. dunno if other containers have the same issue |
21:52 |
|
Naros |
hehe |
21:53 |
|
Naros |
anyone here know Quest's email addy and can pm it to me? I want to send him this zip of a simple project before I leave for the day. |
21:53 |
|
sfisque |
one sec, i migh be able to get it off of stack overflow |
21:53 |
|
Naros |
k |
21:59 |
|
Naros |
i couldn't locate it on stack overflow myself |
22:00 |
|
pdurbin |
he'll be back |
22:00 |
|
Naros |
any idea when, only because it's end of day for me :P |
22:00 |
|
* pdurbin |
assumes he's a he :) |
22:00 |
|
pdurbin |
Naros: maybe he'll check the channel logs |
22:03 |
|
Naros |
ok: just let Quest know I'll try to be back in an hour or so |
22:04 |
|
sfisque |
yah i cant find his em addy on stack overflow |
22:06 |
|
sfisque |
well, i'm going to bounch. time for this lazy developer to start his weekend |
22:06 |
|
sfisque |
code strong! |
22:06 |
|
|
Quest joined ##javaee |
22:30 |
|
|
pr3d4t0r joined ##javaee |
22:30 |
|
|
pr3d4t0r left ##javaee |
22:43 |
|
|
Naros_ joined ##javaee |
22:54 |
|
|
Mujabe joined ##javaee |
22:54 |
|
|
sfisque joined ##javaee |
22:56 |
|
|
sfisque1 joined ##javaee |
22:57 |
|
sfisque1 |
quest, did anyone alert u to naros' request for an email so he can send you something? |
22:57 |
|
Quest |
its done. sfisque thanks :) |
22:57 |
|
Quest |
we are in contact |
22:57 |
|
sfisque1 |
coolio |
23:35 |
|
|
palomer joined ##javaee |
23:54 |
|
Quest |
i was in a bliss when i came to know that db management can be done by hibernate like things. writing queries and foloing tables and columns is not a cool thing |
23:54 |
|
Quest |
Naros_, ^ |
23:55 |
|
Naros_ |
right, but just be careful to understand that creating tables and maintaining their structure, foreign key relationships, etc are not ideal to let hibernate manage. Meaning, don't use the generateDdl=true stuff and expect it to always work |
23:55 |
|
Quest |
yes.. |
23:55 |
|
Naros_ |
creating migration scripts, etc is the right avenue when it comes to table change propagation through various envs. |
23:56 |
|
Quest |
but the general job of persistance is done greate by hibernate. many features like cache and smart detection when to use a connection and when to not. |
23:56 |
|
Naros_ |
Yep, that's precisely what its designed for |
23:56 |
|
Quest |
mapping and following the entities. auto relation creation/ well easy creation i should say |
23:57 |
|
Quest |
Naros_, do others JPA providers do similar and same in effieciency? |
23:57 |
|
Naros_ |
what do you mean auto-relation creation? You mean when you inserting parent/child records? |
23:57 |
|
Quest |
Naros_, how many have you used up? |
23:57 |
|
Naros_ |
I've used Toplink and Hibernate in the past and they are similiar. |
23:57 |
|
Quest |
Naros_, things like @ManyTOMany |
23:57 |
|
Naros_ |
Gotcha. |
23:57 |
|
Quest |
or embedings . lists . etc. so you dont have to trace all by damn queries...... |
23:58 |
|
Quest |
lots of coding hours saved... |
23:58 |
|
Quest |
you only get the idea of such frameworks once. learn them. then you make zillion apps in short time. |
23:58 |
|
Quest |
I kinda liking it. |
23:59 |
|
Quest |
Naros_, how many have you used up that do persistance? |
23:59 |
|
Naros_ |
i dont follow your question? |