Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Data Views in Liquid Data

Data Views in Liquid Data

BEA Liquid Data for WebLogic provides a unified view of data aggregated from multiple resources such as databases, XML files, Web services, EJBs, or Java 2 Connector Architecture (J2CA) adapters. At a very high level, Liquid Data can be thought of as an enterprise-wide JOIN tool that provides an XML view of data from any source. This data can be accessed using evolving technologies such as XQuery.

Liquid Data provides several different mechanisms through which Data Views in Liquid Data can be leveraged by the rest of the BEA Platform. In this article I'll introduce several ways of accessing Data Views outside of the Liquid Data for WebLogic Data View Builder itself.

Quick Introduction to Data Views
Data Views are rich data sources built using XQuery technologies to aggregate data from discrete sources using a single query. BEA Liquid Data for WebLogic provides a rich graphical interface, called the Data View Builder, through which users can set up the data sources they need to access, set up security and authentication information, and then define various queries that they need to execute. The Data View Builder allows users to define XML Schemas for the individual data sources or the resulting data that they get from the execution of the query.

Data Views can aggregate data from various sources such as relational databases (using standard SQL or stored procedures), XML, or delimited files stored in a file system; Web services; and legacy EIS. Using the Data View Builder, one or more of these sources' schemas are aggregated to form the target schema. Users can define JOIN conditions, and other data aggregation or selection logic that you are used to doing while accessing relational data using SQL. Users also have the ability to design custom functions to access data in different way.

This article assumes that you have already created some Data Views. I'll focus on the various mechanisms available to access them.

Accessing Data Views
Data Views in Liquid Data are available through various access mechanisms to the rest of the BEA Platform. Any Java program with the appropriate security credentials, and that can access the Java Naming and Directory Interface (JNDI), can issue queries against a Liquid Data server. The different types of Java programs include:

  • Stand-alone Java applications
  • Java servlets
  • JavaServer Pages (JSPs)
  • JavaBeans
  • Enterprise JavaBeans (EJBs)
  • Web services
  • Business process management (BPM) components or workflows in BEA WebLogic Integration
  • Portlets in BEA WebLogic Portal
Access to Data Views Through EJB Clients
A stateless session EJB exposes the query API, which delegates queries through a query processor to the underlying data stores. Any Java program that can access EJBs can use this EJB-based API. Stand-alone Java applications, Javabeans, and other EJBs all use this API, and collectively are called EJB clients. These programs can use the EJB remote or local interfaces directly.

EJB clients are any applications that invoke queries on the Liquid Data server using the Liquid Data EJB API. All Java clients can leverage the flexibility and data integration properties offered by XQuery to meet their data access needs. All of these clients access the EJB remote interfaces directly; therefore, they can be collectively characterized as EJB clients. The Data View builder that is part of the core Liquid Data product is a special kind of EJB client.

The four basic steps to access Data Views through this mechanism are:

  • Connect and authenticate with a Liquid Data server
    JNDI is used to look up the EJBs and standard EJB calls are used to connect to a Liquid Data server. Once connected, queries can be executed anonymously or through authentication itself by passing a security context to the corresponding JNDI environment properties SECURITY_PRINCIPAL and SECURITY_CREDENTIALS.

  • Specify parameters for the search query
    In most cases users would want to execute queries based on certain conditions. XQuery-based parameters are used to pass search conditions to a Liquid Data server. The following code snippet is an excerpt of how to pass search parameters to a data view.

    import com.bea.ldi.server.common.QueryParameters;
    QueryParameters qp = new QueryParameters();
    qp.setString("title", "WebLogic Developers Journal");

  • Execute the query on the Liquid Data server There are different mechanisms to execute the query based on the type of query being executed. If an ad hoc query is being executed you would use

    execute (queryString, [qp]) command

    If the query is a stored, named query, you would use

    executeStored (queryName, [qp]) command

    The "qp" parameter is optional based on whether you are passing query parameters.

  • Receive and process the results to the query
    When the query is executed, the Liquid Data server returns an unformatted XML string. You can use the toXML() or getDocument() methods to receive an XML or DOM format with the results of the query.

    Access to Data Views Through JSP
    Liquid Data for WebLogic provides a set of tag libraries that can be used by a JSP to access Data Views. The basic tags provided are a "query" tag and a "param" tag.

    The "query" tag is used to connect to a Liquid Data server and execute a query. It takes the name of the query, the connection to the server, and the username and password needed to authenticate with the server

    The "param" tag is used to pass parameters for the query using name/value pairs. Listing 1 shows some sample code on how to use the "query" and "param" tags.

    You can use these tag libraries to execute both ad hoc and stored queries. The resulting XML can be displayed on the JSP using XLST translations. WebLogic server comes with an XSLT JSP Tag Library that can be used for an XSL transformation. Alternatively, you could use a third-party or open source library for this functionality.

    Access to Data Views Through Web Services
    A stored query in Liquid Data can be exposed as a Web service through the Liquid Data administration console. The URL of the WSDL of a generated Web service has the following pattern:


    Once you have exposed a Liquid Data query as a Web service, you would use standard Web services mechanisms to look up the WSDL and execute the Web service.

    BEA Liquid Data for WebLogic 8.1 also provides a control in WebLogic Workshop that can be used to invoke this query. WebLogic Workshop can also be used to test the Liquid Data Web service-based query.

    Access to Data Views Through WebLogic Integration BPM Components
    BPM components in WebLogic Integration would typically use the stateless session EJB API discussed above to access Liquid Data queries. A business operation in WebLogic Integration would define the JNDI name of the Query EJB to be invoked (com.bea.ldi.server.QueryHome) and the method to invoke on the EJB.

    Liquid Data helps BEA WebLogic Integration integrate data from various relational, non-relational, and Web sources. The Liquid Data views are read-only. WebLogic Integration components such as workflows are used to initiate two-way transactions from the rich set of data that is provided using the Data Views in BEA Liquid Data for WebLogic.

    Access to Data Views Through Portlets
    Portlets and other components in BEA WebLogic Portal can use all the different mechanisms discussed to access Liquid Data queries. Portlets could use Web services or the JSP tag libraries. Other Portal components could use the EJB APIs.

    Liquid Data thus becomes a rich data feed and WebLogic Portal becomes the layer that handles the presentation of this rich data.

    This article has briefly introduced the several ways to leverage Data Views in BEA Liquid Data for WebLogic outside of Liquid Data itself. Basically, any piece of Java code that can access an EJB or a Web service can execute queries on a Liquid Data server. Even JSP-based applications can leverage Liquid Data queries directly, without having to go through an EJB tier.


  • E-Docs for Liquid Data 1.1: http://e-docs.bea.com/liquiddata/docs11
  • More Stories By Kunal Mittal

    Kunal Mittal is a consultant for implementation and strategy for Web services and services-oriented architectures. He has co-authored and contributed to several books on Java, WebLogic and Web services.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    @ThingsExpo Stories
    Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
    The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
    Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
    Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
    As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...
    Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
    The IoT Will Grow: In what might be the most obvious prediction of the decade, the IoT will continue to expand next year, with more and more devices coming online every single day. What isn’t so obvious about this prediction: where that growth will occur. The retail, healthcare, and industrial/supply chain industries will likely see the greatest growth. Forrester Research has predicted the IoT will become “the backbone” of customer value as it continues to grow. It is no surprise that retail is ...
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
    The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
    DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of bus...
    With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
    DXWorldEXPO LLC announced today that "Miami Blockchain Event by FinTechEXPO" has announced that its Call for Papers is now open. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Financial enterprises in New York City, London, Singapore, and other world financial capitals are embracing a new generation of smart, automated FinTech that eliminates many cumbersome, slow, and expe...
    Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
    DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
    DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
    DXWorldEXPO LLC announced today that ICOHOLDER named "Media Sponsor" of Miami Blockchain Event by FinTechEXPO. ICOHOLDER give you detailed information and help the community to invest in the trusty projects. Miami Blockchain Event by FinTechEXPO has opened its Call for Papers. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Miami Blockchain Event by FinTechEXPO also offers s...
    Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
    Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
    Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
    Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...