websphere properties file - properties

I want to store the datasource properties and the queue properties in separate property file, so WebSphere Application Server will load this properties during sturtup. Is it possible to create such property file for WAS 6.1 and 7?

No. The nearest you can get is to run a wsadmin script which will use the properties file to update the server configuration using the AdminTask.applyConfigProperties() command, but there's no way to set up the server to run such a script automatically on startup.

Related

update weblogic application name

Goal:
In picture I want to change app name only "app" strong text
Question:
Can I change or update deployed weblogic application name without stop managed server?
Additional information after a while. If you want to change application name in weblogic wlst console, it takes error message.
This shows us weblogic ApplicationName property is a read only property.
No. You cannot change the name even if you stop managed server. You have to redeploy the application specifying the name you want or manipulate config.xml and restart all server(Not recommended as it can cause issues if not done correctly).

simple-jdin/jdbc.properties is ignored in pentaho-server 8.2

If we need to perform queries in pentaho data integration (IDE), we need to add manually the datasource in simple-jdin/jdbc.properties
MyDatabase/type=javax.sql.DataSource
MyDatabase/driver=org.hsqldb.jdbcDriver
MyDatabase/url=jdbc:hsqldb:hsql://localhost/sampledata
MyDatabase/user=pentaho_admin
MyDatabase/password=password
This works as expected in the ide known as pentaho data integration, spoon or kettle.
But, the same in pentaho server 8.2 does not works.
Steps to reproduce the error
deploy or upload the transformation(.ktr) in the pentaho-server 8.2
add manually the datasource in the server /../pentaho-server/pentaho-solutions/system/simple-jndi/jdbc.properties
executed the transformation using pentaho server web console : run in background or schedule options
error: datasource not found
Alternative
Create the datasource manually using web console of pentaho server instead of manually modification of file : /../pentaho-server/pentaho-solutions/system/simple-jndi/jdbc.properties
Question
simple-jndi/jdbc.properties works in server or is just for development purposes (pdi)?
are the settings available in jdbc.properties file on server can you verify the same by referring to the pentaho data integrator > simple-jndi folder.
also are you able to connect to the database from the server may be using a database client to confirm.
NOTE:whenever you work with databases make sure you relevant library files to connect to the respective database.
From my personal experience, I was not able to make the server pick JNDI connection definitions from the simple-jndi/jdbc.properties file when the Pentaho Server was running with Tomcat.
I was only able to use JNDI on the Pentaho Server by defining JNDI Datasources in the Tomcat configuration files.

Setting User Environment Variables for tomcat on Windows

I am running tomcat 8 on Windows Server 2012.
I have a web app that needs an user environment variable to be set in order to run.
I can start tomcat and retrieve the variable successfully like this:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_65
set CATALINA_HOME=C:\TOOLS\apache-tomcat-8.0.30
set CATALINA_BASE=C:\Users\ULUser\tomcat\myapp
set MY_VAR=%CATALINA_BASE%
set PATH=%CATALINA_ROOT%\bin;%PATH%
set CATALINA_OPTS="-Djava.security.properties=%CATALINA_BASE%\conf\java.security.properties"
%CATALINA_HOME%\bin\catalina.bat run
But when I run as a windows service I cannot retrieve the MY_VAR variable using System.getenv("MY_VAR");
Googling has not helped because all the pages show how to set the Java and Tomcat variables, but not how to set user variables.
I cannot set it for the entire machine because I have several instances of tomcat and each one needs a different environment variable.
I would prefer a method that involves setting the variable in the tomcat configuration rather that with windows configuration.
My alternative is to use context.xml file in tomcat and retrieve the value with logic that retrieves context settings.
From an admin command prompt do the following command:
tomcat8 //US//YourServiceName ++Environment varname=value
You can set more than one variable by separating them with a semicolon (;) or a hash (#). The documentation is quite clear, but it's just difficult to believe anything's happened, because there's no visual indication anywhere, meaning if you run:
tomcat8w //ES//YourServiceName
to get the GUI config tool you will not see the environment variable anywhere, but if you run the service it will pick it up. It's like hidden magic. Don't know why they haven't included it somewhere in the config panel.

Where to add JVM parameter nojce in weblogic?

I need to add -Dweblogic.security.SSL.nojce=true flag in to startWeblogic.sh file as JVM parameter.
Is there any specific place I should add it in script file and is startWeblogic.sh correct file to add the flag ?
setDomainEnv.sh is called by startWebLogic.sh so either location works. Keep in mind this will apply to all servers. If you want it on a server by server basis, you can add that -D option in the admin console:
Environment -> Servers -> Your Server -> Configuration (tab) -> Server Start (sub-tab)
In my experience we have always added JVM parameters to the
${WL_HOME}/bin/setDomainEnv.sh
script as an extra property under the
$EXTRA_JAVA_PROPERTIES
variable.

IBM Worklight 6.0 - application uses an incorrect Server URL

I am trying to create a Worklight application that uses SQL adapters to retrieve data. In development it all works well but when I deploy it onto the server it can't connect to the server as it has an incorrect server URL.
I then have to go to the iOS settings and update the Custom Server URL field and set the flag to use this and then it all works.
I can see that this set in the Settings.bundle -> Root.plist file. However if I change this value it gets overwritten each time I rebuild. Where can I set these values so that the WL studio will set this value correctly each time it builds?
From reading your question, this has got nothing to do with adapters.
You really need to describe how exactly you've built the application, in steps.
Right now it sounds to me like you may be doing the following:
Build for Remote Server
Run As >> Build All and Deploy / Run As >> Xcode project
These actions currently overwrite each other.
If you are using Build for Remote Server, then do not use Build All / Xcode project afterwards; this will overwrite the connection details again with the local ones instead of the remote ones.
Also covered in the following IBM technote: http://www-01.ibm.com/support/docview.wss?uid=swg21642937