An update to the great LifeRay Stock Plugin Portlet!
Real-time market quote data is streamed to one or more portlets on the page by Ajax and JavaScript technology. Watch the tickers move in real-time on the screen (with no stress on the back-end; all client side services).
Features:
Quote data is updated on the page in real-time
Support Annoymous and Personalized portlets with different portfolios
Multiple Instance Portlets on the same page
Support JPA 1.0 and 2.0 persistance units and hibernate libraries with maven profile build switches
There are four portlets to choose from; two sizes and two types; session based personalized (AjaxQuote) - Non-logged in or public page (Default)
The project POM build scripts support several maven profiles which creates builds targeted for several portal runtimes (based on the JPA persistence unit 1.0 or 2.0 and the corresponding hibernate libraries).
IBM WebSphere Portal 7.0:
mvn clean install -P jpa10
IBM WebSphere Portal 8.0 and LifeRay Tomcat bundle:
mvn clean install -P jpa20
LifeRay JBOSS bundle (MySQL):
mvn clean install -P jpa20,mysql
- Download a tagged build or build from source the war based on the targeted runtime desired
- Create a database schema (e.g.
OPENFEEDAQ
) - Prepare the application server JNDI datasource connection (
jdbc/openfeedaq
) for IBM Portal (WAS jdbc resource) or either LiferRay bundle of Tomcat (context.xml) or JBOSS (MySQL module) - Deploy to either LifeRay Portal bundle or IBM WebSphere Portal servers
- Place one or more AjaxQuote portlets on either logged in pages or anonymous pages using the corresponding AjaqQuote portlet types (anonymous, miniature)
6. Go into Edit Mode and Personalize the Portlet (enter several stock symbols and indices .DJI, AAPL, as example)
Initial SQL scripts are provided to load the popular company and market symbols for key stroke ahead find company functionality; into the openfeed schema.
https://github.com/openfeed/AjaxQuotePortlet/tree/master/sql
LifeRay 6.1 GA2 has a issue with (LPS-29103) the deployment manager moving the Spring context listner directive deep down in the bottom of the post deployed web.xml. Use the following web.xml script post deployment for the portlet to function:
https://github.com/openfeed/AjaxQuotePortlet/tree/master/liferay_6.1_GA2_post_deployment_fix
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>com.liferay.portal.kernel.servlet.PluginContextListener</listener-class>
</listener>
<listener>
<listener-class>com.liferay.portal.kernel.servlet.SerializableSessionAttributeListener</listener-class>
</listener>
If you are using eclipse; in order to get rid of IDE errors in the jar project you will have to uncomment this line in the backend jar pom to indicate true:
<activeByDefault>
true
</activeByDefault>
https://github.com/openfeed/AjaxQuotePortlet/blob/master/ajaxquote_jar/pom.xml
TRUNCATE TABLE wdgt_user;
TRUNCATE TABLE wdgt_user_ui;
TRUNCATE TABLE wdgt_user_ui_market_entity;
INSERT INTO equity_entity (symbol, exchange, company_name, industry) VALUES
('.IXIC', 'INDEXNDQ', 'NASDAQ Composite', 'All'),
('ACN', 'NYSE', 'Accenture Plc', 'Business Support Services - NEC');
Vanilla WebSphere Application Server test portal harness support can be configured in the web.xml. Make sure that before you run a maven build you edit \ajaxquote_war\WebContent\WEB-INF\web.xml
by uncommenting the PortalEquitiesServlet servlet xml instructions.
<servlet>
<servlet-name>PortalEquitiesServlet</servlet-name>
<jsp-file>/WEB-INF/jsp/portal/portal_equities.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>PortalEquitiesServlet</servlet-name>
<url-pattern>/portale/*</url-pattern>
</servlet-mapping>