uPortal IRC Logs-2009-09-01
[08:27:27 EDT(-0400)] * athena (n=athena@adsl-75-58-127-15.dsl.wlfrct.sbcglobal.net) has joined ##uportal
[08:57:15 EDT(-0400)] * colinclark (n=colin@bas2-toronto09-1176444611.dsl.bell.ca) has joined ##uportal
[09:55:21 EDT(-0400)] * lennard1 (n=sparhk@ip68-98-56-21.ph.ph.cox.net) has left ##uportal
[10:14:41 EDT(-0400)] * Blaz (n=blaz@blaz.is-a-geek.org) has joined ##uportal
[10:21:05 EDT(-0400)] * colinclark (n=colin@142.150.154.101) has joined ##uportal
[10:21:51 EDT(-0400)] * EricDalquist (n=dalquist@bohemia.doit.wisc.edu) has joined ##uportal
[10:25:21 EDT(-0400)] * lennard1 (n=sparhk@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[11:11:57 EDT(-0400)] * SusanB (i=user@susan-x200.its.yale.edu) has joined ##uportal
[12:32:58 EDT(-0400)] * athena (n=athena@adsl-75-58-127-15.dsl.wlfrct.sbcglobal.net) has joined ##uportal
[13:08:50 EDT(-0400)] * holdorph (n=holdorph@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[13:15:54 EDT(-0400)] * lennard1 (n=sparhk@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[13:58:31 EDT(-0400)] * SusanB (i=user@susan-x200.its.yale.edu) has left ##uportal
[14:16:29 EDT(-0400)] * lennard2 (n=sparhk@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[15:03:33 EDT(-0400)] * lennard1 (n=sparhk@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[15:45:50 EDT(-0400)] * Blaz (n=blaz@blaz.is-a-geek.org) has left ##uportal
[16:14:40 EDT(-0400)] * invisibill (i=80876350@gateway/web/freenode/x-abbavzlmqyopnwxg) has joined ##uportal
[16:16:32 EDT(-0400)] <invisibill> Greetings uPortal devs: I'm trying to wire in an additional data source for a mysql db in the datasourceContext.xml file. Can you point me to an example in the code where I can get a handle on it? do I need to go through hibernate some how to get at it?
[16:18:01 EDT(-0400)] <EricDalquist> what is this data source for?
[16:19:55 EDT(-0400)] <invisibill> I need to query an external mysql db at login time to get some data for use in a portlet.
[16:20:13 EDT(-0400)] <EricDalquist> so the portlet will be accessing the datasource?
[16:20:27 EDT(-0400)] <EricDalquist> or is this going to be used in persondirectory?
[16:20:35 EDT(-0400)] <invisibill> the code will reside in the person-directory library RequestAttributeFilter.
[16:20:41 EDT(-0400)] <EricDalquist> ah ok
[16:20:58 EDT(-0400)] <EricDalquist> then you just add an additional dbcp based datasource
[16:21:07 EDT(-0400)] <EricDalquist> copying one of the existing examples
[16:21:12 EDT(-0400)] <invisibill> I see an example in the CSqlQuery.java file but things are marked deprecated there.
[16:21:27 EDT(-0400)] <EricDalquist> oh, as for how to access it once it is added?
[16:21:40 EDT(-0400)] <invisibill> yeah.
[16:21:54 EDT(-0400)] <EricDalquist> how familiar are you with Spring?
[16:22:21 EDT(-0400)] <invisibill> somewhat familar with spring. something like "datasourceJndiName = PropertiesManager.getProperty("org.jasig.portal.RDBMServices.PortalDatasourceJndiName", "PortalDb");"
[16:22:35 EDT(-0400)] <invisibill> DataSource ds = RDBMServices.getDataSource(datasourceJndiName);
[16:22:38 EDT(-0400)] <EricDalquist> that's not really Spring related at all,
[16:22:43 EDT(-0400)] <EricDalquist> that is legacy uPortal code
[16:22:55 EDT(-0400)] <EricDalquist> so you need to create a new class
[16:23:03 EDT(-0400)] <EricDalquist> that has a method declaration like:
[16:23:13 EDT(-0400)] <EricDalquist> public void setDataSource(DataSource ds)
[16:23:20 EDT(-0400)] <EricDalquist> which stores that reference as a member variable
[16:23:33 EDT(-0400)] <EricDalquist> you then declare that class in one of the spring context XML files for the portal
[16:24:00 EDT(-0400)] <EricDalquist> and as a property you would do <property name="dataSource" ref="nameOfTheDSBeanYouAdded"/>
[16:24:17 EDT(-0400)] <EricDalquist> when Spring creates an instance of your class it will inject a reference to your datasource
[16:24:35 EDT(-0400)] <invisibill> ok. is that what the PortalDbLocator.java does?
[16:24:38 EDT(-0400)] <EricDalquist> but I have to run right now ... be back on later today
[16:58:59 EDT(-0400)] <invisibill> Thanks for your help eric!
[17:26:33 EDT(-0400)] * lennard2 (n=sparhk@wsip-72-215-204-133.ph.ph.cox.net) has joined ##uportal
[18:11:37 EDT(-0400)] * athena7 (n=athena@adsl-75-58-127-15.dsl.wlfrct.sbcglobal.net) has joined ##uportal
[18:21:56 EDT(-0400)] * lennard2 (n=sparhk@wsip-72-215-204-133.ph.ph.cox.net) has left ##uportal
[19:16:43 EDT(-0400)] * athena (n=athena@adsl-75-58-127-15.dsl.wlfrct.sbcglobal.net) has joined ##uportal
[19:17:49 EDT(-0400)] * athena (n=athena@adsl-75-58-127-15.dsl.wlfrct.sbcglobal.net) has joined ##uportal
[21:09:17 EDT(-0400)] * colinclark (n=colin@bas2-toronto09-1176444611.dsl.bell.ca) has joined ##uportal
[22:27:55 EDT(-0400)] * lennard1 (n=sparhk@ip68-98-56-21.ph.ph.cox.net) has joined ##uportal