uPortal IRC Logs-2010-11-23

[04:32:27 CST(-0600)] <sharmartinus> I am sratching my head with ContentMangementPortlet
[04:32:41 CST(-0600)] <sharmartinus> I posted help message on uportal-user
[04:33:05 CST(-0600)] <sharmartinus> has any one tried using ContentMangementPortlet on uportal 3.2
[06:46:05 CST(-0600)] <sharmartinus> exit
[06:46:10 CST(-0600)] <sharmartinus>
[09:57:01 CST(-0600)] <athena> hey EricDalquist - you haven't tried to do basic auth with spring web services have you?
[09:57:25 CST(-0600)] <EricDalquist> hrm, no I think I've only done the wssec user/pass stuff
[09:57:32 CST(-0600)] <EricDalquist> though I believe it should support it
[09:57:45 CST(-0600)] <EricDalquist> maybe via httpclient config if the spring-ws security code doesn't have it built in
[09:58:19 CST(-0600)] <athena> yeah
[09:58:51 CST(-0600)] <athena> i've got it working with shared basic authentication
[09:58:58 CST(-0600)] <athena> but haven't sorted out how to do it per-user yet
[09:59:04 CST(-0600)] <EricDalquist> oh
[09:59:05 CST(-0600)] <EricDalquist> hrm
[09:59:10 CST(-0600)] <athena> yeah
[09:59:12 CST(-0600)] <EricDalquist> never done anything like that
[09:59:21 CST(-0600)] <athena> of course it's silly that exchange uses basic auth, but not much i can do about that
[09:59:36 CST(-0600)] <EricDalquist> might have to write a custom authn class in the ws client side of things
[09:59:45 CST(-0600)] <EricDalquist> and use threadlocals or some such to get access to the credentials
[10:00:02 CST(-0600)] <athena> yeah
[10:00:02 CST(-0600)] <athena> (sad)
[10:00:18 CST(-0600)] <athena> worried about making sure they're not accidentally shared between users- not so sure how this stuff is wired up
[10:00:31 CST(-0600)] <EricDalquist> yeah
[10:01:41 CST(-0600)] <EricDalquist> also discovered the latest m2eclipse plugin doesn't support the 'all in one project' style multi-module setup
[10:01:57 CST(-0600)] <EricDalquist> it forces you to do one project per module
[10:02:16 CST(-0600)] <EricDalquist> though I realized you can stick projects in Working Sets and make those the root in your package explorer
[10:02:24 CST(-0600)] <EricDalquist> so you kind of get multi-module project
[10:02:41 CST(-0600)] <athena> oh ick
[10:02:48 CST(-0600)] <athena> not a fan of that at all
[10:03:04 CST(-0600)] <athena> so kind of looks like spring-ws uses a shared httpclient manager
[10:03:16 CST(-0600)] <EricDalquist> yeah that wouldn't surprise me
[10:03:45 CST(-0600)] <athena> yeah
[10:03:48 CST(-0600)] <athena> think that might be a problem
[10:09:35 CST(-0600)] <awills> athena I thought commons-http woud give you the basic auth
[10:09:45 CST(-0600)] <athena> it does indeed
[10:09:57 CST(-0600)] <athena> the problem is that spring-ws uses a shared connection manager
[10:10:14 CST(-0600)] <athena> so it's not clear how to have the credentials be per-user rather than shared for the entire connection manager
[10:10:15 CST(-0600)] <EricDalquist> yup, they likely assume shared credentials
[10:10:18 CST(-0600)] <athena> they do
[10:10:26 CST(-0600)] <awills> ah, that's less awesome
[10:10:40 CST(-0600)] <athena> and of course there's also no way to get at the portlet request from that API anyway
[10:10:56 CST(-0600)] <awills> no, i shouldn't think so
[10:11:15 CST(-0600)] <athena> so like eric said, making it work might require a custom implementation, plus threadlocals
[10:11:26 CST(-0600)] <athena> which isn't awesome, but i'm not seeing another solution at the moment
[10:11:40 CST(-0600)] <EricDalquist> if you're using Spring you can use http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/context/request/RequestContextHolder.html
[10:11:44 CST(-0600)] <athena> other than microsoft using more normal SOAP security (tongue)
[10:12:06 CST(-0600)] <EricDalquist> the DispatcherPortlet/Servlet stores the current request in a ThreadLocal and clears it at the end of the request
[10:12:14 CST(-0600)] <athena> that's nice at least
[10:12:14 CST(-0600)] <awills> ah that's in the works... it's called the PigsFlyApi
[10:12:18 CST(-0600)] <athena> lol
[10:12:23 CST(-0600)] <athena> yeah pretty much (tongue)
[10:12:35 CST(-0600)] <athena> so i don't know what you think awills, but other than that, spring-ws seems to work really well
[10:12:51 CST(-0600)] <athena> except for the auth issue i have everything working with exchange, and there's a whole lot less code than all the other solutions
[10:13:02 CST(-0600)] <athena> would be really easy to update if their web services API changes slightly
[10:13:07 CST(-0600)] <EricDalquist> yeah we've been using spring-ws for a lot of stuff
[10:13:09 CST(-0600)] <awills> spring-ws seemed pretty approachable and straightforward when i looked at it
[10:13:10 CST(-0600)] <EricDalquist> and it is REALLY nice
[10:13:24 CST(-0600)] <EricDalquist> and in 3.x the REST Template stuff is quite handy too
[10:13:41 CST(-0600)] <athena> yeah, and i like the idea of using whatever EricDalquist's using, since it makes it more likely that we'll have jasig people who understand this code and that it'll be consistent with new projects
[10:13:41 CST(-0600)] <EricDalquist> makes you really happy when people provide XSDs for their XML data
[10:13:43 CST(-0600)] <athena> yeah
[10:13:52 CST(-0600)] <EricDalquist> then you just call a URL and magically get back objects
[10:13:55 CST(-0600)] <athena> yeah
[10:17:01 CST(-0600)] <athena> so in some ways i think this is similar to some stuff we've done w/ the web proxy portlet
[10:17:12 CST(-0600)] <athena> i guess for that portlet we must have one http connection manager per user?
[10:17:22 CST(-0600)] <EricDalquist> yeah :/
[10:17:39 CST(-0600)] <EricDalquist> hopefully spring-ws has enough customization points so that you can do that
[10:18:02 CST(-0600)] <athena> i think we can subclass this: http://www.docjar.com/html/api/org/springframework/ws/transport/http/CommonsHttpMessageSender.java.html
[10:18:15 CST(-0600)] <EricDalquist> ah nice
[10:18:22 CST(-0600)] <athena> this basically just wraps HttpClient and has a shared instance for all connections
[10:18:53 CST(-0600)] <athena> so instead i think we could just write a version that creates a new HttpClient for each call to createConnection(URI uri)
[10:18:59 CST(-0600)] <EricDalquist> yeah
[10:19:04 CST(-0600)] <athena> that combined w/ threadlocals shoudl do it
[10:19:10 CST(-0600)] <EricDalquist> you could use the request contextholder to cache that in the user's session
[10:19:17 CST(-0600)] <athena> the httpclient?
[10:19:19 CST(-0600)] <athena> makes sense
[10:19:23 CST(-0600)] <EricDalquist> yeah
[10:19:26 CST(-0600)] <EricDalquist> then you get 'free' GC
[10:19:36 CST(-0600)] <athena> hmm
[10:19:43 CST(-0600)] <EricDalquist> when the user's session dies the client goes away
[10:19:52 CST(-0600)] <athena> hm, yeah
[10:20:04 CST(-0600)] <athena> not sure the client would be re-used too much
[10:20:19 CST(-0600)] <athena> how worried would you be about a bunch of users keeping a httpclient instance around each?
[10:20:22 CST(-0600)] <athena> probably not the end of the world?
[10:20:26 CST(-0600)] <EricDalquist> you should be able configure a single multi-threaded http client connection manager that they all use
[10:20:31 CST(-0600)] <EricDalquist> to reduce the TCP/HTTP overhead
[10:20:39 CST(-0600)] <EricDalquist> not very
[10:20:41 CST(-0600)] <athena> yeah
[10:20:50 CST(-0600)] <athena> does the web proxy portlet use a shared manager
[10:20:50 CST(-0600)] <EricDalquist> I don't think they're very big objects byte size wise
[10:20:56 CST(-0600)] <EricDalquist> yeah
[10:21:03 CST(-0600)] <athena> cool (smile)
[10:21:05 CST(-0600)] <EricDalquist> I think it does at least
[10:21:12 CST(-0600)] <athena> i think this seems workable
[10:21:25 CST(-0600)] <athena> the good news is that except for this issue we're really close to having exchnage support in the calendar protlet
[10:21:30 CST(-0600)] <EricDalquist> because then the manager can be shutdown cleanly when the app shuts down to do TCP cleanup
[10:21:36 CST(-0600)] <athena> after this we'll have to do a bunch of work with timezones, etc., of course
[10:21:36 CST(-0600)] <EricDalquist> nice
[10:21:46 CST(-0600)] <EricDalquist> yay timezones! (not really)
[10:22:18 CST(-0600)] <athena> lol
[10:22:24 CST(-0600)] <athena> yeah, bane of my existence, feels like (tongue)
[10:22:32 CST(-0600)] <athena> speaking of which, very tired this morning
[10:23:46 CST(-0600)] <athena> got delayed out of seattle yesterday due to snow
[10:23:52 CST(-0600)] <EricDalquist> :/
[10:23:52 CST(-0600)] <athena> gotta figure that's the one day it snows in seattle (tongue)
[10:24:04 CST(-0600)] <athena> it was pretty though
[10:36:03 CST(-0600)] <athena> it's really annoying when classes like this have protected constructors: http://static.springsource.org/spring-ws/sites/1.5/apidocs/org/springframework/ws/transport/http/CommonsHttpConnection.html
[10:36:21 CST(-0600)] <EricDalquist> uhg yeah
[10:36:58 CST(-0600)] <athena> leads to either stupid code duplication or stupid package name re-use
[10:37:07 CST(-0600)] <EricDalquist> yup
[13:31:04 CST(-0600)] <athena> think i'm getting close to having this working
[13:31:08 CST(-0600)] <athena> we'll see (smile)
[13:31:43 CST(-0600)] <EricDalquist> yay!
[14:25:37 CST(-0600)] <jlichner_> I'm trying to pull a div from a page using a web proxy portlet, but not sure how to select the div in the clipping configuration
[14:25:48 CST(-0600)] <jlichner_> it seems to reject apostrophes
[14:27:04 CST(-0600)] <jlichner_> I'm getting a channel failed to render message
[14:27:28 CST(-0600)] <jlichner_> anybody know what could be wrong?
[14:28:03 CST(-0600)] <jlichner_> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2 at java.util.LinkedList.entry(LinkedList.java:365) at java.util.LinkedList.get(LinkedList.java:315) at edu.wisc.my.webproxy.beans.filtering.ClippingFilter.endElement(ClippingFilter.java:223) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206) at org.cyberneko.html.filte
[14:28:13 CST(-0600)] <jlichner_> that's the strack trace
[14:28:33 CST(-0600)] <EricDalquist> I'm not sure, I don't think we really use the clipping config
[14:29:11 CST(-0600)] <jlichner_> what do you use?
[14:29:25 CST(-0600)] <EricDalquist> we use the proxy portlet a lot
[14:29:33 CST(-0600)] <EricDalquist> but primarily on purpose written backend sites
[14:29:43 CST(-0600)] <EricDalquist> so we aren't clipping, just proxying the entire page
[14:30:33 CST(-0600)] <jlichner_> what's the clipping config for?
[14:30:47 CST(-0600)] <EricDalquist> I believe doing what you want to do with it
[14:31:08 CST(-0600)] <EricDalquist> I just don't think we (UW-Madison) are using it
[14:31:19 CST(-0600)] <EricDalquist> sorry I cant be more helpful :/
[14:31:50 CST(-0600)] <jlichner_> no problem!
[14:32:00 CST(-0600)] <jlichner_> I'm sure I'll figure something out
[14:49:25 CST(-0600)] <athena> EricDalquist: i got the exchange adapter working!
[14:49:32 CST(-0600)] <athena> thanks for the pointer to the request holder
[14:49:33 CST(-0600)] <EricDalquist> yay!
[14:49:36 CST(-0600)] <EricDalquist> yup
[14:49:37 CST(-0600)] <athena> code doesn't seem too insane
[14:49:38 CST(-0600)] <EricDalquist> handy object
[14:49:57 CST(-0600)] <athena> yeah
[14:50:05 CST(-0600)] <athena> seems like this adapter should work reasonably well
[14:50:13 CST(-0600)] <EricDalquist> great
[14:50:13 CST(-0600)] <athena> just need to figure out the exchnage time zone stuff (tongue)
[14:50:21 CST(-0600)] <EricDalquist> and its all working with a shared connection manager?
[14:50:25 CST(-0600)] <athena> yeah, seems to be
[14:50:33 CST(-0600)] <EricDalquist> the one thing to be careful with there is the low default connection limits
[14:50:49 CST(-0600)] <athena> gotcha
[14:50:50 CST(-0600)] <EricDalquist> I think it limits itself to 2 connections per domain and 20 total connections default
[14:51:00 CST(-0600)] <EricDalquist> which is a bit low for a shared WS client (tongue)
[14:51:02 CST(-0600)] <athena> hm, yeah that probably woudln't be appropriate
[14:51:03 CST(-0600)] <athena> right
[14:51:11 CST(-0600)] <athena> and really we'll probably want the same limit for domain and total
[14:51:16 CST(-0600)] <EricDalquist> yeah
[14:51:23 CST(-0600)] <athena> we can set some reasonable defaults for it
[14:51:27 CST(-0600)] <EricDalquist> for WS stuff I usually bump them both up to 200+
[14:51:35 CST(-0600)] <EricDalquist> just something to keep it from getting insane
[14:51:38 CST(-0600)] <athena> need to expose all the interesting parameters for this new wrapper
[16:38:50 CST(-0600)] <EricDalquist> trying out lombok on a UW specific portlet
[16:38:58 CST(-0600)] <EricDalquist> going to see if it actually works as advertised
[16:39:44 CST(-0600)] <awills> cool
[17:45:30 CST(-0600)] <EricDalquist> so for lombok is working as advertised
[17:45:34 CST(-0600)] <EricDalquist> which is really freaking neat