NetBeans 7.2 RC1 Java EE edition. This is the publicly available IDE which has oracle cloud support. It was dropped from the 7.2 Final because ... yeah ... the OPC isn't public and nobody wanted to see unusable features in a final release. So the first secret seems to be lifted here. When OPC launches we will see a 7.3 release popping up (concluded from this test-specification). Another useful preparation is to download and install the corresponding WebLogic 10.3.6 for local development. And that is the second surprise so far. Oracle Public Cloud Java Service will be a Java EE 5 service. At least for the GA. And absolutely it doesn't make any sense to stay at this version. So it is really save to say that the WebLogic 12c which has Java EE 6 support will follow sometime next. All set. Fire up NetBeans.
Create your Java EE Application
All you have to do now is to create a new Java EE Web Application with NetBeans. Give it a name (I'm calling it MyCloud) and add a new local WebLogic 10 server in the "Add..." Server dialogue. Don't forget to chose Java EE 5 as EE version. Let's add JSF 2.0 and Primefaces 3.2 on the Framework tab. Click "Finish". If NetBeans is complaining about missing server libraries, let it deploy them. That's it for now. Right Click your app and Run it. This will fire up your local WebLogic domain and point your browser to http://localhost:7001/MyCloud/ or whatever your app is called. as you can see, the Primefaces components are also working. Not spectacular.
- Identity Domain. The individual or group identity of your Oracle Cloud account.
- Java Service Name. The name of the Java Service.
- Database Service Name. The name of the Database Service.
- Administrator. Your identity as Oracle Cloud administrator.
- Password. Your Oracle Cloud administrator password.
- SDK. Path to your local copy of the Oracle Cloud SDK. Click Configure to browse for this file.
Run in the Cloud...
Right click and "Run" your project. You see a lot of stuff happen. First of all NetBeans is doing the normal build and afterwards is starting the distribution. First of all this is uploading the bundle (MyCload.war) to the cloud. It get's scanned for viruses and needs to pass the Whitelist scan (more on this later). If both succeeds the deployment happens and your application is opened in your system's default browser:
That was a typical development round-trip with the Oracle Public Cloud Java Service. Develop and test locally deploy and run in the cloud.
Some more NetBeans goodies
But for what is the "Oracle Cloud" entry in the Cloud services good for? For now this is very simple. You can use it to access your deployment jobs and the according log-files.
System.exit(0);First indication that something is wrong here is dashed code hint.
ERROR - Path:D:\MyCloud\dist\MyCloud.war (1 Error) ERROR - Class:net.eisele.opc.servlet.Test (1 Error) ERROR - 1:Method exit not allowed from java.lang.System.(Line No:41 Method Name:java.lang.System->exit(int)) ERROR - D:\MyCloud\dist\MyCloud.war Failed with 1 error(s)It is disappointing but there are limitations (aka White List) in place which prevent you from using every single Java functionality you know. For the very moment I am not going to drill this down further. All early access members had to say something about the restrictions and Oracle listened carefully. A lot of things are moving here and it simply is too early to make any statements about the final white list. A lot of 3rd party libraries (e.g. primefaces) are tested and run smoothly. Those aren't affected by the white list at all.
That is all for today. I am not going to show you anything else of the OPC. And I know that you can't test-drive the service your own. You need to have the Javacloud SDK in place which isn't publicly available today. But it will be. And there will be a chance to test-drive the cloud for free. A trial. And I am looking forward showing you some more of the stuff that is possible. As soon as it becomes available. As of today you can register for access and get notified as the service is ready to sign you up!