Corba NameService configuration in Websphere 8.5.5 - java

As part of my application requirement, I have to configure a attribute called "ORBInitRef.NameService=corbaloc:iiop:ABCDE012:14888/NameService" in Websphere 8.5.5. Earlier i have used Jboss for my applciation deployment but now have to use WAS. In, WAS where should i have to configure this attribute in admin console? Is there any way to do it through orb.properties file in WAS root folder. Please let me know to approach??

Please follow the below steps to configurable Corba Name service in WAS 8.5.5 in admin console.
--> Environment --> Name Space Bindings --> New --> Provide your corba details here.
Example:
1) corba URL : corbaloc:iiop:ABCDE012:14888/NameService
2) provide Lookup name. using this, u will get a RootContext by lookup like JNDI.
Code Example :
InitialContext context = new InitialContext();
org.omg.CosNaming.NamingContext rootContext=(NamingContext)context.lookup("testing");
using the rootContext, you can fetch the server stubs and preform the operation required.

Related

Accessing tomcat JNDI tree remotely issue

While trying to port our application from WAS 8.5.5 to tomcat 8.0.33, we have hit a roadblock and we are unable to proceed. Hence requesting for your inputs.
Following is the scenario: we have DataSourceManager class which looks for datasource in the context as shown below.
Properties prop = new Properties();
prop.put("java.naming.factory.initial", "org.apache.naming.java.javaURLContextFactory");
prop.put("java.naming.provider.url", “rmi://localhost:1099”);
InitialContext context = new InitialContext(prop);
dataSource = (DataSource) context.lookup(“apl_datasource”);
The preceding code perfectly works well when code is run within the Tomcat container. But we are unable to access the context remotely, i.e. from outside the Tomcat container.
But this works fine in case of WAS when com.ibm.websphere.naming.WsnInitialContextFactory class is used.
While running a standalone client from a shell script, when inside DataSourceManager class we do a context lookup for a data source and the lookup fails with following exception.
javax.naming.NameNotFoundException: Name
[java:comp/env/jdbc/apl_datasource] is not bound in this Context.
Unable to find [java:comp].
It seems tomcat does not support remote access to its JNDI tree, and context initialized is empty. Tomcat does have the data source in the context but it is only accessible to the process running inside the containers and not accessible to processes running outside the container. PFB the following link for your reference.
Tomcat: what is the init context params to use for making an external client connection to Tomcat 5.5 JNDI tree?
Kindly provide your inputs on 3 points:
This link is for tomcat 5.5 and we are porting to tomcat 8. Has scenario changed in tomcat8
Is there any other way to access the JNDI tree remotely by standalone application.
Is the rmi protocol mentioned in provider url is supported by tomcat, or we should change it to some another protocol.

How can one modify the **max-beans-in-free-pool** property for a given MDB via the Weblogic 10.3.1.0 Console?

How can one modify the max-beans-in-free-pool property for a given MDB via the Weblogic 10.3.1.0 Console ? I know this can be added in weblogic-ejb-jar.xml configuration file, but want to do this via Weblogic Console.
It doesn't have that feature Admin Console in 10.3.1, not sure for later versions of WLS.
According to WebLogic documentation, it defines a free pool size for EJBs and it's also a property which you could configure your MDB but only using the ejb-jar.xml file and there's no way to do this in the console because it's something that belongs to the application.
Here there is a set of possibles attributes to configure the MDB with annotations or only in the ejb-jar file for Weblogic

Configuring Wildfly standalone "<remote-naming/>"

Looking for examples of how to configure a Wildfly server to be very simple standalone JNDI namespace server.
I would like to specify value pairs so that our external java applications can access and use the defined resources using JNDI API's.
From the Documentation it is clear that I have to use the XML tag.
Remote JNDI Configuration
The Naming subsystem configuration may be
used to (de)activate the remote JNDI interface, which allows clients
to lookup entries present in a remote WildFly instance.
Only entries within the java:jboss/exported context are accessible
over remote JNDI. In the subsystem's XML configuration, remote JNDI
access bindings are configured through the XML
element:
<remote-naming />
But what isn't clear is HOW to use it, I cant find any examples anywhere.
If I had the following object:
String: MyFirstProperty
How do Insert this into the <remote-naming /> tag so that Wildfly makes it available for me to retrieve?

Jackrabbit on wildfly configured as War appliaction with jndiname

I want a Model 1 like deployment for JackRabbit on Wildfly along with a JNDI name to the resource ( java:/jcr/JcrRepository )
I have configured jackrabbit-webapp-2.6.4.war on Wildlfy.
I have configured my resource.xml, bootstrap.properties and the jackrabbit-webapps/WEB-INF/web.xml contain the correct paths to the resource.xml and the bootstrap.properties.
Also a different web-application accesses this jackrabbit repository and it needs to reference this jack rabbit resource through a JNDI name.
My question is where do I configure the JNDI name for Jackrabbit on Wildfly ?
If I were to configure it as a JCA adapter with Model 2 like deployment, I could have configured it as a JCA subsystem in the standalone-xml, but in this case I want to follow a Model 1 like deployment.
Any help from anybody ?

Optional JNDI Binding For Websphere Web Application

I would like to have optionally supplied information available to my webapp when deployed to Websphere (we are using 8.5) via the application's JNDI context.
I know that I can put a resource-ref or resource-env-ref in my web.xml but when I do that WAS will require me to supply a binding for it and deployment time.
My application will look in JNDI for certain values and adjust its behavior if found, but will function fine with default behaviour if it does not find values in JNDI. How, in WAS, do I supply a binding (just for a string or a URL) for my webapp without declaring a dependency on it in a resource-ref or resource-env-ref in my web.xml.
I know how to do this in Tomcat, I just put a Environment entry in the context.xml, like this:
<Environment
name="com.myorg.config"
value="http://localhost:8081/suff"
type="java.lang.String"/>
You can use an #Resource String lookupName; to accomplish the same in a portable manner. You will be prompted for a value at deployment time, but you can specify nothing, which will cause no value to be injected.

Categories

Resources