Time |
S |
Nick |
Message |
00:05 |
|
pdurbin |
fortran is still used in scientific computing |
00:10 |
|
sfisque |
aye. i'm guessing though, it's more to produce high performance libraries that are then consumed by other languages (C, java, C++, etc.) |
00:11 |
|
sfisque |
i can only imagine what making a corba call woudl look like in fortran … /shiver |
00:11 |
|
pdurbin |
I dunno... I'm pretty sure a lot of astronomers write straight up Fortran |
00:12 |
|
sfisque |
yah, if you're doing straight numerical processing, it wouldnt be bad |
00:13 |
|
sfisque |
i'm just thinking you wouldnt want to write a fortran program that existed in a fabric somewhere. you'd want a library to do the heavy lifting and wrap it in some other langauge that was good for "the other stuff" |
00:14 |
|
pdurbin |
certainly that's the Perl way. wrap that C library |
00:15 |
|
sfisque |
java too. i've worked on products that made JNI calls |
00:15 |
|
sfisque |
java is great but there are other languages that are better at certain things |
00:16 |
|
pdurbin |
what C libraries does Java commonly wrap? |
00:16 |
|
sfisque |
any low level networks (icmp, etc.) |
00:16 |
|
sfisque |
***networking |
00:16 |
|
sfisque |
direct serial i/0 |
00:17 |
|
sfisque |
on macos, preX, you could bind to the quicktime libs to do multi-media |
00:21 |
|
pdurbin |
hmm. ok. I'm just saying a C library like discount (parses Markdown) and someone will write a Perl XS module to wrap it. or Ruby (rdiscount). not sure how much this is done in Java |
00:22 |
|
pdurbin |
instead someone will write Markdown4j |
00:22 |
|
sfisque |
you build a "native stub" in java and on the C side you compile against a lib and some .h files |
00:22 |
|
sfisque |
its VERY similar to doing corba |
00:22 |
|
sfisque |
except you're talking to a library and not a remote container |
00:23 |
|
sfisque |
ooph, it's late. gotta run. this was a fun chat today, thx all. code strong! |
03:22 |
|
|
sfisque joined ##javaee |
04:40 |
|
|
dangertools joined ##javaee |
04:40 |
|
|
dangertools joined ##javaee |
05:05 |
|
sfisque |
whartung you around? |
05:28 |
|
|
scripty joined ##javaee |
06:20 |
|
scripty |
Does your program execute as you intead to without using synchronied |
06:24 |
|
|
Fubar^ joined ##javaee |
06:25 |
|
scripty |
???? |
06:25 |
|
scripty |
Anyone |
06:28 |
|
scripty |
pdurbin |
06:29 |
|
Fubar^ |
what did you ask? |
06:30 |
|
scripty |
Does your program execute as you intead to without using synchronied |
06:32 |
|
Fubar^ |
my program? |
06:35 |
|
scripty |
Any program more generally you use all the time synchronized or rarely as per required |
06:35 |
|
Fubar^ |
I use it when i need to |
06:37 |
|
scripty |
why not always ? |
06:38 |
|
scripty |
Does this means you know which thread gets executed ? |
06:39 |
|
* scripty |
says in his head i'm soo stupid to use 1.4 :P when will i see 1.5 haha |
06:43 |
|
Fubar^ |
If i would use it always i would have no concurrency |
06:50 |
|
scripty |
so what you do |
06:53 |
|
scripty |
i guess MAGIC |
06:55 |
|
Fubar^ |
I know what my code does and how it's supposed to be used. So i know if it needs to be synchronized |
06:57 |
|
scripty |
how it does ? |
07:12 |
|
|
AlexCzar joined ##javaee |
07:17 |
|
Fubar^ |
I'm not sure what you want to know |
07:39 |
|
scripty |
Do you know how concurrency works ? |
07:50 |
|
Fubar^ |
yes |
07:51 |
|
scripty |
how ? |
07:52 |
|
Fubar^ |
If you ask something more specific i might be able to answer :) |
07:55 |
|
scripty |
That means things are Magic |
07:57 |
|
scripty |
lets take an example i have 2 methods shout() and drag() , calling drag method first then later shout , does the program goes inorder or not ? |
08:29 |
|
Fubar^ |
if they are called from the same thread they are in order |
08:30 |
|
scripty |
so its unsure. |
08:31 |
|
scripty |
Well you mentioned "<Fubar^> I know what my code does and how it's supposed to be used. So i know if it needs to be synchronized" |
08:31 |
|
Fubar^ |
yes? |
08:32 |
|
scripty |
so you know which thread executed in order ? |
08:33 |
|
Fubar^ |
I know that if its executed from different threads it's not ordered. So if i need it to be ordered in that circumstance i need to use some kind of locking |
08:34 |
|
scripty |
Your statement claims to me that you have noidea how concurrency works and things happens magically ... Like it. |
08:36 |
|
Fubar^ |
there is no magic involved and I dont think i insinuated that there is any |
08:39 |
|
Fubar^ |
If what you mean by "noidea how concurrency works" is that i can't tell you which order the methods would be called in. The reason is because the order isn't deterministic |
08:40 |
|
scripty |
You said i wont use synchronized for all since you wont get concurrency and later example you gave a uncertanity(propability) and still you use such code and claim things work fine. |
08:40 |
|
scripty |
probability* |
08:41 |
|
Fubar^ |
If my code is thread safe without synchronizing why wouldn't it work fine? |
08:42 |
|
Fubar^ |
It's also alright to have not thread safe code as long as it's documented |
08:42 |
|
scripty |
so how you make thread safe |
08:42 |
|
scripty |
? |
08:42 |
|
Fubar^ |
It depends on what i'm trying to do |
08:43 |
|
scripty |
can you give some example |
08:43 |
|
Fubar^ |
Take java.lang.String for example. No methods are synchronized but it's completely thread-safe |
08:44 |
|
scripty |
how about java.lang.Math and StrictMath |
08:45 |
|
scripty |
String are constants |
08:46 |
|
Fubar^ |
You mean that String is immutable, and yes that is a way to make classes thread-safe |
08:47 |
|
Fubar^ |
Math doesn't have state or side-effects so it's thread safe |
08:50 |
|
scripty |
how about in bussiness layer |
08:50 |
|
scripty |
business* |
08:51 |
|
Fubar^ |
It depends |
08:51 |
|
scripty |
like ? |
08:51 |
|
scripty |
Hae you used synchronized in that layer often ? |
08:51 |
|
scripty |
Have* |
08:51 |
|
Fubar^ |
Sometimes |
08:52 |
|
Fubar^ |
I know these arent the answers you are looking for but your questions are to general |
11:05 |
|
|
MegaMatt joined ##javaee |
12:08 |
|
|
milojaden joined ##javaee |
12:40 |
|
|
milojaden joined ##javaee |
12:54 |
|
|
tommmied1 joined ##javaee |
13:12 |
|
balazare |
Has anybody here integrated JNI code into a EE component or app? |
13:23 |
|
pdurbin |
balazare: sfisque maybe: http://irclog.greptilian.com/javaee/2013-10-18#i_32029 |
13:27 |
|
balazare |
pdurbin: funny, didn't see that we had that subject today :) |
13:29 |
|
balazare |
pdurbin: I am trying to figure out a sensible way to some jni into an ee environment. |
13:31 |
|
pdurbin |
balazare: any usefuls docs on it? |
13:33 |
|
balazare |
pdurbin: it is some code I wrote a long time ago, and now I need it in another project |
13:33 |
|
balazare |
pdurbin: not too much doc: https://github.com/umeding/isomorphism |
13:33 |
|
|
Naros joined ##javaee |
13:34 |
|
pdurbin |
balazare: oh, you're in Boston too |
13:34 |
|
balazare |
pdurbin: yep :) you too? |
13:35 |
|
pdurbin |
yep: http://people.iq.harvard.edu/~pdurbin |
13:35 |
|
balazare |
pdurbin: neat! I am little west in Natick |
13:37 |
|
pdurbin |
I think I've been to the scrub a dub out there |
13:37 |
|
|
Naros joined ##javaee |
13:37 |
|
balazare |
pdurbin: that pretty close! |
13:38 |
|
balazare |
pdurbin: data verse looks like a great project |
13:38 |
|
|
Naros joined ##javaee |
13:39 |
|
pdurbin |
pull requests welcome! I just updated our dev guide to reflect the change from ant to maven: https://github.com/IQSS/dvn/blob/develop/doc/sphinx/source/dataverse-developer-main.rst :) |
13:40 |
|
pdurbin |
seems like our app runs on EE 7 so I'm hoping we can move to that soon. some tweaks required first |
13:42 |
|
pdurbin |
says a guy on our team |
13:44 |
|
|
Naros joined ##javaee |
13:47 |
|
balazare |
pdurbin: have you tried it in GF4? |
13:48 |
|
balazare |
pdurbin: I moved all of my stuff with little trouble |
13:56 |
|
pdurbin |
balazare: cool. no, but the guy who did should walk in the door any minute |
13:57 |
|
pdurbin |
actually, he said it runs fine as a java ee 6 app on glassfish 4. he's tweaking the pom file to make it a java ee 7 app, from what I understand |
13:58 |
|
balazare |
pdurbin: ah ok, that'll work |
13:58 |
|
|
kobain joined ##javaee |
14:01 |
|
sfisque |
balazare you would have to do it in a JCA because since you're leaving the jvm, you'll need specialized transaction boundary management |
14:01 |
|
sfisque |
most likely XA transactions |
14:04 |
|
balazare |
sfisque: I need to look at JCA and see what is involved. Another idea I had was to create a Corba wrapper and integrate that |
14:05 |
|
sfisque |
aye, you could do RMI-IIOP then |
14:05 |
|
balazare |
sfisque: yes, that would work too |
14:06 |
|
sfisque |
same solution. corba on remote side, rmi-iiop on client (ee) side |
14:06 |
|
|
tommmied joined ##javaee |
14:07 |
|
balazare |
sfisque: have you used JCA? |
14:12 |
|
balazare |
sfisque: looks straightforward enough, not sure yet if it makes sense to shoehorn my JNI into a DataSource paradigm - I need to think about that |
14:13 |
|
sfisque |
most who have written ee has 'used' jca. JMS and most jdbc drivers are jca adapters |
14:13 |
|
sfisque |
i have written a jca adapter on 2 occasions. it's not trivial, but approachable |
14:14 |
|
sfisque |
even if you go the corba/iiop route, you'll still need to investigate your transaction profile, since you might need xa transactions, depending on what the external lib is doing |
14:17 |
|
balazare |
sfisque: that's true, luckily my JNI is only processing, there are no transactions |
14:17 |
|
sfisque |
that definitely simplifies it a bit |
14:18 |
|
balazare |
sfisque: I need to manage the object lifecycle though, the JNI takes cues from the JVM to manage its memory |
14:19 |
|
sfisque |
by manage are you meaning "respond to callbacks" or "actively monitor"? |
14:20 |
|
balazare |
balazare: respond to callbacks |
14:21 |
|
sfisque |
how are the callbacks going to propogate into the container (assuming an ejb is responding) |
14:23 |
|
balazare |
sfisque: good question, I am not sure yet, I had it running as a simple Java app in the past |
14:23 |
|
balazare |
sfisque: the main hook is the call to the finalizer |
14:24 |
|
sfisque |
also, do you anticipate launching an indeterminate number of these from the container or are you going to have a synchronized queue of some form that runs through a conduit? |
14:25 |
|
sfisque |
you don't necessarily need to know right now, but i ask these questions because they will be/are important to the design |
14:27 |
|
balazare |
sfisque: TY good questions, I don't think the app will get "hammered" it is an occasional low usage |
14:28 |
|
balazare |
sfisque: it could be a one after each processing - I don't see them running more than once every few days |
14:28 |
|
|
scripty joined ##javaee |
14:41 |
|
sfisque |
oh, then you can probably get away with an @Singleton which will simplify the design quite a bit |
14:42 |
|
sfisque |
mark the methods as non transactional, so you can "fire and forget", and you should be ok |
14:46 |
|
balazare |
balazare: you are right that will do the trick, then I can push the ejb in its own container and run it where ever I want |
14:49 |
|
balazare |
sfisque: you are right that will do the trick, then I can push the ejb in its own container and run it where ever I want |
14:51 |
|
sfisque |
the other option i see, would be instead of @Singleton, do a @Stateless and mark the method as @Asynch so its completely decoupled from any other processing that java side is doing. that would make it really fire and forget |
14:51 |
|
sfisque |
unless yiou need a "session" to report errors back to, then forget what i just said :-) |
14:57 |
|
|
Quest joined ##javaee |
15:22 |
|
|
kobain_ joined ##javaee |
15:22 |
|
|
kobain_ joined ##javaee |
15:23 |
|
|
kobain_ joined ##javaee |
15:23 |
|
|
Guest90944 joined ##javaee |
15:27 |
|
pdurbin |
god I love http://testshib.org |
15:32 |
|
MegaMatt |
That does seem really handy, pdurbin |
15:44 |
|
pdurbin |
MegaMatt: you can see the IdP logs in real time. But don't add any noise to them right now, please :) |
15:44 |
|
MegaMatt |
Oh, I'm not going to test anything atm, - but I will bookmark it for later ;) |
15:47 |
|
pdurbin |
MegaMatt: you should join ##shibboleth: http://irclog.perlgeek.de/shibboleth/2013-10-18 |
15:48 |
|
MegaMatt |
Probably, considering how much I need to learn ... |
15:48 |
|
MegaMatt |
Ok, You've convinced me. |
15:49 |
|
MegaMatt |
I see the noise ratio there will not be high ;) |
15:52 |
|
pdurbin |
no kidding |
15:54 |
|
whartung |
sfisque: sup |
15:54 |
|
whartung |
(hi all) |
15:55 |
|
whartung |
success pdurbin ? |
15:56 |
|
pdurbin |
whartung: baby steps |
15:56 |
|
whartung |
cool |
16:01 |
|
pdurbin |
whartung: still playing with the OIOSAML demo app: https://docs.google.com/document/d/1PCutRX-k4ih80uoXBqSuOK6GVKmTXUPahTGXDhue5Wk/edit?usp=sharing |
16:02 |
|
whartung |
nice |
16:02 |
|
pdurbin |
not sure how to get the "perform attribute query" thing to go |
16:03 |
|
whartung |
can't really even say what that does |
16:11 |
|
sfisque |
heya |
16:11 |
|
whartung |
o/ |
16:12 |
|
sfisque |
so whartung you got any good recommendations for a forth tutorial. i'm at least curious enough to write a hello world program and see where i go from there |
16:13 |
|
whartung |
http://www.forth.com/starting-forth/ |
16:13 |
|
whartung |
and then http://thinking-forth.sourceforge.net/ |
16:14 |
|
sfisque |
excellent. thx. when i googled i didnt find anything approachable as far as tutorials go. hence my solicitation of a recommendation :-) |
16:17 |
|
sfisque |
anywho, packing up. ttyas! and code strong! |
16:17 |
|
whartung |
\o |
16:23 |
|
* scripty |
listening to Music |
16:23 |
|
* whartung |
listening to Voices |
16:29 |
|
|
scripty joined ##javaee |
16:30 |
|
whartung |
scripty: Your evil twin is listening to your records... |
17:10 |
|
Quest |
sess, Naros appologies I mixed up something we talked earlier, If i want to delete an Entity which may have many child entities of which it is a parent, whats the best way to delete them all? like deleting directory and file tree. e.g a Box entity has many childBoxList(s) in it. ? |
17:12 |
|
Naros |
Quest, look up orphanRemoval |
17:12 |
|
Quest |
hm |
17:13 |
|
Naros |
http://docs.oracle.com/cd/E19798-01/821-1841/giqxy/index.html |
17:13 |
|
Quest |
ok |
17:15 |
|
Quest |
Naros, orphan removal is valid for one-to-one or one-to-many . not manytomany? |
17:16 |
|
Naros |
programatically :P |
17:16 |
|
Naros |
yes, it doesn't work for ManyToMany |
17:16 |
|
Naros |
Only where single cardinality exists on the source |
17:16 |
|
Quest |
the doc only wrote about one-to-one or one-to-many |
17:16 |
|
Naros |
basically OneToOne and OneToMany permit this |
17:16 |
|
Quest |
hm |
17:17 |
|
Quest |
ok. so I just make it true and delete the parent in normal way. it will auto check and delete the children? |
17:17 |
|
Naros |
Now, I can't recall specifically, but I do believe Hibernate offers a M:M orphan concept |
17:17 |
|
whartung |
you can also cascade at the DB level |
17:17 |
|
Naros |
but its provider specific. |
17:19 |
|
Naros |
Just remove the child from the list. At that point it is considered orphaned and JPA will do its job |
17:19 |
|
Quest |
hm. what if i also needed same functionality for ManyToMany? |
17:19 |
|
Quest |
whartung, cascade? you mean delete manual recursive? |
17:20 |
|
Quest |
Naros, what do you mean by "Just remove the child from the list."? |
17:20 |
|
whartung |
entity.children.remove(child) |
17:20 |
|
whartung |
you can add ON CASCADE DELETE to the foreign key definition in the database |
17:21 |
|
Naros |
the above statement implies that the child has been orphaned when the parent no longer "wants" it. |
17:22 |
|
Naros |
For ManyToMany, you simply alter who manages the relationship and merge it back to the datastore. |
17:22 |
|
Naros |
user.getRoles().remove(role1); |
17:22 |
|
Naros |
user.getRoles().remove(role2); |
17:22 |
|
Naros |
em.merge(user); |
17:23 |
|
Naros |
We rarely use M:M here |
17:23 |
|
Naros |
I believe using CascadeType.ALL is necessary here, right whartung? |
17:24 |
|
whartung |
well, at least CascadeType.DELETE |
17:24 |
|
Naros |
True |
17:25 |
|
Naros |
actually, that should be REMOVE i thinks |
17:25 |
|
Quest |
talking to some other guys in #hibernate. they say contrary to well if i have put orphanRemoval="true" on the parent. and i do entityManager.remove(parent); , hibernate will auto delete ALL of its children and subchildren recursively? |
17:26 |
|
Naros |
Absolutely. It's like, as morbid as it sounds, parent dies in car crash, children no longer have mommy & daddy. |
17:26 |
|
|
tommmied1 joined ##javaee |
17:27 |
|
Naros |
Isn't that what you want, removing parent = all children deleted too? |
17:27 |
|
Naros |
there is a hierarchy here, yes? |
17:28 |
|
Quest |
yes |
17:33 |
|
Quest |
Naros, if the parent of an entity goes null or is deleted. its orphaned and it will be deleted as well. and then it itself if had any children, those will be deleted as well. so we are good with orphan removal |
17:34 |
|
Naros |
What Steve was recommending was to use the cascade=CascadeType.XXXX part of the mapping parameters. |
17:35 |
|
Quest |
why ? and whos steve |
17:35 |
|
Naros |
sebersole is steve :) |
17:35 |
|
Quest |
yup |
17:36 |
|
|
sebersole joined ##javaee |
17:36 |
|
Naros |
What he was trying to explain was the difference between orphaning and cascading. |
17:36 |
|
Quest |
hm.. |
17:37 |
|
Quest |
cascading will just blindly delte the children. (even if the child had some other parent or reference) |
17:37 |
|
Naros |
If you remove a child from a parent collection, it is orphaned. So what do you want to happen in that situation. |
17:37 |
|
Quest |
Naros, true ? |
17:38 |
|
Quest |
if true, then orphan thing wil suit me more than cascade |
17:38 |
|
sebersole |
Quest: thats only practically a question in many-to-many |
17:38 |
|
Quest |
sebersole, hm.. true again |
17:38 |
|
sebersole |
in 1-1 or 1-m there is no " some other parent " |
17:38 |
|
Naros |
if I delete the parent entity and want children to be deleted too, cascade handles that. |
17:39 |
|
Naros |
if I want to remove a child from a collection and have JPA clean it up, orphanRemoval handles that |
17:39 |
|
sebersole |
they are completly different use cases |
17:39 |
|
sebersole |
an entity normally defines its own lifecycle |
17:39 |
|
sebersole |
orphanRemoval changes that semantic |
17:40 |
|
sebersole |
and says, "no, actually this things lifecycle is completely dependent on that other thing" |
17:40 |
|
Quest |
well shortly, whats the diff b/w orphan and cascade. cascade just go recursive and deletes all children and children of those children while orphan watches if a child's parent is ==null or removed. it deletes the child. it also goes recurse. so basicaly they both are same? |
17:41 |
|
Naros |
Who said orphan removal was recursive? |
17:41 |
|
sebersole |
i really dont understand what is so hard to understand here |
17:41 |
|
sebersole |
well neither is cascade ;) |
17:41 |
|
Quest |
Naros> if I want to remove a child from a collection and have JPA clean it up, orphanRemoval handles that ? clean it up? the child is already deleted. why clean up |
17:41 |
|
sebersole |
they each are defined association by association |
17:42 |
|
Naros |
Your use case Quest is "entity.getChildren().remove(child);" |
17:42 |
|
Quest |
Hm.. I think I should be back after some reading. and with some dinner too... |
17:42 |
|
Naros |
You want when the child is removes from the parent entity, for it to be removed from the database. |
17:42 |
|
sebersole |
yes, your assumption that "the child is already deleted." is utterly wrong |
17:42 |
|
sebersole |
normally that simply unsets the fk |
17:42 |
|
sebersole |
sets it to null |
17:42 |
|
Naros |
Right |
17:42 |
|
Quest |
Naros, no. I want the childs and sub childs to be auto removed when a parent is removed |
17:43 |
|
Quest |
be right back.! thanks again. |
17:43 |
|
sebersole |
and thatsd g*dd*amn cascaDING |
17:43 |
|
* Naros |
giggles. |
17:43 |
|
sebersole |
as i have said now for like 30 mionutes :) |
17:43 |
|
Naros |
Right, so placing CascadeType.REMOVE on the children collection :P |
17:44 |
|
Naros |
Hence why they're two different scenarios, depending on the use case Quest. |
17:44 |
|
Naros |
well more than two but two semantics |
17:45 |
|
Naros |
cascade vs orphaning as discussed in #hibernate |
18:11 |
|
* scripty |
hibernate makes you go mad |
18:16 |
|
scripty |
IS hibernate too Difficult OR Is the OP making it too dificult i dont get it :( |
18:19 |
|
tjsnell |
dreamreal in ##java is writing a hibernate book |
18:20 |
|
tjsnell |
he's banned from here without ever actually being here |
18:24 |
|
scripty |
oh ! hibernate book |
18:24 |
|
scripty |
:/ |
18:27 |
|
sebersole |
scripty: some things really are just too difficult for some people ;) |
18:27 |
|
sebersole |
then the debate is where the difficulty lies |
18:28 |
|
Quest |
http://stackoverflow.com/questions/18813341/what-is-the-difference-between-cascade-and-orphan-removal-from-db |
18:28 |
|
Quest |
For remove cascade: If you invoke setOrders(null), the related Order entities will NOT be removed in db automatically. |
18:29 |
|
scripty |
When i started out with hibernate people werent using at all now its like you wont see people not using it :P |
18:30 |
|
tjsnell |
we use openjpa |
18:30 |
|
scripty |
yeah i worked that too |
18:32 |
|
|
AlexCzar joined ##javaee |
18:32 |
|
sebersole |
scripty: when was this? |
18:32 |
|
* scripty |
i used JPA 2010 |
18:32 |
|
sebersole |
i have used and developed hibernate for 12+ years now |
18:32 |
|
sebersole |
Hibernate has been around way before that |
18:32 |
|
sebersole |
and was extremely popular before jpa |
18:33 |
|
scripty |
cough cough |
18:34 |
|
tjsnell |
though Gavin can be pretty cranky |
18:34 |
|
* scripty |
btw |
18:34 |
|
sebersole |
develop a OSS project for 12+ years and see where you are ;) |
18:34 |
|
Quest |
by box entity can have more boxes in it and more tasks. putting class Boxes { @OneToMany (cascade = CascadeType.REMOVE) private Collection<Boxes> childBoxList = new ArrayList<Boxes>(); |
18:35 |
|
sebersole |
thats pretty unprecedented in java oss |
18:35 |
|
Quest |
sebersole, why it says. "will note be fremoved in db" for For remove cascade: If you invoke setOrders(null), the related Order entities will NOT be removed in db automatically. in http://stackoverflow.com/questions/18813341/what-is-the-difference-between-cascade-and-orphan-removal-from-db answer 2 |
18:35 |
|
sebersole |
only a few projects have been around that long |
18:36 |
|
tjsnell |
sebersole: he was that way 10 years ago |
18:38 |
|
sebersole |
yep |
18:38 |
|
sebersole |
and that means what though? |
18:39 |
|
sebersole |
gavin has not been involved in Hibernate development in over 6 years |
18:39 |
|
|
cem_ joined ##javaee |
18:40 |
|
cem_ |
hi |
18:42 |
|
Quest |
cem_, hi |
18:42 |
|
cem_ |
how to start .exe file? |
18:43 |
|
Quest |
with java? |
18:43 |
|
cem_ |
in java |
18:43 |
|
Quest |
you mean how to convert .jar into .exe? |
18:43 |
|
tjsnell |
he got cranky about a TheServerSide.com article 10 years ago. I was sitting next to the editor when he called and I could hear him screaming |
18:43 |
|
tjsnell |
Quest: don't |
18:44 |
|
cem_ |
Quest i dont know i have ,exe file i want to start that |
18:44 |
|
cem_ |
.exe |
18:44 |
|
sebersole |
tjsnell: and again... thats pertinent to hibernate how? |
18:45 |
|
sebersole |
again, gavin has not been part of Hibernate development in many many years |
18:45 |
|
tjsnell |
in obvious ways |
18:45 |
|
tjsnell |
it's a funny story |
18:45 |
|
tjsnell |
I know that, you don't need to keep repeating it |
18:45 |
|
sebersole |
i said over 6 but iirc its more like 8 |
18:45 |
|
tjsnell |
I know that too |
18:45 |
|
sebersole |
well |
18:45 |
|
tjsnell |
how is that pertinent |
18:46 |
|
sebersole |
you are the one that keeps talkiong about gavin in reagdrs to a hibernate discussion ;) |
18:46 |
|
sebersole |
so you tell me |
18:46 |
|
tjsnell |
I'm just talking about gavin |
18:46 |
|
cem_ |
Quest: i got it thanks. |
18:46 |
|
tjsnell |
the mention of hibernate reminded me of a funny incident |
18:46 |
|
Quest |
cem_, Process process=Runtime.getRuntime().exec("file.exe"); |
18:46 |
|
tjsnell |
sorry to wad your panties |
18:47 |
|
sebersole |
yep and we're cranky lol |
18:48 |
|
Naros |
lol when is sebersole not cranky :P |
18:48 |
|
tjsnell |
when am I not cranky!? |
18:49 |
|
tjsnell |
well in 30 min when I head to the woods and no cell coverage for 2 days! |
18:49 |
|
* Naros |
has yet to observe that. |
18:49 |
|
Naros |
lol, the joys of not being connected to the outside world :E |
18:49 |
|
sebersole |
Naros: i whole-heartedly admit to getting cranky when answering (imo) silly questions |
18:49 |
|
Naros |
oh I know :P |
18:50 |
|
sebersole |
in fact i think i am super helpful overall |
18:50 |
|
Naros |
The #hibernate channel cranks me up sometimes. |
18:50 |
|
Naros |
*cracks even |
18:50 |
|
Quest |
if the parent is deleted of a child, which annotation makes the child also be deleted? (short question, had much confussions) |
18:50 |
|
sebersole |
not many project leads rountinely hang out on irc and try to help users |
18:51 |
|
sebersole |
heck not many oss developers in general do |
18:51 |
|
Naros |
Yep and its quite unfortunate but understandable why they don't. |
18:51 |
|
Quest |
is it orphanRemoval or cascadeType=REVOVE ? |
18:52 |
|
sebersole |
Quest: will me saying it for the 6th time in 2 hours finally "answer you"? |
18:52 |
|
sebersole |
cascade |
18:52 |
|
Quest |
ok. cool. just a sec |
18:52 |
|
sebersole |
can we be done now |
18:52 |
|
sebersole |
? |
18:53 |
|
Quest |
http://stackoverflow.com/questions/18813341/what-is-the-difference-between-cascade-and-orphan-removal-from-db answer 2 says "will note be fremoved in db" for For remove cascade |
18:53 |
|
Quest |
thats incorrect. yes^? |
18:55 |
|
Quest |
or is it just because of set null vs .remove |
18:55 |
|
sebersole |
DING DING DIING DING DING |
18:55 |
|
Quest |
:| |
18:55 |
|
sebersole |
i'll give you a different example... |
18:55 |
|
* Naros |
falls outta his chair. |
18:55 |
|
Quest |
ok! |
18:56 |
|
Quest |
lol @ Naros |
18:56 |
|
sebersole |
I have a Book and a Page... |
18:56 |
|
Quest |
k |
18:56 |
|
tjsnell |
sebersole: I'm in #camel on codehaus most of the time |
18:57 |
|
tjsnell |
along with several other fellow committers |
18:57 |
|
* Quest |
concentrates on the book |
18:57 |
|
sebersole |
tjsnell: lots of traffic there i bet l) |
18:57 |
|
tjsnell |
nah, pretty quiet |
18:57 |
|
tjsnell |
mailing list is busy |
18:57 |
|
sebersole |
if I remove a Page from a Book via book.getPages().remove( thePage )... |
18:57 |
|
Quest |
tjsnell, #camel is empty |
18:57 |
|
sebersole |
why do you think that would delete the pag? |
18:57 |
|
tjsnell |
codehaus |
18:57 |
|
tjsnell |
not freenode |
18:58 |
|
Quest |
k |
18:58 |
|
sebersole |
the page still exists |
18:58 |
|
sebersole |
right? |
18:58 |
|
sebersole |
physically the paper is still in my hand |
18:58 |
|
sebersole |
that page is orhpaned |
18:58 |
|
sebersole |
thats the idea of orphaning |
18:59 |
|
sebersole |
now... in terms of data modeling... |
18:59 |
|
sebersole |
removing that page from the book probably should delete the page |
18:59 |
|
sebersole |
thats where orphanRemoval comes into play |
19:00 |
|
sebersole |
if you delete the Book, you probably want all the Pages to be deleted as well |
19:00 |
|
sebersole |
that's cascading removal |
19:00 |
|
Quest |
got much .. |
19:00 |
|
Quest |
sebersole, List pageList = book.getPages(); Page page = new Page(); page = PageList[0]; page.remove(); the page will be removed / deleted from db. isnt that correct? |
19:01 |
|
sebersole |
i have zero idea what that means |
19:01 |
|
Quest |
sorry. thats entityManager.remove(page) |
19:01 |
|
sebersole |
page.remove(); ? |
19:01 |
|
sebersole |
ok |
19:01 |
|
Quest |
:) |
19:01 |
|
sebersole |
of course |
19:01 |
|
sebersole |
you asked the EM to remove it |
19:02 |
|
sebersole |
and before you ask about fk constraints... |
19:02 |
|
sebersole |
you are conveniently forgetting other parts of the jpa spec |
19:02 |
|
sebersole |
like managing both sides of a relationship |
19:02 |
|
Quest |
ya. ok |
19:02 |
|
Quest |
but what is book.getPages().remove( thePage )... vs entityManager.remove(page) |
19:03 |
|
sebersole |
which here means calling book.getPages().remove(...) |
19:03 |
|
Quest |
i mean what is book.getPages().remove( thePage ).. |
19:03 |
|
sebersole |
are you seriously asking me that? |
19:04 |
|
Quest |
yes |
19:04 |
|
Quest |
book.getPages() will get a list of pages. |
19:04 |
|
Quest |
never saw .remove( thePage ).. |
19:06 |
|
Quest |
ok. I will start at the point which i understood and agreed most on. sebersole> if you delete the Book, you probably want all the Pages to be deleted as well <sebersole> that's cascading removal but according to stackof.com if book is set to null, the pages are NOT deleted. true? |
19:08 |
|
Quest |
sebersole, and you said i should call Session.delete if cascade is set correct |
19:48 |
|
|
sfisque joined ##javaee |
20:02 |
|
|
neuro_sys joined ##javaee |
20:18 |
|
|
tommmied joined ##javaee |
20:55 |
|
|
neuro_sys joined ##javaee |
21:04 |
|
balazare |
sfisque: thanks for the tips earlier - have a good weekend |
21:16 |
|
sfisque |
npnp, be well bala |
21:38 |
|
|
scripty joined ##javaee |
21:43 |
|
|
SoniEx2 joined ##javaee |
21:47 |
|
|
scripty left ##javaee |
22:27 |
|
|
Quest joined ##javaee |
23:42 |
|
|
MegaMatt joined ##javaee |