Login to Weblogic Admin Console and under Domain Section on the left hand side Click on
Environment -> Coherence Clusters link
Click New Button and provide a name for the cluster you want to create. Click Next. On this page you can configure your cluster properties including Unicast Address/Port and Multicase Address/Port.
Click Next to select a Target Managed Server
Click Finish to complete creating a Coherence Cluster.
Next Step is to create Coherence Servers. Click on Coherence Servers to the left under Environments and Click New button. This screen also allows to attach a coherence server to a coherence cluster.
After server is created click on the server from the list and click on Server Start Tab. Here under classpath provide the .jar location of coherence.jar. Make sure all servers under the cluster are pointing to the same .jar so they all connect as services to the same master.
To Start the servers, select all servers created and click start.
and there you have it a cluster of coherence servers running
Thought Power
Monday, February 6, 2012
Weblogic 10.3.3 & JPA 2.0
Weblogic 10.3.3 is not JPA 2.0 compliant. Here are the steps which worked for me.
I was able to make it work only with a .EAR. .WAR did not work.
Technologies used in this example:
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic- web-app.xsd">
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
Then Create weblogic-application.xml file under META-INF folder of the EAR project. Content of weblogic-application.xml file should have the following entries.
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.2/weblogic-application.xsd">
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
<wls:prefer-application-packages>
<wls:package-name>antlr.*</wls:package-name>
<wls:package-name>org.apache.commons.*</wls:package-name>
<wls:package-name>org.hibernate.*</wls:package-name>
<wls:package-name>org.springframework.*</wls:package-name>
<wls:package-name>javax.persistence.*</wls:package-name>
</wls:prefer-application-packages>
</wls:weblogic-application>
This should help deploy a JPA2.0 compliant web application on 10.3.3.
I was able to make it work only with a .EAR. .WAR did not work.
Technologies used in this example:
- Spring Core 3.0.5
- Hibernate 3.5.6-FINAL
- Maven 3.0.3
- Create a maven .EAR project
- Add your .WAR as a module
- Make sure Weblogic knows to pick up the .jars/classes provided by the .WAR rather than the native classes. Do the following to accomplish this. Add weblogic.xml to the WEB-INF of the .WAR file
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic- web-app.xsd">
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
Then Create weblogic-application.xml file under META-INF folder of the EAR project. Content of weblogic-application.xml file should have the following entries.
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.2/weblogic-application.xsd">
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
<wls:prefer-application-packages>
<wls:package-name>antlr.*</wls:package-name>
<wls:package-name>org.apache.commons.*</wls:package-name>
<wls:package-name>org.hibernate.*</wls:package-name>
<wls:package-name>org.springframework.*</wls:package-name>
<wls:package-name>javax.persistence.*</wls:package-name>
</wls:prefer-application-packages>
</wls:weblogic-application>
This should help deploy a JPA2.0 compliant web application on 10.3.3.
Thursday, September 22, 2011
Apache Maven
Maven is a great build tool to bring into your organization and software development process in the Java space. We are yet to be disappointed with it. It is a great way to manage a project and its dependencies and combined with tools like
Maven plugins are amazing. Core plugins help in compiling Java source code. Packaging tools will help in building projects as .ear, .war, .jar etc.
Reporting tools like emma for code coverage, surefire for running unit tests etc will help management monitor the progress and quality of Java projects.
Maven 3 and above have a console built into it which help in caching builds and eventually save time every time you build a project. Check it out, an excellent feature. We have seen up to 20% time saving for subsequent builds after the first build completes.
Overall the maven Eco-system listed above is a win-win for development teams, support teams & management to delivering a quality software product.
Maven: http://maven.apache.org/
Hudson: http://hudson-ci.org/
Nexus: http://nexus.sonatype.org/
Artifactory: http://www.jfrog.com/products.php
Code snippets in future blog postings.
- Nexus, Artifactory which help manage project and external artifacts
- Hudson for continuous integration
- Integration with IDE's like Eclipse
Maven plugins are amazing. Core plugins help in compiling Java source code. Packaging tools will help in building projects as .ear, .war, .jar etc.
Reporting tools like emma for code coverage, surefire for running unit tests etc will help management monitor the progress and quality of Java projects.
Maven 3 and above have a console built into it which help in caching builds and eventually save time every time you build a project. Check it out, an excellent feature. We have seen up to 20% time saving for subsequent builds after the first build completes.
Overall the maven Eco-system listed above is a win-win for development teams, support teams & management to delivering a quality software product.
Maven: http://maven.apache.org/
Hudson: http://hudson-ci.org/
Nexus: http://nexus.sonatype.org/
Artifactory: http://www.jfrog.com/products.php
Code snippets in future blog postings.
Saturday, September 17, 2011
The Power of Cassandra
Apache Cassandra is a great NoSQL solution in building highly scalable websites. It is highly fault tolerant and is achieved through automatic replication. Helps in handling very large amounts of data and with high availability.
Cassandra can be daunting to learn and its a different way of thinking than the traditional relational databases. Also it is probably not a replacement of the relational databases and might not fit every problem domain. So selection of Cassandra should be done with care.
We have had the privilege of using Cassandra in one of our solutions and we are excited to see how its going to help us scale. A simple how and when to use Cassandra blog with scalability charts is in our plans. Stay tuned for updates.
Cassandra: http://cassandra.apache.org/
Cassandra can be daunting to learn and its a different way of thinking than the traditional relational databases. Also it is probably not a replacement of the relational databases and might not fit every problem domain. So selection of Cassandra should be done with care.
We have had the privilege of using Cassandra in one of our solutions and we are excited to see how its going to help us scale. A simple how and when to use Cassandra blog with scalability charts is in our plans. Stay tuned for updates.
Cassandra: http://cassandra.apache.org/
Java & Springsource
Java combined with Spring Framework is a great delivery model for Internet solutions. Spring abstracts out code and capabilities and makes developers life easy to just work with the business logic.
This helps in developing projects with smaller footprint and smaller code base and are easy to manage. We have been able to achieve 100% code coverage with JUnits in projects and all credit goes to the thought put into developing the frameworks. To be able to automate testing of code which has a small footprint also helps organizations save time and money by eliminating the nightmares of peer code reviews and helps in building quality products.
The delivery model for Service Oriented Architecture (SOA) both Restful and SOAP has become very easy. Combine Java with a build tool like Maven and without the need of any other frameworks we have brought up services within hours which are production ready.
Kudos to JAVA and the kudos to the thought power which went into Spring framework.
Java: http://www.oracle.com/technetwork/java/index.html
Spring: http://www.springsource.org/
This helps in developing projects with smaller footprint and smaller code base and are easy to manage. We have been able to achieve 100% code coverage with JUnits in projects and all credit goes to the thought put into developing the frameworks. To be able to automate testing of code which has a small footprint also helps organizations save time and money by eliminating the nightmares of peer code reviews and helps in building quality products.
The delivery model for Service Oriented Architecture (SOA) both Restful and SOAP has become very easy. Combine Java with a build tool like Maven and without the need of any other frameworks we have brought up services within hours which are production ready.
Kudos to JAVA and the kudos to the thought power which went into Spring framework.
Java: http://www.oracle.com/technetwork/java/index.html
Spring: http://www.springsource.org/
Subscribe to:
Posts (Atom)





