Wednesday Mar 26, 2014

Migrating JDBC Resources from GlassFish to WebLogic

Following up with my series of articles about Migrating from GlassFish to WebLogic, this time I want to cover the migration of a very common resource used by every Java EE developer: JDBC resources, or simply, DataSources. And in case you haven't read yet the first article, here it is: Migrating a Java EE App from GlassFish to WebLogic. That one will walk you through redeploying a simple yet almost complete Java EE 6 application on WebLogic, without any code change nor specific deployment descriptors, and still taking advantage of the enhanced Maven Plugin in WebLogic 12c.

It is easy to migrate resources by using the Web consoles of both WebLogic and GlassFish. Just open one browser window for each server, put them side-by-side, and follow the UI menus. Most of the properties are the same. But if you walkthrough the full article below, you will not only learn the concepts and what is required to migrate JDBC resources, but also how to migrate things using Command-line Interface (asadmin from GlassFish; wlst from WebLogic).

Continue reading...

Wednesday Jan 08, 2014

WebLogic in Comparison: RebelLabs Java Servers Report

RebelLabs did a great job comparing the main Java servers out there, where some are pure Servlet/JSP containers, others are full Java EE compliant. But they didn't want to include in the list Oracle WebLogic nor IBM WebSphere apparently for no logical reason but "they are suited for large enterprise production environments", and because the report is focused on developers.

"The Great Java Application Servers Debate"

So, I decided to write this blog post to include detailed information about WebLogic, since WLS is free for developers, even if you are going to deploy GlassFish/JBoss/Whatever in production. Which is why I didn't get why RebelLabs didn't want to compare WebLogic.

Remember, I will detail WebLogic from a "developer point of view", using the same categories RebelLabs used in their report. Here we go:


Download & Installation

WebLogic 12c is certified for Java EE 6, and 12.1.1 was released on Dec 2011. The second release is 12.1.2 and is from July 2013, part of the full Cloud Application Foundation 12c release. For developers, there is a ZIP distribution sized at 184Mb.
  1. Accept Licence agreement
  2. Download installation package *
  3. Extract the archive
  4. Run configure.sh (Linux/Mac) or configure.cmd (Windows)
  5. You are ready to go!
* you must have an OTN account, required for other things like access Oracle Forums

The configure.sh script will ask you if you want to create a domain. Say "yes". Then you are asked to provide username/password for it, because we do care about default security. And right after the script finishes creating the domain, you can point to http://localhost:7001/console, because the script will automatically start WebLogic for you. To start WebLogic again, just call: 
$ cd user_projects/domains/mydomain; sh startWebLogic.sh
Conclusion: License accepted only once. Bigger than others indeed but enhanced default security. Starts server automatically right after creating domain.


Tooling support

The RebelLabs report says WebLogic is only integrated with JDeveloper. But that's a big mistake. WebLogic is well integrated with NetBeans, Eclipse, IntelliJ, and can even be used with Apache Maven and Ant. For a "big fat bloated enterprise production-only app server", I would say WebLogic is in very good shape for development environments.

Eclipse: you can either download Oracle Enterprise Pack for Eclipse bundled with Eclipse, or just the update by either downloading the repository, or pointing to the repository URL.

NetBeans: support comes out of the box since version 7.1 (released in January 2012). Here's an article hosted on netbeans.org about NetBeans and WebLogic.

IntelliJ IDEA: Jetbrains comes with native support for WebLogic not only version 12, but also older versions. 

Apache Maven: in release 12.1.2, Oracle WebLogic has an enhanced Maven support with more goals and easier installation into Maven repositories. Check the documentation to learn more.

Apache Ant: for several versions WebLogic has been coming with Ant support. And continues to do so. Check the documentation for 12.1.2

If you are developing with Eclipse, NetBeans, or JDeveloper, you can even enable FastSwap, a feature that reloads changed classes on the fly. I've blogged about how to enable and use FastSwap with NetBeans a while ago.

Conclusion: has support for 99,9999% of tools used by developers. FastSwap for on-the-fly class update. IntelliJ and NetBeans with OOTB support. Eclipse plugin or full distribution with OOTB support.


Server Configuration

In the report, RebelLabs gave GlassFish a score of 3, which is weird because the way they described this section, seems like everything is perfect. The "Reason" line gives no negative reason at all! So I asked them on Twitter.

In WebLogic, you can basically do everything through the Web console available in the Admin Server. From there you can create clusters, create new managed servers, add Java EE resources like JMS queues, Data Sources. You can create Work Managers, do Security management. Anything. But for developers that don't want to follow steps documented in Word files full of screenshots of all these Web interfaces, they can simply write a Python script, and whenever they have to configure something [again], all they need to do is to run the script. The feature is calledWebLogic Scripting Tool, or simply WLST, and several companies have been using this for many years. It's great for configuration automation and also manageability. If you want to record the commands you type in the WLST shell for future executions, call startRecording(). If you don't want to write a script from scratch, the Adminstration Web console comes with a "Recording" feature that will record all your actions and create the script for future executions. And you can also connect through JMX.

If you are really into XML configuration, you can access the domain folder, then edit theconfig/config.xml file and do your magic. But they will only take effect after a restart.

And finally, most changes don't require a server restart.

Conclusion: Python scripts. JMX. Rich web console. Recording features. XML. Most changes go live without restart.


Documentation & Community

Documentation for WebLogic is very complete, and the new 12.1.2 documentation website has an updated Look & Feel. It is easy to navigate and comes with a search (basic and advanced) feature. The community is not as small as you may think. Oracle runs the Oracle ACE program and highlights outstanding professionals all around the world. The Oracle Partner Network is also big, with several folks running meetings, bootcamps, hackathons, etc. Take for example the last edition of UK OUG Tech 13, where attendees developed Puppet modules during a WebLogic Hackathon. And finally there's an Oracle Forum for WebLogic which is ran by the Oracle Technology Network team. 

Community is not related to only Open Source products. Doesn't matter if it's Open Source or not, if there's enough people working with a product, there's a chance for a community be born.

Conclusion: There is a community. Not as know as Open Source ones. Widespread around the world. Decentralized.


Features & Open Standards compliance

WebLogic 12c is Java EE 6 Full profile certified. Customers can also develop rich web applications with Oracle ADF, and they also get extra features/support for TopLink, like Oracle Coherence Integration. TopLink can be seen as an extension of EclipseLink, the Open Source JPA implementation, maintained at the Eclipse Foundation, but with great contribution from Oracle. WebLogic 12c has also support for OSGi bundles.

For administrators and devops, in addition licensed customers gain several other products and support. So for example, if you are comparing WebLogic Standard Edition with JBoss, don't forget that WLS SE comes bundled with support for: 
  • Oracle HTTP Server (enhanced Apache)
  • Oracle TopLink/ADF
  • Configuration Wizard / Upgrade Framework / OPatch
  • Oracle Java SE
  • Oracle WebLogic Management Framework
  • WebLogic JDBC Drivers, Server Clients, Apache Plugin
  • HTTP Pub-Sub Server
If you want more details about what you get by buying WebLogic, see this table. It will show also what other flavours of WebLogic (Enterprise/Suite) have to offer.

Conclusion: of course 1 apple will be cheaper than 4. :-)

Conclusion: Java EE 6 and OSGi. Extra features/products for licensed customers starting since WebLogic Standard Edition. Most complete application server, with support for all products involved in a basic infrastructure for running server-side Java applications.


Administration & Management/UI

As I pointed in the "Server Configuration", WebLogic has several ways for the developer to configure whatever the dev wants. But to give you an impression, here's a screenshot of the Admin Console, to create a JDBC Data Source:
Conclusion: Rich web console. Allows to control, from the Admin Server, all resources, as well monitor and manage servers in one or more clusters.


Cost $$$ / Licensing

The pricelist is available publicly and can be easily googled. No secrets, full transparency, from how much you pay (at maximum, since there's always a conversation with the sales rep), to what you get in exchange. Remember: when you license and contract support for WebLogic Standard Edition, you pay per processor socket (not per core), and you get support for Oracle Java SE (JVM), Oracle HTTP Server (Apache), and several other features/products. Other editions are priced differently but come with even more features.

But anyway, WebLogic comes with no charge for developers.

Conclusion:  When comparing cost to other application servers, remember that WebLogic comes with supported JVM (Oracle HotSpot), support of an enhanced Apache (Oracle HTTP Server), and other things that most application servers don't offer when you license or subscribe for support.


The Results

I've seen developers running Tomcat or JBoss or GlassFish, and going into production with WebSphere or WebLogic. But with the information above, I say that, overall,  WebLogic has evolved a lot especially in the new 12c version, with a smaller ZIP distribution, easy and secure installation, enhanced Maven support, great features for managing, awesome tooling support, and most important, free for developers. And don't forget the community! 

If a developer wants to develop pure Java EE applications, WebLogic is a very strong candidate. Even if the customer is running WebSphere in production :-)

Tuesday Jan 07, 2014

Demoiselle Framework no WebLogic 12c

Pra quem não sabe, o Demoiselle é um framework que roda sob a plataforma Java EE 6, desenvolvido e mantido pelo SERPRO para ser usado em projetos de todas as esferas do Governo.

No dia 1 de Novermbro do ano passado (2013), foi lançada a versão 2.4.0 conforme o Twitter dos mantenedores do framework. Decidi então saber qual seria a dificuldade de rodar um projeto Demoiselle no Oracle WebLogic 12c.

O WebLogic 12c (versão 12.1.1) foi lançado em Dezembro de 2011 e é compatível e certificado na plataforma Java EE 6, mas foi no ano passado em Julho que recebeu um update (a versão 12.1.2) com uma série de novas features e algumas correções, completando assim o release 12c do Cloud Application Foundation, que serve de infraestrutura para toda a tecnologiaFusion Middleware da Oracle.

Criando um projeto de exemplo e um pacote WAR

Uma grande vantagem do Demoiselle é que é um framework desenvolvido inteiramente com Apache Maven, e possui archetypes para facilitar a criação de novos projetos. Para este teste, vou usar o seguinte archetype:
<groupId>br.gov.frameworkdemoiselle.archetypes</groupId>
<artifactId>demoiselle-jsf-jpa</artifactId>
<version>2.4.0</version>
O comando para criar um projeto a partir deste archetype pode ser este:
$ mvn archetype:generate \
-DarchetypeGroupId=br.gov.frameworkdemoiselle.archetypes \
 -DarchetypeArtifactId=demoiselle-jsf-jpa \
 -DarchetypeVersion=2.4.0 \
 -DgroupId=br.gov.frameworkdemoiselle.sample \
-DartifactId=demoiselle-sample-2.4.0 \
 -Dversion=1.0.0-SNAPSHOT \
 -DinteractiveMode=false
O nome do projeto será demoiselle-sample-2.4.0

Ajuste a configuração JPA do projeto

O Demoiselle vem com um arquivo persistence.xml no diretório src/main/resources/META-INF e este arquivo deve ser editado da seguinte maneira: 
  1. Comente a configuração que está ativa logo no início do arquivo (específica para JBoss)
  2. Descomente a segunda configuração para GlassFish, chamada "GlassFish 3 with JTA transaction"
  3. Modifique o JNDI do Data Source para o seguinte valor: jdbc/demoiselle

Geração do pacote WAR

Agora para ter um arquivo WAR pronto para ser instalado no WebLogic, basta gerar o pacote: 
$ mvn -Pglassfish3 package
Repare que especifico o profile chamado glassfish3. Isto porque o Demoiselle possui uma série de profiles para cada servidor de aplicação (tomcat6, tomcat7, glassfish3, jboss6, jboss7). No momento em que escrevo este blog, meu pedido para acrescentar o profile do WebLogic 12c ainda não foi aceito. Acompanhe o pull request no GitHub para maiores detalhes e atualizações.

Mas não tem problema especificar o profile já existente glassfish3, pois este atende às especificações do Java EE 6, e o WAR resultante funciona perfeitamente no WebLogic 12c. 

Agora você deve ter no diretório target do projeto, um arquivo chamado demoiselle-sample-2.4.0-1.0.0-SNAPSHOT.war. Anote o local e o nome deste arquivo para depois fazermos deploy deste artefato.

Download, Instalação, Configuração e Deploy no WebLogic 12c

Sobre como fazer download e como instalar o WebLogic, já escrevi em 2012, How to Install WebLogic 12c ZIP on Linux (em inglês). Se tiver alguma dúvida, comente no post!

Quanto à configuração, a única coisa que precisamos fazer é criar um Data Source apontando para um banco de dados. Desde a versão 10.3.3 o WebLogic já vem com o Derby como parte da instalação, permitindo assim configurar um Data Source para um banco de dados em memória. No WebLogic 12c, o Derby já está ativo e para criar um Data Source é bem fácil.

Primeiro, acesse o diretório onde o domínio foi criado, e depois inicialize o servidor:
$ ./startWebLogic.sh
Agora acesse a URL do console administrativo Web no endereço http://localhost:7001/console. Informe o usuário/senha que você definiu durante a instalação (geralmente, é weblogic/welcome1). O passo-a-passo da configuração é bem simples:
  1. No menu esquerdo, clique em Services, Data Sources
  2. Clique no botão New
  3. Selecione a opção Generic Data Source
  4. Informe o valor jdbc/demoiselle nos dois campos texto (Name e também JNDI Name)
  5. Selecione o tipo de banco de dados Derby na combobox
  6. Clique em Next
  7. Na tela seguinte não há o que fazer. Clique em Next
  8. Na tela seguinte também não há o que fazer. Clique em Next
  9. Na tela onde diz "Connection Properties", informe o valor demoiselle no campo Database Name
  10. Nesta tela, informe localhost como o Host Name
  11. Nesta tela, informe demoiselle nos campos Username, Password, Confirm Password
  12. Clique em Next
  13. Na tela seguinte verifique os dados, e experimente a configuração clicando no botão Test Configuration
  14. Clique em Next
  15. Selecione o AdminServer e finalmente, clique em Finish
Agora você deve ter um Data Source chamado jdbc/demoiselle, de acordo com a configuração feita anteriormente no persistence.xml do projeto.

WLST - WebLogic Scripting Tool

O WebLogic vem com uma feature muito legal chamada WLST, que permite você escrever scripts em Python para automatizar tarefas administrativas no servidor de aplicação. Se você achou o passo-a-passo acima complicado, experimente rodar este script especificamente para criar o Data Source jdbc/demoiselle usando o Derby. O procedimento é simples:
  1. Faça download do arquivo no Gist
  2. Acesse a pasta do domínio WebLogic
  3. Digite o seguinte comando para incorporar as variáveis de ambiente do domínio WebLogic na shell:

    $ source bin/setDomainEnv.sh

  4. Digite o seguinte comando para invocar o script:

    $ java weblogic.WLST <caminho para o arquivo>/create-demoiselle-ds.py

Deployment da aplicação Demoiselle

Aproveitando o ambiente do domínio na sua shell (após executar "source bin/setDomainEnv.sh"), é muito simples fazer o deploy da aplicação. Execute o seguinte comando:
$ java weblogic.Deployer \  -username weblogic \  -password welcome1 \  -deploy <caminho para o projeto>/demoiselle-sample-2.4.0/target/demoiselle-sample-2.4.0-1.0.0-SNAPSHOT.war
Lembre-se de ajustar o usuário e senha do seu domínio WebLogic tanto no comando acima, quanto no script WLST. Por conveniência, deixei já o comumente utilizado u:weblogic p:welcome1.

Caso queira usar a interface Web, o processo é simples. Clique no menu Deployments, depois no botão Install e basta seguir as instruções da tela.

Testando a aplicação Demoiselle

Agora que a aplicação está rodando, você pode testar acessando a URL da aplicação, que provavelmente é esta: http://localhost:7001/demoiselle-sample-2.4.0-1.0.0-SNAPSHOT/index.jsf

Qualquer dúvida, é só comentar! Ou me procurar no Twitter @brunoborges. :-)

Abs!

(source

Thursday Dec 05, 2013

WebLogic agora é grátis para desenvolvedores!

Uma ótima notícia, que não é mais tão notícia assim, para todas as empresas desenvolvedoras de software, ISVs, fábricas de software, parceiros e não-parceiros Oracle. O WebLogic, servidor de aplicação Java EE líder de mercado pode ser baixado gratuitamente e utilizado em ambientes de desenvolvimento sem qualquer custo, através da licença da OTN. Conforme licença publicada no site, o trecho mais importante é este:

"[...] deploy the programs only on your single developer desktop computer (of any type, including physical, virtual or remote virtual), to be used and accessed by only (1) named developer."

Até então era comum acreditar que para desenvolver para uma grande empresa que adquiriu o WebLogic, seria necessário a empresa prestadora de serviço adquirir também o produto. Um exemplo comum é de empresas que desenvolvem software para outras empresas em forma de projetos (fábricas de software); estas empresas podem utilizar o WebLogic nas máquinas dos desenvolvedores sem qualquer custo Outro trecho interessante na licença da OTN é este:

"You may continue to develop, test, prototype and demonstrate your application with the programs under this license after you have deployed the application for any internal data processing, commercial or production purposes"
Veja a licença OTN completa para maiores informações

Se a sua empresa está em São Paulo, e vocês desenvolvem software para outras empresas que utilizam o WebLogic em produção, entre em contato para conhecer mais sobre o novo Oracle WebLogic 12c: bruno dot borges at oracle dot com.

Se ainda restam dúvidas sobre a simplicidade de instalar o WebLogic em ambientes de desenvolvimento, veja este outro blog post (em inglês) sobre como configurar o WebLogic distribuído em formato ZIP: How To Install WebLogic Zip on Linux!

Thursday Nov 14, 2013

O futuro do WebLogic 12c

Antes de falar do WebLogic 12c, uma informação importante é que prorrogamos o suporte do WebLogic 11g (versão 10.3.6) até 2018, e o suporte estendido até 2021. Isto dará maior tranquilidade aos clientes a planejarem suas migrações, reduzindo assim riscos e custos, principalmente aos clientes de Fusion Apps e SOA Suite/BPM. 

A versão atual do WebLogic 12c é a 12.1.2, lançada este ano em Junho, juntamente com todo o Cloud Application Foundation 12c (Coherence, Oracle HTTP Server, Tuxedo, etc). A versão anterior 12.1.1 já era certificada em Java EE 6, e agora esta nova versão traz uma série de recursos e funcionalidades para integrar suas aplicações com o banco de dados Oracle 12c, facilitar o operacional através de Dynamic Clustering e Elastic JMS, mais otimizações para Exalogic e JMS, administração do Oracle Coherence pelo console administrativo do WebLogic, plugins para desenvolvimento de projetos com Apache Maven, geração automática de serviços REST para seus projetos JPA com o TopLink RESTful Data Services, e muito mais.

O WebLogic 12.1.2 também substituiu o antigo instalador da BEA e os utilitários de patch BSU com o Oracle Universal Installer e o utilitário opatch para a aplicação de patches. Muitos clientes Oracle já conhecem estas ferramentas, que já eram utilizadas para outros produtos, como o próprio Banco de Dados.

Ou seja, uma série de novidades que justificam a liderança do WebLogic no mercado de Application Servers. Mas ao olhar os próximos passos e o roadmap para as versões do WebLogic 12.1.3 e 12.1.4, há motivo de sobra para se interessar na versão 12c.

A versão WebLogic 12.1.3 deverá ser a primeira homologada para diversos produtos 12c do FMW como SOA Suite 12c. Além disso, alguns novos recursos serão incluídos para melhorar ainda mais a experiência do administrador de infraestrutura para escalar ambientes com mais servidores. Por exemplo, a feature de Elastic JMS permitirá o uso do Server Migration sem perder mensagens durante esta execução. Estamos trabalhando para oferecer na versão 12.1.4 o suporte para auto-scaling de clusters dinâmicos, com base em limites e métricas definidas pelo usuário. O WebLogic 12.1.4 também deverá ter uma API para controlar os clusters dinâmicos. Desta forma, os usuários poderão facilmente programar a hora de parar, iniciar ou remover nós de um cluster dinâmico.

O WebLogic 12c conta com o driver JDBC 12c, oferecendo melhor integração com o Oracle DB 12c, e uma destas features é chamada de "Application Continuity". Esta feature permite que após uma falha de comunicação com um nó de um Oracle RAC, a transação com o banco de dados seja transferida sem qualquer efeito colateral para outro nó do cluster, garantindo disponibilidade. Na versão WebLogic 12.1.4, será introduzido também um novo recurso chamado de Multitenant Applications. Desta forma usuários poderão definir um modelo WebLogic para uma aplicação, para um ou mais clientes desta aplicação, que terá o seu próprio cluster, etc.

O conteúdo acima foi originalmente postado aqui.

AVISO LEGAL: O texto acima visa delinear nossa direção geral dos produtos. Destina-se apenas para fins informativos, e não pode ser incorporado em qualquer contrato. Não é um compromisso e não deve ser usado na tomada de decisões de compra. O desenvolvimento, lançamento e tempo dos recursos ou funcionalidades descritos para os produtos da Oracle permanecem a critério exclusivo da Oracle.

Sunday Nov 04, 2012

First steps with Oracle ADF Mobile for iOS and Android

Oracle announced recently its new Mobile development platform, called Oracle ADF Mobile. With it, you can build truly Java applications, deploy and run real Java code on both Android and iOS with its self-contained Java runtime.

It also comes with PhoneGap. which allows you to use any feature your phone offers, like sensors and camera. It's probably the most complete solution for mobile development out there, simply because with Oracle ADF Mobile, you can write Native, Hybrid or Web applications for your smartphone and tablet.

Do you want to take a quick look on what can be done with it? Check out this video

Now, to start with Oracle ADF Mobile, here are the first steps you will have to go through.

  1. Download Oracle JDeveloper
    Go to this link and download the install file for your environment (Windows, Linux-32bit or Generic)
  2. Install JDeveloper (of course)
    If you need help on this, look at the documentation (if you've downloaded 11gR2, click here)
  3. Download Oracle ADF Mobile Bundle
    This is the download page for Oracle ADF Mobile. Accept the license as usual at the top, and follow with the Download button. It will take you to another page, where you will see a table containing a download link. Click on it and it will start downloading a ZIP file.
  4. Start JDeveloper
    Start Oracle JDev. It may self update. Restart the IDE if you are asked to.
  5. Go to Help > Check for updates
  6. Click Next and make sure you are at the "Source" tab
  7. Select "Install From Local File"
  8. Select the Oracle ADF Mobile ZIP you downloaded on step 3
  9. Finish the process

 

Now you have JDeveloper with Oracle ADF Mobile sucessfully installed!

There are two great tutorials to start coding with ADF Mobile. Just choose your platform!

And have fun! :-) 

Tuesday Oct 23, 2012

Using Coherence API to get POF bytes

Someone raised the question on how to use the Coherence API to get the bytes of an object in POF (Portable Object Format) programatically. So I came up with this small code that shows the very cool API simple usage :-)

   SimplePofContext spc = new SimplePofContext();
   spc.registerUserType(0, User.class, new UserSerializer()); 
   // consider UserSerializer as an implementation of PofSerializer
            
   User u = new User();
   u.setId(21);
   u.setName("Some Name");
   u.setEmail("some.name@domain.com");
            
   ByteArrayOutputStream baos = new ByteArrayOutputStream();
   DataOutput dataOutput = new DataOutputStream(baos);
   BufferOutput bufferOutput = new WrapperBufferOutput(dataOutput);
   spc.serialize(bufferOutput, u);
            
   byte[] byteArray = baos.toByteArray();
   System.out.println(Arrays.toString(byteArray));

 Easy, isn't?

Monday Sep 17, 2012

WebLogic Application Server: free for developers!

Great news! Oracle WebLogic Server is now free for developers! What does this mean for you? That you as a developer are permited to:

"[...] deploy the programs only on your single developer desktop computer (of any type, including physical, virtual or remote virtual), to be used and accessed by only (1) named developer."

But the most interesting part of the license change is this one:

"You may continue to develop, test, prototype and demonstrate your application with the programs under this license after you have deployed the application for any internal data processing, commercial or production purposes" (Read the full license agreement here)

If you want to take advantage of this licensing change and start developing Java EE applications with the #1 Application Server in the world, read now the previous post, How To Install WebLogic Zip on Linux!

Friday Aug 10, 2012

WebLogic 12c Overview - OTN Tour 2012

I had the pleasure to be part of the OTN Tour 2012 Latin America, that is going on right now (August 2012) and to know some folks from Oracle HQ, but more importantly, to present architects, administrators, DBAs and software developers a little bit of Oracle WebLogic 12c and its great integrations with other Oracle products, specially Oracle RAC with its Active GridLink, Coherence Data Grid and of course, Oracle Exalogic.

If you couldn't come to the OTN Tour in Buenos Aires and Montevideo, don't worry. The slides are right here! :-)

Hope you enjoy!

Thursday Aug 02, 2012

Enable WebLogic 12c FastSwap with NetBeans

Hey everyone, this is my first post, and although I have been working at Oracle since July 2nd, I wanted it to have valuable information, not just a "Hey look, I joined Oracle". So this is it, welcome to my blog!

 How to enable WebLogic 12c FastSwap when developing Java EE applications with NetBeans? Very simple!

  1. Open the file WEB-INF/weblogic.xml
    1. If your application is an EAR, open weblogic-application.xml
  2. Enable FastSwap
    <fast-swap>
        <enabled>true</enabled>
    </fast-swap>
  3. Now open the Properties dialog for your project
  4. Navigate to Run
  5. Disable the checkbox "Deploy on Save"
  6. Close the Properties dialog
  7. Re-deploy your application

Done! Now give it a try. Modify some Java code and refresh the web page that access that code. Remember you don't need to re-deploy your application anymore. NetBeans already deploys it as exploded WAR/EAR. Faster than the re-deploy feature!

Also, FastSwap is a feature that is built-in to WebLogic 12c and there's no need to install anything. For more information about FastSwap, follow this link (for WebLogic 12.1.1).

Was this a valuable information for you? Sure it was for me :-) 

About


Bruno has been having fun working with Java since 2000 and now helps Oracle on sharing the technology accross all Latin America. Also plays videogames, does trekking and loves beer.

Follow me on Twitter! @brunoborges

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today