greptilian logo

IRC log for #javaee, 2013-08-08

Please see http://irclog.greptilian.com/javaee for which days have been logged.

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:23 sfisque1 joined ##javaee
00:53 playalpha left ##javaee
00:59 pdurbin SoniEx2: please try to stay on topic :)
01:19 SoniEx2|2 joined ##javaee
01:44 SoniEx2 sfisque: you forgot to add ##GenderQueer to your autojoin list...
01:46 sfisque lol, you are correct
01:47 sfisque fixed
01:48 sfisque so non-java enterprise question.  i'm thinking i want to move from PK based ssh access to some token based access.   are there any opensource token auth setups?  like kernel module for the server and a CLI app to generate tokens on the client side?
01:49 sfisque or soemthing open source that woudl integrate with kerberos
01:50 pdurbin sfisque: https://github.com/fasrc/openauth
01:51 sfisque Oauth was compromised late last year, i thought
01:52 pdurbin was it? oh dear. openauth is different though
01:52 pdurbin I used to help support it a bit: http://rc.fas.harvard.edu/openauth
01:52 sfisque what is diff between openauth and oauth?  i was under impression they were same thing...
01:54 pdurbin nope
01:54 pdurbin sfisque: here, this is related to openauth but is java and a little more relevant, I hope: https://github.com/mclamp/JAuth
01:54 sfisque ok.  i'll take a look at openauth and jauth
01:55 pdurbin sfisque: cool. here's the server side component you'd need: http://code.google.com/p/google-authenticator/
01:56 sfisque nice and has an android token generator
02:10 pdurbin sfisque: JAuth is a desktop token generator
04:19 SoniEx2|2 joined ##javaee
04:31 Guest45387 joined ##javaee
07:18 SoniEx2|2 joined ##javaee
10:18 SoniEx2|2 joined ##javaee
10:42 Guest45387 joined ##javaee
11:19 SoniEx2|2 joined ##javaee
12:04 Guest45387 joined ##javaee
12:11 Guest45387 joined ##javaee
12:17 Guest45387 joined ##javaee
12:18 SoniEx2|2 joined ##javaee
13:19 SoniEx2|2 joined ##javaee
13:23 Quest joined ##javaee
13:33 Guest58349 joined ##javaee
13:38 Guest58349 joined ##javaee
13:39 Naros joined ##javaee
14:18 SoniEx2|2 joined ##javaee
15:15 kobain joined ##javaee
15:19 SoniEx2|2 joined ##javaee
16:42 sfisque joined ##javaee
16:46 Naros sfisque: are you familiar with Hibernate at all ?
16:47 Naros IIRC, the use of @OrderBy from the JPA specification requires object properties only ( e.g. you can't specify something like "LEFT(REPLICATE(N' ',40) + orderByField,40)" )
16:47 Naros but I'm trying to find out whether Hibernate extends JPA by allowing this.
16:48 Naros problem is if I have a NVARCHAR(40) column that contains say the order numbers which is the sort key, order 1000 would show up before 999 in the query because JPA's order by using the DB ordering which does character-by-character comparison, regardless of length.
16:49 Naros 1 before 9, thus kicks 1000 before 999.
16:49 sfisque you're not going to get number sorting with an nvarchar.  if you're storing numbers why isnt it Number()?
16:50 Naros because it can be alphanumeric.
16:50 sfisque or Decimal
16:50 Naros PO numbers can contain dashes, and other non-numeric values.
16:50 sfisque you'll need to do an in memory sort then
16:50 sfisque and have a custom comparitor
16:50 Naros In memory comparison is not an option.
16:50 sfisque or use a stored procedure
16:50 Naros that isn't an option either.
16:51 sfisque u using oracle
16:51 sfisque ?
16:51 Naros No SQL Server.
16:51 Naros 2008
16:51 Naros I don't recall this being an issue on Oracle 8i IIRC.
16:51 sfisque you can create a new column that is "derived" and maybe have a custom index on it?
16:52 sfisque i know in oracle you can specify SQL in the index.  not sure if sqls supports that
16:52 Naros But we were able to apply some data manipulation when we were on Oracle 8i because we controlled all the input data.  Under this version of the application, we no longer control the input data and it can vary from source system to source system.
16:52 sfisque arbitrary data mean you need some custom sort mech then
16:52 Naros aye, why I thought about using something like LEFT(REPLICATE(N' ',40) + field,40) to give every value a length of 40
16:53 Naros so comparison would work for both numeric & non-numeric values.
16:53 Naros but keeping sorting at the DB tier where it's far more efficient.
16:53 sfisque aye but i don't know sqls that well.  most of my knowledge is ora and mysql with a dash of postgres
16:53 Naros aye, but my question is more about JPA versus Hibernate.
16:54 Naros JPA's order by requires field properties without any functions, yes?
16:54 sfisque afaik yes
16:54 Naros And they haven't (up to 2.0) given any alternative to this?
16:54 Naros I know Hibernate 4.3 is going to be JPA2.1 compliant but we aren't there yet.
16:55 Naros Still at 4.2x
16:56 sfisque only way i see is the options i listed previously
16:56 sfisque for now
16:56 sfisque unless there is a custom annotation you can apply (hibernate specific)
16:57 Naros Aye, iirc I think hibernate's customized @OrderBy is basically a sql fragment append concept.
16:57 sfisque there's your solution then
16:57 sfisque as long as you can absorb a proprietary annotation
16:57 Naros Just wasn't sure if there was a JPA one before I dived into using custom Hibernate ones.
16:58 Naros IIRC Oracle has an RPAD, LPAD functions, yes?
16:59 sfisque yes
16:59 Naros Contemplating whether it might be worthwhile to use a custom sql fragment that can be database agnostic in some way.
16:59 Naros if it means writing my own annotation
16:59 sfisque i wouldn't worry about that.  if you change repos, there will be refactoring.  we're going through that now with sql -> ora conversion
17:00 Naros true enough, but I do want to try and minimize that
17:00 Naros if possible
17:00 sfisque aye.  always good to consider.  but i wouldnt "waste" too much effort because you will end up refactoring if y ou change dbms
17:01 Naros True
17:01 Naros ty.
17:18 SoniEx2|2 joined ##javaee
17:48 Naros sfisque: is it generally accepted in the domain model with class cycles since sometimes bidirectional relationships are helpful ?
17:48 Naros package cyclic dependency is obviously bad
17:57 whartung of course there will be cycles
17:57 whartung dependents almost always will have references to their parents.
17:58 Naros Aye, but outside domain entities, it's generally not acceptable either, correct?
17:58 whartung It's either necessary or it's not, it's not really an "optional"/"acceptable"/"unacceptable" thing
17:59 whartung you see it all the time in common data structures, things like linked lists that don't have a PREV link, that's pretty routine, same with tree.
17:59 whartung trees
18:00 whartung but its really up to the use case, the resources used/desired, and programmer convenience/quality of life that affects whether a reference is necessary/desired or not.
18:01 Naros Gotcha.
18:03 sfisque generally you want to avoid them, but if your schema has circularity, the models will too
18:04 sfisque aye whartung but bidirectional connection isnt a true circularity
18:04 sfisque a <-> b isnt the same as  a -> b -> c -> a
18:05 whartung true, but a lot of serializers are bone stupid enough to think it does anyway :)
18:05 sfisque :-P
18:05 sfisque machines… stupid machines...
18:05 Naros lol
18:05 sfisque do what i want, not what i tell you… damn it!
18:06 Naros If it were that easy.
18:25 whartung I think I'm going to make an effort to work back to Emacs instead of my IDE…just use the IDE for debugging.
18:33 sfisque brave brave man
23:23 philbot joined ##javaee
23:23 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.

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

Please see http://irclog.greptilian.com/javaee for which days have been logged.