Oracle TopLink delivers a proven enterprise Java solution for all of your persistence needs based on high performance and scalability, developer productivity, and flexibility in architecture and design. TopLink is a member of the Oracle Fusion Middleware family of products, which bring greater agility, better decision-making, and reduced cost and risk to diverse IT environments today.
- What is TopLink?
TopLink is thethe industry's most advanced object-to-relational
persistence framework. It provides a highly flexible and productive
mechanism for storing Java objects and Enterprise Java Beans (EJBs)
in relational database tables. TopLink offers developers excellent
performance and choice, working with:
- any database
- any application server
- any development toolset and process, and
- any J2EE architecture.
With release 10.1.3, TopLink includes support for mapping objects
to XML documents and to legacy systems.
- What
does TopLink cost? How is it licensed?
Under the OTN license, TopLink is free to download for evaluation
and use during development. A production license is included with
all editions of OracleAS or can be licensed separately for $5K per
CPU.
- Is TopLink an application
or EJB server?
TopLink is neither an application nor an EJB server—it is
a pure Java class library. Because TopLink is certified 100% Pure
Java, it is capable of running within any certified Java environment.
With the enterprise classes, TopLink integrates with application
and EJB servers. TopLink also provides container-managed persistence
(CMP) for Entity Beans in Oracle Application Server Containers for
J2EE (OC4J), IBM WebSphere, and BEA WebLogic.
Refer to TopLink
Application Architectures for more information.
- Is there an overview of
TopLink?
Yes, an overview is included in the Quick
Tour.
- What does TopLink include?
TopLink includes the following:
- TopLink runtime library (called the Foundation Library)
- Development tool: TopLink Workbench
- Runtime tool: Web Client
- What Java types does
TopLink support?
For relational database, TopLink automatically converts values
to and from the following Java types:
- java.lang: Boolean, Float, Integer, String, Double, Long, Short,
Byte, Byte[ ], Character, Character[ ]; all the primitives associated
with these classes
- java.math: BigInteger, BigDecimal
- java.sql: Date, Time, Timestamp
- java.util: Date, Calendar
For other Java types, you must use an object-type, type conversion,
or transformation mapping; or transform the value in the direct-to-field
get/set methods. Refer to Simple
Type Translator for information on supported Java types supported
in XML mapping.
- What databases does
TopLink support?
TopLink can communicate with any relational database that has a
JDBC-compliant driver available such as Oracle, IBM Universal Database,
IBM Informix, IBM Cloudscape, Microsoft SQL Server, Microsoft Access,
and Sybase Adaptive Server. TopLink supports both the JDBC 1.x and
2.0 standards.
Refer to Oracle
TopLink 10.1.3 Database Support for additional information.
- What kind of
Java objects does TopLink support (e.g., Java Objects, EJBs, JavaBeans)?
TopLink supports persistence for Plain Old Java Objects (POJOs)
and JavaBeans, EJB bean managed persistence (BMP) in any app server,
and container-managed persistence (CMP) for Entity Beans in Oracle
Application Server Containers for J2EE (OC4J), IBM WebSphere, and
BEA WebLogic.
- What architectures
does TopLink support (e.g., J2EE, EJB, JSP)?
TopLink is architecture neutral. It does not dictate how you architect
your application and has been used in thousands of applications
using J2SE, J2EE, EJB, JSP, Struts, etc.
- Can I use TopLink
Foundation Library in my application server?
TopLink Foundation Library can run in any application server running
in a Java Virtual Machine (JVM). You can use regular Java objects
or integrate with bean-managed persistence (BMP) Entity Beans. You
need the TopLink container persistence (CMP) Foundation Libraries
if you are going to use TopLink with CMP Entity Beans on Oracle
Application Server Containers for J2EE (OC4J), BEA WebLogic, or
IBM WebSphere application servers.
- With EJB 2.x and 3.0,
do I still need TopLink?
Yes. The EJB 2.x and 3.0 specifications define two types of persistence
mechanisms for Entity Beans: container managed persistence (CMP)
and bean managed persistence (BMP). But the specification is just
that—a specification and not an implementation. TopLink provides
an implementation of CMP for the Oracle Application Server Containers
for J2EE (OC4J), BEA WebLogic, and IBM WebSphere application servers.
TopLink can also be used for BMP in any EBJ server.
- Does
TopLink work in a multithreaded environment?
TopLink is 100% thread safe and can be used in JSP/Servlet or EJB
applications that require thread safety.
- Where can I find demos?
A number of demos can be found on the TopLink
Demos page on OTN. Extensive examples are also included with
the TopLink distribution download accessible from the TopLink
page on OTN.
- Is there a TopLink user forum?
Yes. The TopLink
Forum on OTN is very active with participation from both TopLink
users and members of the TopLink engineering team.
- Does TopLink have a GUI
for mapping? Do I have to use it?
Yes, TopLink does have mapping tools and no, you don't have to
use them. Mapping tools are integrated into JDeveloper and also
available in the stand-alone TopLink Workbench. They provide a great
productivy boost over hand editing XML deployment descriptor files
or coding directly on the TopLink Foundation Library API. The TopLink
mapping tools identify problems in your mappings so that you don't
have to run your code to discover you've made and error. Tracking
down a mapping problem on a large project with 100's of XML mapping
files is not a trivial task. The TopLink mapping tools make O/R
mappings manageble.
- Does TopLink perform
code generation to persist objects?
Because TopLink uses a metadata architecture, it does not need
to generate any code to enable your application's persistence.
TopLink can generate:
- The TopLink project and associated descriptors into a single
Java class that, when compiled, can be used in place of the runtime
deployment XML file.
- A table creator Java class that when compiled can create all
the tables on the database with required constraints.
- Source code for the classes defined in the project.
- Java object model, EJB-CMP EntityBean model, and EJB-BMP EntityBean
model from an existing database schema.
TopLink does generate classes for EJB2.0 CMP.
- Does TopLink
require me to subclass a special class or implement a special interface?
TopLink does not force a developer to subclass from one of its
classes or use special types to maintain relationships. You could
build a domain model to map persistently that has no dependencies
on TopLink.
Refer to the Building Superior
Java Applications whitepaper for details.
- Does TopLink use get/set
methods to access persistent instance variables or does it go straight
to instance variables?
TopLink can use either get/set methods or directly access instance
variables. Protected and private instance variables can also be
directly accessed.
See also Can TopLink map
the private and protected fields?.
- Why does TopLink use runtime
reflection?
In an interview given to The Server Side, TopLink architect Mike
Keith answered this question by saying:
TopLink has always made extensive use of reflection. We have also
always claimed that execution in a reflection-based architecture
is no slower than non-reflection-based products, as long as the
reflection artifacts can be cached. This has proven to be true and
other products have also backed this claim up. In fact anybody that
does a quick benchmark of reflective method invocation or field
access can see similar results.
Refer to the entire article, TopLink:
10 Years of Persistence, for more information.
- How does TopLink
support Oracle's grid computing initiative?
TopLink allows applications to be developed and enhanced flexibly,
to fit into a service-oriented architecture. By enabling loose coupling
between the application and persistent data, TopLink helps developers
optimize their applications for the grid. In addition, TopLink provides
crucial persistent functionality used in applications and other
Oracle development frameworks.
- Does TopLink comply with
the JDO (JSR-012) specification?
No, TopLink does not implement the complete JDO 1.0 specification.
Although support for some of the JDO API was provided in past releases
of TopLink, this API is deprecated in 10.1.3 and will be removed
in a future release.
- How do I configure
my environment to work with TopLink?
After installing TopLink, you must configure your development system
to use the TopLink classes, as well as allow TopLink to access the
core Java classes, Java virtual machine (JVM), and your domain classes.
Refer to
Using an Integrated Development Environment and
Using TopLink Workbench for details. The MetaLink
Knowledge Base also contains detailed information. In general
you must:
- Ensure that a valid JVM exists in your path.
- Ensure that the TopLink Foundation classes (toplink.jar) are
in your classpath.
- Ensure that all domain classes, that you will want to map persistently
using TopLink, are included in your classpath.
- Ensure that the path to your JDBC driver classes are included
in your classpath.
- What additional functionality
is available in the TopLink container-managed persistence (CMP) Foundation
Libraries?
TopLink CMP Foundation Libraries are supersets of the TopLink Foundation
Library. You get all of the same functionality. However, these libraries
also allow you to use TopLink with CMP Entity Beans on BEA WebLogic
and IBM WebSphere application servers.
- What
application servers does TopLink support?
TopLink can be used within any compliant J2EE and Web container
with various persistence architectures. However, TopLink does have
explicit support and certification testing performed with each release
on: Oracle Application Server, BEA WebLogic, and IBM WebSphere.
Other containers are supported through standard J2EE integration
and may require minor customizations.