Deploying WebLogic Spring SCA Applications
2011-01-17 15:58
357 查看
This chapter tells how to deploy WebLogic Spring SCA applications to Oracle WebLogic Server:
Preparing Deployment Units
Configuring the Deployment Descriptor
Bundling Libraries
Deploying in a Cluster
Deploying WebLogic Spring SCA Applications Using Other Tools
Runtime
Note:
Support for using WebLogic Spring SCA applications as components in SCA composites is available as a Technical Preview in the current release of Oracle SOA Suite. However, documentation for that feature is not yet available in Oracle SOA Suite.
A typical WebLogic SCA application bundles the Spring application context file in the
The organization of a sample WebLogic Spring SCA application EAR archive is shown in Example 9-1:
Example 9-1 Sample WebLogic Spring SCA application EAR
The organization of a sample WebLogic Spring SCA application WAR archive is shown in Example 9-2:
Example 9-2 Sample WebLogic Spring SCA application WAR
When referring to a shared Web application library, you can also add an optional
Note:
Oracle recommends that you provide a unique
Example 9-3 shows an example of
Example 9-3 library-ref Element in weblogic-application.xml
Example 9-4 library-ref Element in weblogic.xml
WebLogic SCA supports Spring 2.0.6 or later. Spring 2.5.3 is recommended.
If multiple Spring application context files are used during a deploy within the same application, WebLogic SCA Runtime wires the matching services and references, ignoring the bindings for internal wiring. This requires use of the optional
Preparing Deployment Units
Configuring the Deployment Descriptor
Bundling Libraries
Deploying in a Cluster
Deploying WebLogic Spring SCA Applications Using Other Tools
Runtime
Note:
Support for using WebLogic Spring SCA applications as components in SCA composites is available as a Technical Preview in the current release of Oracle SOA Suite. However, documentation for that feature is not yet available in Oracle SOA Suite.
Preparing Deployment Units
WebLogic SCA Runtime supports Enterprise Archive (EAR) and Web Archive (WAR) formats as deployment units.A typical WebLogic SCA application bundles the Spring application context file in the
META-INF/jsca/directory, along with the application's POJO classes.
The organization of a sample WebLogic Spring SCA application EAR archive is shown in Example 9-1:
Example 9-1 Sample WebLogic Spring SCA application EAR
META-INF/application.xml META-INF/weblogic-application.xml META-INF/jsca/spring-context.xml MyEJBApp.jar MyWebApp.war APP-INF/lib/MyScaClasses.jar META-INF/jsca/spring-context.xml APP-INF/classes/MyScaPojo.class
The organization of a sample WebLogic Spring SCA application WAR archive is shown in Example 9-2:
Example 9-2 Sample WebLogic Spring SCA application WAR
WEB-INF/web.xml WEB-INF/weblogic.xml WEB-INF/lib/MyScaClasses.jar META-INF/jsca/spring-context.xml MyScaPojo1.class MyScaPojo2.class
Configuring the Deployment Descriptor
You must add a<library-ref>element to the deployment descriptor for a application.
When referring to a shared Web application library, you can also add an optional
<context-root>element to declare the context root of the library module. This ensures that the context root is set to the configured value and will not conflict with other WebLogic SCA applications deployed on the same server and referring to the same shared library.
Note:
Oracle recommends that you provide a unique
<context-root>for each WebLogic Spring SCA application. When multiple applications are deployed into a single server or a cluster, each application has its own library reference to
weblogic-sca-1.0.war. Not specifying different context roots for each application will result in a context root conflict, because every WebLogic SCA application uses the default context root specified in
weblogic-sca-1.0.war.
Example 9-3 shows an example of
<library-ref>and
<context-root>in an EAR's
weblogic-application.xmldescriptor, and Example 9-4 shows an example of
<library-ref>and
<context-root>in a WAR's
weblogic.xmldescriptor.
Example 9-3 library-ref Element in weblogic-application.xml
<?xml version="1.0" encoding="UTF-8"?> <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90"> <library-ref> <library-name>weblogic-sca</library-name> <context-root>weblogic-sca-ctx-root1</context-root> </library-ref> </weblogic-application>
Example 9-4 library-ref Element in weblogic.xml
<?xml version="1.0" encoding="UTF-8859-1"?> <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90"> <library-ref> <library-name>weblogic-sca</library-name> <context-root>weblogic-sca-ctx-root1</context-root> </library-ref> </weblogic-application>
Bundling Libraries
WebLogic Spring SCA applications must bundlespring.jarunder
APP-INF/libfor EARs and under
WEB-INF/libfor WARs). Spring has a dependency on
commons-logging, therefore, that jar must also be bundled with the application.
WebLogic SCA supports Spring 2.0.6 or later. Spring 2.5.3 is recommended.
Deploying in a Cluster
A WebLogic Spring SCA application can be deployed in a homogenous clustered environment. Cluster deployment deploys the application to every node, and since most request processing is stateless (stateful ones use the database for storing their state), a load balancer or a plug-in can route the request to any node.Deploying WebLogic Spring SCA Applications Using Other Tools
You can also deploy WebLogic Spring SCA applications in standalone WebLogic Server using Oracle Enterprise Pack for Eclipse (OEPE) and Oracle JDeveloper. See Chapter 3, "Tools Support," for more about WebLogic SCA support in those tools.Runtime
When a WebLogic Spring SCA application is deployed, its services are exposed by the appropriate binding component implementations. For a service defined withbinding.ws, the Web Service binding component implementation publishes a Web Services endpoint. For a service defined with
binding.ejb, the EJB binding component makes the EJB available in JNDI.
If multiple Spring application context files are used during a deploy within the same application, WebLogic SCA Runtime wires the matching services and references, ignoring the bindings for internal wiring. This requires use of the optional
defaultattribute in an
sca:referenceelement. See sca:reference Element, for more information.
相关文章推荐
- Mastering BEA WebLogic Server: Best Practices for Building and Deploying J2EE Applications
- Deploying Spring MVC Based Web Applications to OSGi Using Apache ServiceMix
- Developing WebLogic SCA Applications for Oracle WebLogic Server
- Deploying WebLogic SCA Runtime to WebLogic Server
- Developing Web Applications for WebLogic Server
- Mongrel: Serving, Deploying, and Extending Your Ruby Applications
- weblogic上发布包含spring配置的应用报错
- X11/Linux下发布Qt程序(Deploying Qt Applications for X11/Linux)
- weblogic与spring事务集成过程
- Secures your applications with Spring Security 5 and Keycloak
- Tips: What you need do before deploying your web applications
- Spring Boot Dubbo applications.properties 配置清单
- Smart Client Deployment with ClickOnce(TM): Deploying Windows Forms Applications with ClickOnce
- spring data+eclipselink部署到weblogic
- 在WEBLOGIC9.1上部署SPRING+WEBWORK 的WEB应用
- weblogic各个版本对JDK和Spring的支持度
- 使用idea创建springboot项目并打成war包发布到weblogic上
- 带tiles2和spring-security(2.0.5)的SSH项目部署到Weblogic10gR3下出现的问题
- SCA+SPRING组件之间的引用细节
- Tuning Weblogic applications