14:59:16 #startmeeting 14:59:20 Meeting started Mon May 23 14:59:16 2011 UTC. The chair is sebersole. Information about MeetBot at http://wiki.debian.org/MeetBot. 14:59:20 Useful Commands: #action #agreed #help #info #idea #link #topic. 14:59:54 #topic Beta1 date 15:00:21 i have a feeling this will be pretty much ok wit everyone ;) but i wanted to discuss maybe moving the Beta1 date ack one week 15:00:40 i did not realize initially about memorial day (big US holiday) 15:00:55 when i scheduled it 15:01:00 hi 15:01:04 yes, sounds very good 15:01:09 Jun 1? 15:01:13 sounds good indeed :-) 15:01:33 well moving it from june 1 to june 8 15:01:46 june 1 is the current date 15:02:03 but i suspect lots of us have plans for this weekend 15:02:08 i know i do 15:02:13 yes, I do also 15:02:20 was afraid I'd have to cancel 15:02:27 and its a long weekend as well 15:02:45 June 1 is Children's day in China, a holiday not for adults :( 15:02:57 i'm a big child :) 15:03:03 isn't it children's day everyday? 15:03:07 I will be off a couple of days as well 15:03:12 so i qualify! 15:03:24 when's doggie day? 15:03:30 so lets say we all agree on that 15:03:38 i have asked the AS team about te impact to them 15:03:43 the 2nd and 6th are holidays here in Sweden 15:03:47 lets see what they say 15:04:01 so I will probably take Friday the 3rd off as well 15:04:06 i have heard close to 20 dates wrt AS7 15:04:27 anyway... 15:04:50 #topic Configuration (gail) 15:05:04 gbadner: please explain tis as I have no idea the benefit 15:05:14 I've been trying to unravel the mysteries of AnnotationBinder and HbmBinder 15:05:37 to and basically flatten the logic into simpler use cases 15:05:42 well the biggest mystery is that they are crap 15:06:14 my plan was to have the flattened version be the state classes 15:06:33 but it's taking too long (no surprise) 15:06:37 way too long 15:06:42 really have no idea what you ean by flatened HbmBinder 15:06:49 as HbmBinder has absolutely no state 15:06:54 no idea here either 15:06:59 its all static 15:07:07 same for the AnnotationBinder 15:07:21 a lot of what I see in investigation of appropriate use cases 15:07:42 by looking for/at particular annotations 15:08:15 or particular dom4j nodes in HbmBinder 15:08:21 i think the HbmBinder and AnnotationBinder should only be a guide to us 15:08:29 yes, it is a guide 15:08:34 hardy_: right 15:08:41 a map of the use cases we need to cover 15:08:45 the problem is that it does a bunch of setters 15:08:56 along the way 15:09:01 but i still do not get this "flaten to state" angle 15:09:32 nor how using Configuration helps or is beneficial 15:09:37 my idea is to investigate up front what the use case is (by looking for particular info)( 15:10:01 once it's known, simply create a state object w/ the appropriate data 15:10:07 but we know the usecases 15:10:14 it's the JPA spec and whatever hbm can do on top of this 15:10:20 the use case in all cases is to produce what we now cll bindings 15:10:26 it won't get any easier 15:10:34 the problem is looking at a particular class provided as a source 15:10:39 based on certain rues 15:10:55 and figuring out what each piece is 15:11:06 the @IdClass case is a good example 15:11:12 you can twist and turn - bottom line is that in the end we have to be able to run all existing (what steve calls) functional tests and they have to pass 15:11:16 yes please talk specifics 15:12:09 well actually, a good example is figuring out if something is lazy 15:12:14 so what is still uncertan t you wrt IdClass? 15:12:23 we discussed this on ml 15:12:34 which? 15:12:44 how to handle ids 15:13:11 laziness depends on the type of property 15:13:32 ? 15:13:37 wdym bythat 15:13:57 for simple properties, the default is false 15:14:17 not true 15:14:25 not necessarily at leat 15:14:30 least 15:14:46 well there are 2 types of "lazniess" 15:14:51 for collections, the default is true, unless it was specified as a default 15:14:55 so which do you mean 15:15:03 i assume you mean association fetching 15:15:08 via @Basic you can specify a laziness hint 15:15:13 yes 15:15:19 brb - puppy has to pee :-) 15:15:25 wich yeah of course none associions will be fetched 15:15:39 not sure what you're saying 15:15:49 ditto ;) 15:16:11 in terms of association fetching, non-associations will be fetched 15:16:16 for many-to-one, there are 3 possiblities 15:16:21 there's also extra-lazy 15:16:25 that seems pretty self-evident 15:16:30 no 15:16:34 extra is only efecting collections 15:16:39 yes 15:16:57 what does all this have to do wit Configuraton? 15:17:02 thats whay i was asking 15:17:07 yes the rules are complex 15:17:11 that is known 15:17:36 but the code in HbmBinder checks decides whether an attribute is lazy by doing really complicated if statements querying the use case 15:17:56 it's very simple if you know that the attribute is simple 15:18:00 no idea what "querying the use case" mes 15:18:05 means 15:18:13 I need to find the code 15:18:18 back 15:18:24 catching up 15:18:52 yes you need to know the association type (if association) to determine the default fetching 15:19:03 and to determine the allowable set 15:19:07 but AGAIN 15:19:20 what has this to do with continuing to use Configuation? 15:19:47 well, if we use Configuration, everything is already processed 15:19:55 we know exactly what we are working with 15:19:59 that i don't get 15:20:11 but what shall populate the Configuration 15:20:18 we know the PersistentClasses, RootClasses, MappedSuperclasses 15:20:23 I don't get it 15:20:37 for the beta, I suggest that the Configuration be populated the same way as is done now 15:20:43 how? 15:20:57 that's as hard as what we are doing now 15:21:03 thts bad idea 15:21:10 thats a ton of work in itself 15:21:15 ok, I wasn't sure 15:21:19 and does not get as a single step closer to the our goal 15:21:28 look at the annotation processing code 15:21:42 I cannot reuse anything from the old AnnotationBinder 15:21:47 to me, it's easier to construct the EntityBindings/AttributeBindings by picking the stuff off of the o.h.mapping objects 15:21:57 if this was going to be the end result i'd say yeah lets do it 15:22:20 in fact this was what i propsed back when i brought up scrapping the metamodel code due to time 15:22:49 this is the purpose of your states i thought 15:22:58 otherwise, someone is going to have to duplicate all the binder logic (in some form) to construct the bindings 15:23:02 otherwise i have no idea what purpose they even serve tbh 15:23:42 gbadner: I don't understand you last statement 15:24:17 to me these state objects are esentially the same as the o.h.mapping stuff 15:24:21 btw, I just want to say that I really appreciate you hearing me out on this 15:24:30 :-) 15:24:38 I've been mulling this over 15:24:47 and it's really kind of hard to explain 15:25:06 i prefer pen-and-paper to solidify 15:25:11 unless you can explain it you have to do all the work yourself 15:25:15 yeah at some point you need eyes/input 15:25:20 right 15:25:28 i am visual though 15:25:36 diff strokes... 15:25:40 yes, that's what I'm looking for 15:26:22 yes, I agree the state objects would basically mimic the state of the o.h.mapping objects 15:26:37 ok, well 15:26:42 so why not continue on this 15:26:47 the really hard part though, is figuring out exactly how to populate that state 15:26:57 that's why the binder code is so complicated 15:27:08 sort of 15:27:13 I think the problem is that you need a lot of knowledge about how this is all used 15:27:19 well, there is that also 15:27:23 there are many resons the existing binder code is comploicated 15:27:31 I think sebersole has to get in there and drive the big picture 15:27:37 yes, I agree 15:27:44 and you and me sort out the details in annotations and hbm 15:27:58 anyhow, taking an already constructed Configuration makes it possible to flatten the state 15:28:03 well i will be once the perf stuff is square 15:28:17 i still do not understand this statement at all 15:28:22 w/o having to re-write the binder code 15:28:39 yeah at the risk of essentially parsing stuff now 4 times 15:28:44 we already have a working Configuration 15:28:48 let me try to understand ths 15:28:56 you are not going to change anything of the current parser code 15:29:05 for the beta 15:29:10 (at least) 15:29:16 you just keep things like they are and let it populate the o.h.mapping classes 15:29:23 yes 15:29:28 gbadner: again the issue is that there is a ton of work to get to that 15:29:32 so then what? 15:29:36 and it gets us no closer to the end game 15:29:45 hardy_: i get it 15:29:49 she wants... 15:29:54 also think about the intgration code 15:30:00 xml -> o.h.mapping -> metamodel -> persistrs 15:30:05 write code to convert the Configuration to the new metadata 15:30:10 yes 15:30:15 we still would need to take Metadata, services, etc on board 15:30:20 yes this is not a good options imo 15:30:25 ok, maybe not 15:30:45 on a related note... 15:30:57 I thought I would bring it up, because I *think* it would be easier to at least get the API in place 15:31:12 did we ever figure out about interfaces for commonality wrt jaxb 15:31:31 gbadner: its not getting the api in place is the problem 15:31:35 I looked into it. there are ways of doing this 15:31:42 the api moving forward is not configuration 15:31:48 I think I send a link to gail 15:32:01 hardy_: for the interfaces? 15:32:05 I haven't had time to try it though 15:32:10 that woud rock 15:32:14 es, for the interfaces 15:32:28 we could also just look at the jaxb generation as a "cut" 15:32:32 stliu: has also been asking about it 15:32:40 much like we suggest for reveng 15:32:52 that the result will require tweaking 15:32:57 xml -> o.h.mapping -> o.h.metamodel.binding.state, o.h.metamodel.relational.state -> Metadata 15:33:10 i am lost now 15:33:29 gbadner: api is user facing 15:33:50 we absolutely need the api in place for the beta 15:33:55 isn't the api about how to get data out of the metadata? 15:34:00 NO 15:34:07 its how they build the metadata 15:34:17 i mean ultimately how they build the SF 15:34:24 thats the whole point 15:34:34 to be able to "use Hibernate" 15:35:14 gbadner: really this is not a viable option 15:35:41 hardy_: lost wrt the jaxb+interfaces? 15:35:54 no, about the conversation 15:35:59 ok 15:36:07 seemed we talked about different things 15:36:26 regarding the interfaces, the issue there is that we might need another jaxb generation plugin 15:36:31 well i was talking about something else 15:36:42 well lets tak about that offline 15:36:47 ok 15:36:58 but it would help simplify some common code 15:37:04 sure - http://stackoverflow.com/questions/1271980/generating-a-jaxb-class-that-implements-an-interface 15:37:09 it does! 15:37:17 cool 15:37:22 thansk 15:37:29 so lets move on... 15:37:33 and I have started an experiment on my machine. If you guys think it is so important I can give it a go again 15:37:59 what kind of plugin? 15:38:04 http://fisheye5.cenqua.com/browse/~raw,r=1.1/jaxb2-commons/www/interface-insertion/index.html 15:38:19 if we don't use the Configuration, then we have to digest all the binder code to figure out how to create the bindings 15:38:23 maven? ant? gradle? 15:38:27 it's an extension to the default xjc plugin which generates the classes 15:38:32 should be java code 15:38:49 i think its worthwhile 15:38:57 stliu: seems to agree 15:39:02 ok. I take another look 15:39:10 i know gbadner has asked about it 15:39:21 i've seen some of the xml code and can understand why it is handy 15:39:25 yes, it would help 15:39:29 so yeah i'd ay try 15:39:38 just never wrote myself the xml code so it never bugged me so much :-) 15:39:42 dont spend 2 days on it... 15:39:47 but try it 15:39:52 sure 15:40:14 i have another quick question 15:40:31 shoot 15:40:36 I had this discussion with jpav this morning 15:40:48 he is still working on binding generators, etc 15:40:53 ok 15:41:06 so he wrote this helper class for working with jandex 15:41:11 the options stuff? 15:41:19 ok 15:41:26 it'sabout getting the default values for annotaitons 15:41:50 the default defined in the annotation? 15:42:00 it can be 15:42:13 a annotation property can specify a default 15:42:18 that's optional 15:42:27 sure 15:42:35 the point is in one of his helper methods he did a Class.forName 15:42:40 to load the actual annotation 15:42:45 oh yeah thats bad 15:42:49 since Jandex only has AnnotationInstance 15:42:55 right 15:42:59 unless he passes CL 15:43:04 I told him ALL class and resource loasin should go via the service 15:43:08 forName is overloaded 15:43:23 well there is a chicken and egg problem sometimes 15:43:30 but he should be fne here 15:43:46 i run into problems parsing config files for example 15:44:04 but by this time (bindng) the service regsitry is built 15:44:21 so that service is available 15:44:26 right and in this case I think the class loader service should be used 15:44:31 i agree 15:44:40 it has to really 15:45:04 his argument was that because the JPA annotations are required at compile time it is safe to load this classes via Class.forName 15:45:12 which did not make sense to me 15:45:44 yeah compile time and run time classloaders are totoally unrelated 15:45:58 imo if at all you can load a class from our own jar file like this 15:46:21 btw, here's are some example: http://pastebin.com/VqNf1wkt, http://pastebin.com/DpqKr2B0 15:46:33 for anything which comes from a different jar I somehow can create some class loader magic which will cause problems 15:46:55 sebersole: anyways, jpav said he would listen to your call on this :-) 15:47:00 i think we just need to adopt a project-wide standard that anyone using Class.forName without REALLY GOOD REASON should be hung 15:47:04 ;) 15:47:08 he he 15:47:52 gbadner: example for what 15:47:56 hardy_: right you become totally dependent on how the runtime env structures the classloaders without allowing it to tel yu 15:48:39 so we agree, unless you really cannot get hold of the service (due to the chicken and hen problem) we should use the service 15:49:02 (after you finish with your topic) please take a look at these two examples and see if you still want to recreate this kind of logic in the binders 15:49:06 even if it is not 100% necessary it is the safer option 15:49:11 no 15:49:47 ok, well next topic real quick... 15:50:02 #topic org.hibernate.metamodel.Metadata.Options 15:50:20 just wanted to point out this new contract for metadata building specific options 15:50:26 gbadner: btw, I actually looked at the code and I wanted to say that I don't want to have this code, not that I don't want to look at it :-) 15:50:38 the builder collects them and passes them into the Metadata 15:50:50 so the binders etc can access them 15:50:55 nice 15:51:02 yeah, I saw that 15:51:06 I like that 15:51:11 Metadata also exposes it 15:51:22 so users can query to see what options were used to build it 15:51:35 immutable at tht point 15:51:43 anyway 15:51:56 thats all i had for today 15:52:03 sebersole, can we get back to the examples 15:52:07 ? 15:52:12 a quick note 15:52:16 the perf is looking pretty good in AS 15:52:21 I think it would shed some light on what I've been up against 15:52:28 that's great! 15:52:42 gbadner: are we still talking about what we already agreed is not a good idea to do? 15:52:50 yes 15:52:55 or is this something else? 15:53:00 please just take a look at the examples 15:53:05 i mean... why? 15:53:11 they illustrate why it's taking me so long 15:53:33 sebersole: what are you doing regarding pers in AS7? 15:53:57 gbadner: this old code sucks 15:54:03 yeah 15:54:19 it's really complicated to unravel what actually applies to a particular use case 15:54:24 hardy_: well initially i was using proxies for the service "bindings" 15:54:36 I've seen that 15:54:47 bit me a little during a debug session 15:54:52 gbadner: well if you copy verbatim bad code you tend to end up with just as complicated code :) 15:54:56 until I understood what's going on 15:55:03 this is maybe where i need to step in 15:55:34 gbadner: I don't understand half of the special cases of the AnnotationBinder 15:55:40 you have to let it go 15:55:53 I think you should have a good picture of what hbm can do 15:55:57 it will be very, very time-consuming to interpret what is relevant for a particular use case 15:56:02 and how it should do that 15:56:07 don't interpret it 15:56:11 use it as guide 15:56:25 call it what you like 15:56:31 write the new code the way you would write it with all the knowledge you have now 15:56:35 well she is right in that respect 15:56:48 you do need to interpret what the old code is really doing at the end of the day 15:56:55 yes, absolutely 15:57:00 i fully expect to have to twaek for several border cases in the end 15:57:07 yes 15:57:14 i tend to prefer to work that way 15:57:19 as well hardy_ 15:57:23 problem is that it's not just mangled for the border cases 15:57:28 it the major benefit of having such a huge testsuite 15:57:56 tbh this is what i have been preaching all along 15:58:01 I truly believe that replacing the binder code should absolutely be done 15:58:21 lets get it done and the testsuite will tel us where we missed something 15:58:45 ok, sebersole, then I think I need to chat w/ you about a strategy 15:59:21 well tbh i had hoped to work on instegrating this work wit the persisters while y'all finsihed up the binding 15:59:39 but if i need to step into the binding stuff so be it 15:59:46 yes, I think you should 16:00:06 then the issue is tht we do not get to leverage the testsuite until the end 16:00:11 see the diff? 16:00:25 well, if we leverage the Configuration, it's easy to create the bindings 16:00:31 no its not 16:00:48 you still need to write the binding code 16:01:12 its just going from o.h.mapping to binding instead of this state stuff to binding 16:01:18 but its still work 16:01:22 and worse 16:01:27 ts completely throw away work 16:01:35 no, not to throw it away 16:01:42 that will not realy save us that much time/work 16:01:48 yes we will 16:01:58 o.h.mapping is going to go away 16:02:08 thats the whole point of this exercise 16:02:13 no, as new binder code is written, replace configuration 16:02:29 sounds great when we can just say it 16:02:33 and the code gets writen for us 16:02:57 and that btw is the definition of throw away code 16:03:04 its code we had to write 16:03:08 no 16:03:13 sebersole: bottom line is that you will have to get into the binding stuff first 16:03:17 that we are simpley rplacing 16:03:43 hardy_: why? 16:03:48 TDD anyone? 16:03:53 for the beta, just use the built Configuration to create state objects 16:03:58 gbadner: we aqre not going to do that 16:04:03 end of story 16:04:07 ok 16:04:15 sorry but sometimes it just needs to be that way 16:04:19 then I need to chat w/ you about a strategy 16:04:46 because I know I can't get binder code interpreted in time for the beta 16:04:55 sebersole: just regarding your statement about writing the persister code vs working on the binding 16:05:12 well i think what we may do is have you work on the binding -> persister stuff 16:05:33 who is "you"? 16:05:40 you, gbadner 16:05:44 oh, ok; 16:05:59 i had hoped to use it as opp to clean up that cde a bit 16:06:04 but 16:06:26 if just converting from one model to the other as a source it should be pretty straight forward 16:06:47 (sounds familiar somehow...) 16:07:16 um, not sure who ever told you that this step was gonna be easy 16:07:27 but i know it was not me 16:08:09 in fact i have pretty consistently said how time consuming it was going tobe 16:08:22 anyway 16:08:30 i do not have anything else 16:08:37 in terms of meeting 16:08:41 anyone else? 16:09:16 nope 16:09:40 5.... 16:09:45 4.... 16:09:49 3.... 16:09:54 :) 16:09:58 ok 16:10:03 #endmeeting