Showing posts with label weblogic. Show all posts
Showing posts with label weblogic. Show all posts

Saturday, September 20, 2014

NetBeans: 8.0.1 Released with bunch of out-of-the-box tools = productivity++

In every NetBeans release it provides out-of-the-box tools that leverage the java standards and other tools toward the web standards, alongside great papular market tools that increases developer daily productivity.

NetBeans editor analyzes code to work efficiently with great tips and refactoring templates for more clear and cleaner code, provides migration from other JDKs toward Java 8, and it works for Java SE 8, Java SE Embedded 8, and Java ME Embedded 8.

The IDE also has a range of new enhancements that further improve its support for Maven and Java EE with PrimeFaces; new tools for HTML5, in particular for AngularJS; and improvements to PHP and C/C++ support.

Beside that the IDE has an interesting new features especially for JavaScript developers whom seeks for writing modular code, it comes with built-in support RequireJS, that provides modularity and enterprise features for JavaScript.

More interesting features:

  1. You can now debug your JavaScript files with Karma.
  2. Node.JS and Bower built-in integrations let you install modules directly within the IDE.
  3. Support for latest application servers GlassFish 4.1, Tomcat 8.0.9, WildFly 9, and WebLogic 12.1.3
  4. IDE comes with pre-bundled GlassFish 4.1 and Tomcat 8.0.9
  5. Latest PrimeFaces v5.0 framework bundled with IDE.
  6. Improved Git support

GlassFish 4.1 is now Java SE 8 certified, so you can develop your Java EE 7 projects with JDK 8 for more modularity and cleaner code, yeah have fun :)

For the complete set of bunch of tools please visit NetBeans IDE 8.0.1 Information

Hungry to code, so what are you waiting for?? , Download Netbeans IDE


Thursday, July 18, 2013

Oracle: Feel the fun of Oracle Weblogic & JDeveloper 12c on Mac OS X

Oracle fusion middleware 12c stack is now completed and ready for use and supports cloud platform technology stack. The story Begins by releasing Oracle Weblogic 12c last year 2012, then followed by Oracle database 12c this year 2013, and by this month of July the development IDE JDeveloper 12c (2.1.2.0.0) has been released.

WebLogic 12.1.2 is now available. Moreover, is also bundled with the new JDeveloper 12c. WebLogic 12.1.2 comes in two flavors one of size 179MB zip distribution offers Java EE 6 Full Profile development and includes WebLogic Server and Coherence. The generic installer also includes WebLogic Server and Coherence and is patchable via OPatch.

There are two interesting supported components available in WebLogic 12.1.2 out of the box, that already part of JEE 7, one of them is the Websockets protocol support, and the other is JSON Binding via EclipseLink 2.4.2 MOXy's JSON-binding.

JDeveloper 12c comes with a big bunch of enhancements and technology support, one of interesting components is the support for Java EE and Web Development as the following:

  • Java EE 6 Support: JDeveloper wizards and editors have been updated to work with Java EE 6 specifications, including EJB 3.1, Servlet 3.0, CDI, JPA 2.0, EL 2.2, and more.
  • EJB 3.1 Support: JDeveloper provides support for new EJB 3.1 features including:
    • Singleton Session Bean
    • Simplified No Interface Client View
    • Asynchronous Session Bean Invocations
  • TopLink/JPA 2.0:
    • TopLink supports the following JPA 2.0 features:
    • JPA 2.0 project type and JPA 2.0 persistence unit properties
    • Delimited and derived identifiers
    • Mixed access
    • Unidirectional one-to-many mappings
    • Validation mode
    • Element collection
    • Embeddable mapping
  • HTML5, MathML and CSS3 Support: Updated editors for working with latest HTML5 and CSS3 content.
  • CSS editor: Added ability to invoke Quick doc feature for CSS properties and skinning keys, and other editor improvements.
  • JSP to Facelets conversion: User may optionally choose to convert a project's JSP/JSPX content to Facelets.

For more about all new features of JDeveloper 12c, visit what's new in JDeveloper 12c.

The new abbreviation that sticks to the version 12c (is c for Cloud),and it means that the JDeveloper is an enabled Cloud development IDE.

One of the most interesting features of the JDeveloper 12c that worthwhile is its installer, it is very easy to install and runs on mac OS X operating system rather than its previous 11g versions series, avoiding much of boilerplate system configurations to just install it.

So let's see how we can install it on Mac OS, but first let us get the required software to complete the installation process successfully.

Pre-requests software:

  1. Java Development kit 7 update 25+ or less, it is a critical piece of software that allows the installer to pass the prerequisites successfully. It could be downloaded from here.
  2. Download the JDeveloper 12c Generic installer the works on all platforms (it is a jar package).

That's all; let's now go through the installation process.

Installation process
  1. First open your terminal, and type the following command:

    You should make sure that your java version is version 7 pointed out in your system class path, if version is different, you should make your system class path includes the java 7 version.

    If everything is okay then you will see output like the following:


  2. From the same terminal, change your directory to your JDeveloper downloaded jar file, for example I have downloaded the jar file inside a folder named “Oracle JDeveloper 12c (12.1.2.0.0) (Build 6668)” on my mac desktop. To begin installing the JDeveloper issue the following commands:

    Then followed by:

    If everything is going okay then you should see the following output:


    Then the following screen will popped up, and the installation process begins. Choose your inventory, which will, includes your JDeveloper system preferences folder, and OS group permission. I have changed it from stuff to be everyone, and clicked Ok button.(This screen will appear only on mac OS, but if you are using windows OS, the wizard will pop up for the installation and the process will begin from the next step):


  3. On the next screens “Oracle JDeveloper studio installer”, it includes five wizard steps, click next on each of them till finishing the installation, and seeing the following screen:


  4. Click next and the summary page comes with all installation log, including three options as in the following figure, for me I have choose the first option.

  5. Click finish and JDeveloper will start with new splash screen as the following:


  6. After splash screen finished preparing JDeveloper components, the main IDE should open with a new and neat look and feel:


  7. From Tools menu item, click check for update menu, you can make your new JDeveloper 12c, most updated with required components, one of recommended components is jUnit component.


  8. After finished the updates, we need to create a default domain of Weblogic 12.1.2 bundled server, from run menu click "Start server instance":


  9. The Weblogic configuration dialog will appears to provide password, and other configurations:


  10. Click Ok button and the JDeveloper log, will contains all creation and running conversation entries, wait till you find your log ends with the following entries:

Hence, we are here, than we have finished the installation process of JDeveloper 12c, and created a Weblogic 12c domain, so you can rock and give your hand the touch of JEE6 on the new release.

Happy coding :)


Thursday, October 18, 2012

Weblogic: Enable JPA 2 on WebLogic Server Version: 10.3.5.0

I worked on JDeveloper 11.1.2.2.0 then 11.1.2.3.0 but the two versions bundled with Weblogic Server Version 11g (10.3.5.0).

I decided to work with JPA version 2, but when you use the eclipselink_v2 and use specific features in the API that is related to version 2, you will get the following error:

After a while I found a work around to enable the JPA2 on Weblogic Server Version 11g (10.3.5.0).

Follow the following steps and the server will be happy with the JPA2:
  1. Stop the Weblogic server if it is running.

  2. Navigate to <%SERVER_INSTALLATION_PATH%>\wlserver_10.3\common\bin

  3. Edit commEnv.cmd

  4. Search for the line 'set JAVA_USE_64BIT=false'.

  5. Add the following line under it

    set PRE_CLASSPATH=%MODULES_DIR%\javax.persistence_1.0.0.0_2-0-0.jar;%MODULES_DIR%\com.oracle.jpa2support_1.0.0.0_2-0.jar

  6. Start the server

  7. Test your JPA2 implementation and the server should be happy now.

Saturday, August 4, 2012

Quartz: java.lang.ClassNotFoundException: org.slf4j.Logger while running embedded Weblogic on JDev 11.1.2.2.0

VIP: The post is updated with the original cause.

After working on Oracle Jdeveloper 11.1.2.2.0 for a while, today when I am running my application on embedded Weblogic.
Suddenly I have stuck with the following error in Weblogic deployment stage of my application:


There is no other applications could run. So what is the solution?

I have deleted the embedded Weblogic defaultDomain folder of jdeveloper, and created it again via jdeveloper, but this procedure not succeeds.

The other option is to uninstall jdeveloper and install it again, but this issue is time consuming, it is expanded from installing jdeveloper, configuring the libs, and your applications (There is a work around for this by coping the o.ide and o.jdeveloper folders of your jdeveloper system11.x.x.x.x.x.x.x folder, and past them again in newly created folder.), and I have critical delivery time and I didn’t to this procedure.

After googleing for the problem and reason for a while, I didn't find exact or reason or solution for problem.

So after investigation, the slf4j-api library is not available anymore for Weblogic to start normally, I don't know the reason, but any way here is the solution:

Note: While writing this post the slf4j api library version is 1.6.6.

Solution:
  1. Download the slf4j-1.6.6.zip library from the following site http://www.slf4j.org/download.html.

  2. Extract the zip, to C:\ slf4j-1.6.6

  3. In slf4j-16.6 folder locate the following 2 libs: slf4j-api-1.6.6.jar and slf4j-nop-1.6.6.jar.

  4. Locate the folder called "system11.1.2.2.39.61.83.1". On windows it will be in the following path: "C:\Users\mohamed_taman\AppData\Roaming\JDeveloper\system11.1.2.2.39.61.83.1"

  5. Inside this folder locate folder called " DefaultDomain " inside it locate " lib " folder.

  6. Copy and paste in lib folder the previously mentioned 2 jars "slf4j-api-1.6.6.jar and slf4j-nop-1.6.6.jar".

  7. You can past then in any folder that is visible to Weblogic classpath.

  8. Run your application and it will run now and Weblogic will be happy now.

VIP: Update: the original cause:

After working for another day I found the team has the same error after updating from SVN, and then I realized that the problem is not in JDeveloper, there is a certain library that needs this lib.

I have scanned my project and reviewed what is newly added to the project and libs used, I found that the Quartz Scheduler API lib is used in web by injecting the following line into the web.xml:

First:
I have reverted the above solution to get stuck with the original error.

Second:
I went to folder " C:\Users\mohamed_taman\AppData\Roaming\JDeveloper\system11.1.2.2.39.61.83.1\o.j2ee\drs " and delete my application.

I tried to run other applications, they are runs successfully. So the problem is in my application not JDeveloper.

Note: I used the quartz 2.0.2 this this happens after migration from version 1.x.x to 2.x.x.

Another VIP note: I used Quartz 2.x in normal scheduling and it works normal, the problem raised when I used it in the web.

Note: While writing this post the Quartz library version is 2.0.2.

Solution:
  1. Under your extracted Quartz folder; for example if you extracted the folder like this: " E:\Utilities\Quartz 2.0.2 ", locate folder called " lib (E:\Utilities\Quartz 2.0.2\lib)".

  2. In " lib " folder locate the following 3 libs: slf4j-api-1.6.1.jar , slf4j-log4j12-1.6.1.jar and log4j-1.2.14.jar.

  3. When you add quartz-all-2.0.2.jar to your web project as library, add also all the 3 libs located in step 2.

  4. Run your application and it will run now, and Weblogic will be happy now.

For any help just leave your comment.

Saturday, March 17, 2012

ADF: showPopupBehavior operation & load trigger

Sometimes I need to dual authenticate the entrance of a page that contains a very sensitive information such Payroll page.

In my old days I implement such a case by developing a page to open it as dialog and handle the load in page phase listener life cycle.

Now I will introduce a more easer and professional mechanism for such a case, by opening a popup in page load in a simple way.

Project structure is an ADF fusion application, and ADF web project as the following:



With ADF Faces it's so easy to open a popup on page load. All what I needs to do is to define af:showPopupBehavior operation for af:document tag.

Note: af:showPopupBehavior trigger type should be set to load.
There are a lot of triggers for this operation could be found in "Oracle® Fusion Middleware Web User Interface Developer's Guide for Oracle ADF 11g R2(11.1.2.1.0)" usage and implementation.

This will ensure, it will be executed during document load and will call popup during page rendering phase:


The payroll.jsf page code is as the following:

When you run the application Popup is popped up on page load:


References:
1- Oracle® Fusion Middleware Web User Interface Developer's Guide for ADF 11g Release 2(11.1.2.1.0)
2- ADF Faces Cheat Sheets 11.1.2.1.0

Friday, March 9, 2012

ADF: Creating and Using an ADF Declarative Component

This tutorial shows you how to create ADF declarative component metadata, add ADF Faces components that make up the composite component, and use the declarative component on a JSF page.

In this post ADF: About JSF fragments, ADF regions, declarative components …, i wrote about different declarative component in ADF faces.

You will use wizards to quickly create applications and projects, and a declarative component definition consisting of an attribute, a facet and a method.

The declarative component you will create is panel box containing one label, list of input text, and button. The metadata for the declarative component definition will allow page authors to set the label for a panel box, attach a method to the button to print the input lists after modification, and use built in controllerContext to view page viewId as default value.

To create the declarative component layout, you will use design tools such as the visual editor, Component Palette, and the Property Inspector. Then you will deploy the project to an ADF Library JAR file. For an application to consume the declarative component, you will use the Resource Palette to add the deployed JAR, and then add the deployed JAR to the project that contains JSF pages.

To make use of the declarative component, you will add it to a simple JSF page, edit the pre-defined attributes, create a method and attach it to the declarative component. When you run the application, the page will look similar to this:



Thursday, March 8, 2012

ADF: Stretching a component to (near) 100%

In the past, many users would want their component to stretch to fill 100% of a horizontal area. However, to account for scrollbars that may or may not have been there, they would set the percentage to 98%, etc.

A much better way to do this is to use the new "AFStretchWidth" style class, which will do this automatically for you.

For instance, avoid this:

and instead do this:

You can learn more about ADF Faces layout management here.

Saturday, March 3, 2012

JPA: 2 ways to get container-managed EntityManager in servlet

In Thread-safety when injecting EntityManager post, I wrote about the danger of using field/setter injection to get EntityManager in servlets and compares container-managed EntityManager vs application-managed EntityManager.

What if I need a container-managed EntityManager in my servlet class?
There are 2 ways to do that:

1. type-level injection + JNDI lookup

2. web.xml + JNDI lookup

The persistence-context-ref is declared in web.xml:


Friday, March 2, 2012

JPA: Thread-safety when injecting EntityManager

As I wrote in post Why we need type-level injections in JavaEE, injecting EJB 3 stateful beans into servlet instance fields is not thread-safe. Along the same line, injecting EntityManager with @PersistenceContext into servlet instance variables is not thread-safe, either. EntityManager is just not designed to be thread-safe.

For example, the following code snippet of a servlet class is incorrect:


One way to fix this is to inject EntityManagerFactory instead. EntityManagerFactory is guaranteed to be thread-safe. For example:

Continuing container-managed EntityManager vs application-managed EntityManager.

There are important differences between the injected EntityManager, and the EntityManager created from an injected EntityManagerFactory. Basically, injected EntityManager is container-managed, meaning all of its lifecycle is controlled by the container (web container or EJB container). Application code cannot close it, or otherwise interfere with its life.

In addition, for a container-managed EntityManager, its associated PersistenceContext is automatically propagated along with the underlying JTA, from servlet A to servlet B, from servlet to EJB, from EJB a to EJB B, and so on. As such, EntityManager of the same configuration injected into various classes can share the same PersistenceContext in a call stack.

On the other hand, EntityManager created from EntityManagerFactory is application-managed EntityManager. Application code is responsible for managing its whole lifecycle. And there is no PersistenceContext propagation for application-managed EntityManager.

Are all EntityManager's obtained from EntityManagerFactory application-managed EntityManager? Yes.

Is it possible to get a container-managed EntityManager from EntityManagerFactory? No.

You may have read about the method EntityManagerFactory.getEntityManager(), which returns a container-managed EntityManager. This method was considered and included in the early draft version of Java Persistence API, but was eventually removed from its final release.

JPA: Why we need to specifies the type-level injections in JavaEE?

As I wrote in the Injection level-types in JavaEE5+, JavaEE type-level injection is more verbose than field and setter injections. So why don't we just all use the simple field or setter injections? Well, there are sometimes a type-level injection is more appropriate

1. You want to lazily initialize a field such as a data source or bean. Having the container to initialize a field via field injection or setter injection has its overhead. With type-level injection, you have the resource and EJB reference fully configured without descriptors, but defer the actual initialization. Whenever you need the resource, just look it up.

Type-level injection also works well if you want to reference the injected resource in some non-component utility classes that are in the same naming context. Since only JavaEE component classes can take injections, you can't inject into POJO utility classes. For example, you can



The above example will also if we instead use field or setter injection. But the instance filed in FooServlet class that takes the injection may not be used at all. Another approach is to pass the data source reference injected into FooServlet as method parameters to ServletHelper. But it pollutes the API. It appears more natural, at least to me, to use type-level injection in this case.

2. You want to restrict the scope or sharing of the variable that references the resource. Field and setter injections both use instance variables, which are accessible to all methods and all threads of the current component instance. Instance variables represent shared states. With type-level injections, you typically assign the resource to a local variable and thus is thread-safe.

This is the reason why you shouldn't inject an EJB 3 stateful session bean into a servlet class variable. In so doing, this stateful bean variable will be shared by all request-processing threads running inside the servlet's service method. Servlet is stateless, so it should not keep state (the stateful session bean reference).


JPA: Injection level-types in JavaEE5+

There are 3 types of resource injections in JavaEE in the order of usage frequency:
  1. Field injection.
  2. Setter injection.
  3. Type-level injection. 
Unlike field and setter injections, type-level injections are not really injection. It does not inject anything into anywhere; it just declares a resource reference in a descriptor-free manner.

To use resource injected at type-level, you will need to do a traditional JNDI lookup. What we have saved here, compared to pre-JavaEE-5, is there is no need for deployment descriptors.

A servlet example in glassfish:


Type-level injections are inherently verbose, compared to field and setter injections, where a bare @EJB or @Resource is sufficient in some cases. Field and setter injections can use the field type and parameter type to infer the resource type, respectively.

Type-level injections can't. All the necessary attributes must be present.

  • For @Resource, you must specify at least name and type
  • For @EJB, you must have at least beanInterface and name.

Sunday, January 8, 2012

JEE6: Is war package is the new ear ?

The pragmatic way of modularization and packaging...

It is not only possible to put EJBs and JSR-299 Beans together directly into a WAR - EJBs can be also packaged separately into a JAR. After copying the “ejb-jar” into the [WAR]/WEB-INF/lib folder, the included beans become automatically available to the web app.

No additional configuration or tweaking is required. In the contrary to the the old EAR packaging, all the classes are loaded with the same classloader. There is no difference between packaging the beans in a standalone JAR, or putting the byte code directly into the WEB-INF/classes folder.

You could even sprinkle the beans in as many JARs as you like - the Dependency Injection between them will just work. Because all the JARs inside the WEB-INF/lib are loaded by exactly the same classloader - it just behaves like a single JAR.

The new Java EE 6 WAR-packaging is interesting for the majority of the “business” projects with “weak” requirements regarding the modularization. You can partition your software into dependent pieces, without paying the costs of true JAR-isolation.

The EAR packaging is still interesting for projects with higher modularization requirements - here the EJB-JARs will be loaded with an isolated classloader separately. In the majority of all cases it is just an overhead: it is unlikely, that someone will replace a single EJB-JAR without rebuilding and testing the whole EAR...

from Adam Bien's blog

Thursday, January 5, 2012

IDE: Oracle JDeveloper Versions vs. Oracle Weblogic Server Versions

The last ADF projects when I am trying to run ADF applications build with JDeveloper of version X on a Weblogic Server with a different ADF Runtime version Y installed, I get a very big problems especially when they got tested with QA team.

You need to make sure that the ADF Runtime versions of JDeveloper and Weblogic Server matched.

Next issue is that you can’t install the ADF Runtime on any Weblogic Server you like.

The ADF Runtime will only work with a specific Weblogic Server. As each JDeveloper version comes with its own ADF Runtime version, there is a direct connection between JDeveloper and Weblogic Server.

To help you to use the right combination use the below table:
JDeveloper (ADF Runtime)Weblogic Server
11.1.1.2.010.3.2
11.1.1.3.010.3.3
11.1.1.4.010.3.4
11.1.1.5.010.3.5
11.1.2.0.010.3.5 + Sherman patch
11.1.2.1.010.3.5 + Sherman patch UPDATE1

There is no backward or forward compatibility!

You don’t need to try, I’ve tested most but not all combinations and run into trouble whenever I mixed versions starting from version 11.1.1.0.2.

For my tests I used the production code.

The application was build on JDeveloper under Window 7, the resulting ear file was deployed (using the WLS admin page) on the Weblogic Server on a HP Linux box.

The ADF Runtime installed on the WLS was downloaded from here.

Credits goes to original author Timo Hahn at his post.

Wednesday, December 21, 2011

Cloud: How Oracle's Public Cloud Is Different


By building its public cloud on Exadata and Exalogic appliances and implementing monthly subscription-based pricing, Oracle seeks to challenge Amazon, Rackspace.

Oracle has made a commitment to cloud computing and it sounds serious. Oracle is unlikely to back off its announced cloud services because, unlike other cloud services, they're being offered from Oracle Exadata and Oracle Exalogic appliances.
Oracle cloud services will run on the appliances in Oracle data centers. An Oracle partner, Japanese telecommunications supplier, SoftBank, is offering the same Oracle cloud software stack--on a similar hardware platform--assembled from Oracle's engineered appliances.

"The Oracle cloud is a little different," said Oracle CEO Larry Ellison in his announcement of the Oracle public cloud Wednesday during an afternoon address to the Oracle OpenWorld 2011 user conference in San Francisco. Built on appliances, Oracle's offering is different from Amazon Web Services, Terremark, and Rackspace. The latter build clusters of uniform, x86 commodity servers in racks as opposed to groupings of highly engineered appliances. But Ellison's primary point was that the Oracle cloud was "based on industry standards."

By that, he meant primarily Java, a language based on an international standard. Oracle's cloud runs any applications written in Java, whether those apps are custom enterprise versions or Oracle Fusion apps. Oracle's Siebel, JD Edwards, PeopleSoft, and E-Business Suite applications have been rewritten in Java to form the new Fusion line.

[Oracle is offering online CRM, Oracle applications as software as a service, and the ability to extend applications in the cloud. Is that making Salesforce.com CEO Marc Benioff nervous?]

"Don't try to port Java Enterprise Edition to the Salesforce cloud. It won't run," he said. He also applied the standards-based dictum to SAP, whose applications are built in Advanced Business Application Programming (ABAP). (SAP's NetWeaver development platform supports use of both ABAP and Java.)

Oracle also uses Web service standards, such as SOAP, REST, and XML, to create its public interfaces to its cloud services. Virtual machines in the Oracle cloud will run under Oracle VM 3.0, which adheres to the open source codebase for Xen. With Oracle VM, Oracle cloud users "can manage thousands of virtual machines from one console," said Robert Shimp, group VP of product marketing, in a talk Thursday, the day after Ellison's announcement.

Oracle is different in another way. Unlike Amazon or Rackspace, which charge by the hour to run cloud workloads, Oracle will offer monthly subscriptions, which will come in different-sized packages. That difference may make it more difficult for customers to compare Oracle pricing to Amazon's.

Customers may include a database service, a Java application development service, a Java middleware service that includes the WebLogic application server, and various Fusion applications. Oracle also launched Oracle Social Network, which allows groups within the enterprise to set up impromptu teams, search and tag enterprise content, find prospective team members with needed expertise and co-edit documents. Social Network also forms a communications forum for working with consultants and partners outside the company.

Because Oracle is offering its applications as software available to run in its cloud, its approach can be described as software as a service. It will also work as a development environment, with Oracle offering NetBeans, JDeveloper, and Eclipse tools for developers to work with. When it comes to developing custom applications to run on the cloud, the Oracle cloud is functioning as a platform as a service.

Oracle's commitment to the cloud can be measured by the lead role that Shimp, one of Oracle's most experienced product marketing executives, took in explaining the cloud effort on last day of Oracle OpenWorld.In his talk at the Yerba Buena Arts Center auditorium, Shimp cited the partnership with SoftBank and urged his listeners to watch for the additional partners in the third-party space, of the caliber of a Savvis or AT&T in their role as cloud providers, he said.

Oracle Fusion applications that will be available in the cloud include: FusionCRM, Fusion Human Capital Management (HCM) application, Fusion Talent Management, and Oracle Social Network. The latter can draw information out of CRM, HCM, and Talent in order to advise on the formation teams based on particular types of expertise. The Social Network application can also interface to mobile devices, including Apple's iPhone and iPad.
Both Ellison and Shimp played up the fact that Amazon's EC2 already offers a database service based on the Oracle engine, the same as the one Oracle is offering. Oracle databases and Oracle applications can run inside the enterprise, in the Oracle cloud, or in the Amazon cloud, Shimp pointed out.

The Oracle cloud provides load balancing, security measures, and elastic expansion and contraction to keep resources in line with demand, Shimp said.

While many customers will choose to run workloads on the Oracle appliances under Oracle Linux, Shimp pointed out they will also have the option of running them in the near future under Solaris. Solaris 11 on Sparc servers "will be available in a few weeks" as Solaris 11 becomes generally available.

Solaris offers containers, a different form of virtualization, compared to Oracle VM, Xen, or VMware on x86 servers. Under containers, a single Solaris host can quickly set up hundreds or thousands of virtual machines because each relies on the host's operating system kernel instead of establishing a separate operating system for its own use. As an intensely multithreaded system, Solaris 11 "will be able to instantly deploy thousands of virtual environments," Shimp said.

IT is caught in a squeeze between requests for new applications, services, and device support and demands from upper management to keep budgets lean, staffing light, and operations tight. These are irreconcilable objectives as long as we spend the vast majority of our resources on legacy services.


Friday, December 16, 2011

Weblogic: How to setup & test Oracle WebLogic Server 12c (a quick guide On Windows, Linus & Mac OS X)

Weblogic 12c = JEE6 full profile Edition.

Oracle WebLogic 12c is a, certified, full profile Java EE 6 server.

Here is a quick guide for downloading, configuring and installing Oracle weblogic 12c zipped file (size = 164M) development environment.

Steps:
  1. Download size of wls1211_dev.zip is 164 MB.
  2. Installation requires you to unzip the archive, run some scripts and set the following JVM options: -Xmx1024m -XX:MaxPermSize=256m (without setting the PermSize, the deployment didn't work) refer to  QUICKSTART.
  3. Disc size (server): 383 MB after installation
  4. Disc size (domain): 26 MB after installation
  5. Startup: execution of [DOMAIN-FOLDER]/startWebLogic.sh is fast (< 7 secs)
  6. Deployment: copy the ServerSmokeTest.war into [DOMAIN-FOLDER]/standalone/autodeploy/.
For Installation & configuration (On Windows, Linus & Mac OS X) follow the following steps:
The WLS zip distribution is intended for development use. It is supported on  Windows, Linux and Mac OS X systems. It contains the necessary artifacts to develop and test applications on WebLogic Server. 
An optional supplemental zip (wls1211_dev_supplemental.zip) is available as a separate download. The supplemental zip contains samples, evaluation database (Derby) and L10N console help files. 
The following instructions should help in quickly setting up WLS. Please refer to the general WLS documentation for detailed instructions. 
This version of WLS requires JDK 1.6 as a minimum. 
Ensure that you have the proper JDK version installed and ready for use. 

QUICKSTART
---------------------
Note: don't use any spaces in the paths referred in environment variables like JAVA_HOME, MW_HOME etc...
1. Extract the contents of the zip to a directory. This directory is referred to as MW_HOME (eg: /home/myhome/mywls).

2. Setup JAVA_HOME, JAVA_VENDOR, MW_HOME variables in the current shell as required for the target platform.
  
Linux
    $ export JAVA_HOME=/home/myhome/myjavahome
    $ export MW_HOME=/home/myhome/mywls
  
Mac
    $ export JAVA_HOME=
      /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
    $ export USER_MEM_ARGS="-Xmx1024m -XX:MaxPermSize=256m"       
    $ export MW_HOME=/home/myhome/mywls
  
Windows
    > set JAVA_HOME=C:\home\myhome\myjavahome
    > set MW_HOME=C:\home\myhome\mywls
    > set JAVA_VENDOR=[Sun|Oracle] 

  On Windows you must set JAVA_VENDOR to the JVM being used:
    If using HotSpot, use "Sun"
    If using JRockit, use "Oracle"

3. Run the installation configuration script in the MW_HOME directory.

This step is required to be run only once. If you move the installation to another location/machine, you need to rerun this step.

  Linux/Mac: $ ./configure.sh 
  Windows: > configure.cmd

  On Windows, this step retains the WLS environment settings for the current shell. 
  So, the next step can be omitted.

4. Setup WLS environment in the current shell. 
   Linux$ . $MW_HOME/wlserver/server/bin/setWLSEnv.sh 
   Mac:   $ . $MW_HOME/wlserver/server/bin/setWLSEnv.sh 
   Windows: > %MW_HOME%\wlserver\server\bin\setWLSEnv.cmd

5. Create a new WLS domain and start WLS.
   
It is recommended that you create domains outside the MW_HOME.
   
Linux
    $ mkdir /home/myhome/mydomain
    $ cd /home/myhome/mydomain
    $ $JAVA_HOME/bin/java $JAVA_OPTIONS -Xmx1024m -XX:MaxPermSize=128m weblogic.Server
  
Mac
    $ mkdir /home/myhome/mydomain
    $ cd /home/myhome/mydomain
    $ $JAVA_HOME/bin/java $JAVA_OPTIONS -Xmx1024m -XX:MaxPermSize=256m weblogic.Server
   
Windows
    > mkdir C:\home\myhome\mydomain
    > cd C:\home\myhome\mydomain
    > %JAVA_HOME%\bin\java.exe %JAVA_OPTIONS% -Xmx1024m -X:MaxPermSize=128m weblogic.Server

Once the domain is created, you can shutdown WLS and restart it with the scripts provided in the newly created domain.

Note: You can also create the domain by invoking the GUI configuration wizard (Run MW_HOME/wlserver/common/bin/config.[sh|cmd]).

6. If you already have an existing domain that you want to run with this installation, edit the DOMAIN_HOME/bin/setDomainEnv.sh script and change the WL_HOME to point to the new installation - ${MW_HOME}/wlserver/.

Note: If the existing domain has samples configured, the server will issue failures during startup as samples are not included in the zip distribution.

7. Start a browser and open up url - 'http://localhost:7001/console' to administer the server.

8. If you need samples, evaluation database (Derby) or console help files for non-english locales, you can download the supplemental zip and extract it under MW_HOME. Follow instructions in README_SUPP.txt to properly setup samples. this file can be found in WLS extracted folder.


WHAT IS NOT INCLUDED
---------------------------------------
The following components are not available in the zip distribution.

  • Coherence libraries
  • WebServer plugins
  • Native JNI libraries for unsupported platforms
  • Samples, evaluation database (Derby), non-english console help (can be added by using the WLS supplemental zip)

CLEANUP
---------------
Delete the MW_HOME directory. Note that this will delete everything under MW_HOME. If you have created domains or extracted supplemental zip those files will be removed as well. Ensure that you don't create domains or applications under MW_HOME directory for easier migration. 


UPGRADE
----------------

  • In-place upgrade of installation is not supported in the zip distribution. 
  • Download the new version of zip distribution and extract it to a new location. 
  • Change the MW_HOME to point to the new location and update the startup scripts in your domains to point to the new MW_HOME.

KNOWN ISSUES
--------------------------

  • [MAC OS X] Memory settings have to be explicitly defined using the USER_MEM_ARGS variable prior to running any domain scripts.
  • [MAC OS X] The config wizard does not recognize a Mac OS X JDK installation and issues a warning. But, it successfully creates a domain and should not cause any issue running servers in the domain.
  • [MAC OS X] The zip distribution has limited support for functionality requiring native support. JMS C clients, auto stack-dumps, auto privileged port binding are not supported.
  • [ALL OS] Smart update tool is not supported in a zip distribution.
  • [ALL OS] The zip distribution should not be extracted to an existing MW_HOME
  •   or BEA_HOME which had been created by a regular installers. Doing so will conflict with already installed products and is unsupported.
  • [ALL OS] JAVA_HOME cannot contain directory names with space characters.


General impression:
  1. Installation is a bit more complicated, comparing it to GlassFish, JBoss, TomEE or Siwpas. All Java EE 6 servers so far can be installed just by unzipping the archive. WebLogic requires you to run some scripts after unzipping. However: the installation can be performed in a few minutes.
  2. The server is lean and fast. Startup and deployment performance is good.
  3. The admin console http://localhost:7001/console is fast, clean and usable. WebLogic comes with extensive monitoring capabilities.