Deploying applications from Eclipse to OAS (OC4J) - eclipse

We were using JDev to develop our applications and deploy them to OC4J and OAS.
we used to use JDev to create the data-source configuration for us both on dev and on deployment. (on dev using the wizard that come with jdev to connect to data-source.. and on deployment hence we don't need to do any Data-source configurations on the app server manually)
But, when we moved to eclipse, we couldn't no longer be able to deploy the EAR file unless we create the data-source manually (either using the em or j2ee\home\config\data-sources.xml but on some deployment, we may not be able to do such thing.
So, can we add some files for example to the EAR so that we can tell OAS that we need from it to create the DS for us??
Hint (I am hearing about some thing named orion*.xml, is this related to that request??
Thanks.

You can.
You need to place the correct data-sources.xml into your EAR/META-INF and reference it from your EAR/META-INF/orion-application.xml the same way as j2ee\home\config\data-sources.xml is referenced from j2ee\home\config\application.xml

Related

Restoring WAS7.0 CAR file to WAS 8.5

My current application setup is running with WAS 7.0 and we are planning to migrate with WAS 8.5.
Since my application is having lot of complex console setup like Queues , Activation Spec, multiple data sources , security configs, work manager etc...
So, I thought of using a WAS 7.0 CAR file in WAS 8.5 to restore the profile configuration.
Is it possible to do that or do we have to configure manually in WAS 8.5?
To be honest I've never tried that, but you have some other supported migration paths:
Use migration wizard/migration tools - see Migrating product configurations for details - this will scan your v7.0 profile configuration and create v 8.5.5 profile. Probably the easiest, if you have lots of customized changes and dont have any scripts relating to them.
Use WebSphere Configuration Migration Tool - this tool is installed as plugin to Eclipse. Reads exported configuration and creates jython script. Tool migrates most common resources (like JDBC), but not all. See above page for limitations.
Use AdminTask which exports configuration as property file, change it according to your needs and update on target environment.
wsadmin(.sh/.bat) –lang jython –c “AdminTask.extractConfigProperties(['-propertiesFileName my.props'])”
See Managing environment configurations with properties files using wsadmin scripting

Migration of Weblogic Portal with NetUIX from bea weblogic server to JBoss

I am having a project where we want to migrate from WebLogic Server to JBoss.
The project is WebPortal Build using Beehive and NetUI, NetUIX xml portal/portlets.
Is it possible to migrate those directly to Jboss with very limited changes to view like the entire structure can be reused in view which is defined in .portal files.
I also doubt that we can use tiles instead of using portals in JBoss, as Tiles when getting loaded in browser are not going to call to individual controller's begin methods and load default content from there.
I request you to please help me find solution for this migration problem.
Thanks,
Amit
From my experience, the migration from weblogic portal to jboss required a rewrite of the entire application.
If you are using weblogic portal (perhaps a 9.x version since you mentioned netui), i.e. the portal framework on top of weblogic server, there are far too many libraries specific to the portal framework p13n and netui alike that requires migration with no guarantee that these will be supported in Jboss.
Likely to face trouble retrieving entitlements from the p13n jars for users.
Regarding netui beehive, I think that is retired now (not sure), but I didn't got much support for it besides there are more lightweight frameworks out there that can help.

Building two different versions a given war with maven profiles and filtering from eclipse

I am trying to use maven profiles and filtering in order to produce two different versions of a given web archive (war):
A first one for local deployment to my local machine on localhost
A second one for remote deployment to cloudfoundry
There are a number of properties that differ according to whether the app is deployed to my local machine or to cloudfoundry.
Of course the difficult bit is that I am trying to do all this from STS/Eclipse and deploy from Eclipse to my local tomcat and to cloudfoundry...
Can anyone please provide advice, tips or suggestions?
If you are using Spring versioning 3.1+ the "profile" attribute for <beans> in the spring bean configuration xml would be the best choice. Take a look at the doc here: http://docs.cloudfoundry.com/frameworks/java/spring/spring.html#using-spring-profiles-to-conditionalize-cloud-foundry-configuration
Basically you need to specify at least 2 elements. One for your local properties (profile="default") and one for the properties when deployed to CF. The latter one should be defined as <beans profile="cloud">. When running locally the properties within "cloud" would be ignored and properties in "default" will take effect. When pushed to CF, CF will detect the profile named "cloud" and, which is better, inject corresponding datasource connection info of the services provisioned by CF itself. You can find the detailed CF-specified properties in that doc as well.
For more information about the profile attribute, see the doc here: http://blog.springsource.com/2011/02/11/spring-framework-3-1-m1-released/
Consider having a single project per artifact generated. Hence one project generating your local deployment and one project generating your cloudfoundry deployment.
Overlays (http://maven.apache.org/plugins/maven-war-plugin/overlays.html) is the officially sanctioned way to bake in extra files in an existing WAR file, giving a new WAR artifact. Very useful but may be too slow for comfort while developing.

Deployment of a LightSwitch into Dev / Test / Live environments

How do you handle the deployment of a LightSwitch application into a production environment?
i.e. the LS application has been developed, but it now needs to be installed first into Test, and then into Live.
We don't want to use the "manual" approach, i.e. use the Visual Studio Build / Publish option, rather we want to automate the deployment.
My feeling is that deployment is one of the real weak points of LightSwitch. If you are using the very simple deployment model that is build into the product, and you're doing everything within a Windows domain, the publishing wizard can do everything. But if you're deviating from the model at all LightSwitch will fight you. I'd really like to see an "advanced" deployment option that provided some configurability.
Here's how I solved the problem you're having with LightSwitch applications that are targeting web deployment:
At the beginning of the project, deploy once to each target environment using the publish wizard. This is the easiest way to get the database set up.
As new builds are deployed, use the publish wizard to deploy to a deployment package to a standard location on the local development machine.
The deployment package is just a zip file, so you can open it an drill down to where the actual binary release is. I use a powershell script to copy the binary files out of the the deployment package and in to a local SVN working directory. Note that you must not copy web.config file during this step.
Check the unpacked binary files into SVN and use SVN to manage the deployment.
Manage schema changes with SQL scripts.

eclipse howto start a application client on java ee glassfish appl srv

i have installed the glassfish eclipse tools bundle...
i can start a project like dynamic web & a ear project and deploy them on the glassfish... it works perfect & under the localhost url i will get an hello world
but how i do this if i want to make an application client. please help...
at the moment i simply created an "app client project in eclipse" & added it to the same ear,
but i have no idea how to start this...
help - any tutorial how to start?!!
Not the only only answer to this question but the appclient approach mentioned in Jeff's answer is a viable approach, but I was able to execute a client using this mechanism in eclipse and I wanted to share that approach.
This approach will let you execute a java application with a main method acting as a client.
What you want to do is setup an External Tools Configuration.
Create a new Program type of external tool configuration.
Set location to point to the path of the appclient, for me
(using embedded glassfish eclipse plugin) it was [PATH TO ECLIPSE]\plugins\oracle.eclipse.runtime.glassfish_3.1.1.0\glassfish3\glassfish\bin\appclient.bat
Set working directory to your output/build directory e.g.
${project_loc}/target/classes
Set arguments to ${java_type_name}
Select the class in your project with a main method that you wish to run as the client app and then select your external tool from the run external tools menu.
There are two ways to do it. I'm afraid I can't be very specific, but I can point you in the right direction. (I'm just learning myself)
You can enable Web Start for the application client EAR in GlassFish. You can do this either in the deployment descriptor (so it's enabled every time you deploy) or you can go into the GlassFish admin console, navigate to the Application, and check the checkbox to enable it. I have made a little progress on this approach.
You can run it manually from the command line using, I believe, the "appclient" command. I have not been able to get this working yet.
Good luck, and if you learn more, I'd appreciate it if you let me know since I'm in the same boat as you.
Jeff