I have an application which runs on Glassfish 3.1.2, but now i want to migrate to Tomee+. I
have created connection pool in Glassfish and have configured that pool with JNDI, and used
that JNDI Name in persistence.xml. Now while migration how should i create connection pool
and JNDI (and also where) in tomee+, so that i can use JNDI name in my persistence.xml.
Thanks
Maybe http://tomee.apache.org/configuring-datasources.html is the place to look. Basically just declare the Datasource in tomee.xml.
Side note: WEB-INF/resources.xml has alsmot the same syntax and allows to embed the datasource in the war when you can't configure the container (cloud)
Related
My app is trying to access DataSource through JNDI on Weblogic(12) Server. The following exception is thrown
weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub cannot be cast to javax.sql.DataSource
Where is this class weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub coming into picture.
From My Oracle Support (Doc ID 2005891.1) Version 12.1.1.0 and later
The remote datasource lookup over RMI is not supported with any thin client jar file.
The Wlthint3client.jar library does not support remote datasource lookup over RMI as the required stub classes are not bundled with this jar file, and hence the error.
JDBC over RMI is also deprecated in general and it can easily be a significant security vulnerability.
It normally works with the full WLS client jar library. But it is also not recommended - as this feature is currently deprecated and it might be completely removed in the future release.
Alternatives are to use the JDBC driver if you want to create connections to the database from a remote client, or deploy a local EJB which acquires the connection by doing a local lookup of the datasource.
The WebLogic full client, wlfullclient.jar, is deprecated as of WebLogic Server 12.1.3 and may be removed in a future release. Oracle recommends using the WebLogic Thin T3 client or other appropriate client depending on your environment. For more information on WebLogic client types.
Reference Link
https://docs.oracle.com/middleware/12213/wls/SACLT/jarbuilder.htm#SACLT240
I am using Apache Geronimo. I need a way to deploy an EAR application on an application server without starting the EAR module automatically.
When I deploy my EAR, it is automatically started. I need a way to specify, that it should only be deployed but not started.
Is there a way to do this?
In the past I've opened and closed gates to certain EJBs with the use of JMX.
The cool part:
100% Control your beans from outside using JConsole or your own JMX client.
The drawback:
Every bean instance has to be registered in the MBean Server which is not that cool as you are usually having multiple instances of the same bean.
The solution to this topic was having a #Singleton EJB working as a MBean/controller for all the instances of one EJB.
We use a single mysql database for 2 applications. One of this application has 2 instances.
So we would like to know how cloudbees manage the connexion pool between all these apps. I saw in other threads that mysql default conf on cloudbees accept 20 connections. For the moment, we use "old" hibernate configuration with explicite c3p0 but we thought that they could try to open too much connexions on the db.
If we change the conf to use jndi cloudbees datasource (as describ here https://developer.cloudbees.com/bin/view/RUN/DatabaseGuide), should our apps share the same connection pool ? Or at least all instances of each app ?
Hope it's understandable. Let me know if not.
Thanks for your help,
Each instance of the app has its own connection pool - so you need to consider that in sizing the pool.
I want to know if there is any way a resource in weblogic can have multiple JNDI names?
My problem is that I have 2 versions of the app deployed on the same weblogic managed server (version A and B). Now, I want to repoint all the clients using version A (using jndi: java:comp/env/A) to version B (using jndi: java:comp/env/B) without the clients have to do anything. Clients use T3 connection to connect. Here the assumption is that the clients can point to version B without any code change (only point to the new apps jndi i.e. java:comp/env/B).
As of now all the clients update the JNDI names to the new version name and do a restart to repoint to my apps new version. I want to prevent this effort.
I think if I can make version A JNDI to also point to version B of app (so there are 2 jndi's java:comp/env/A and java:comp/env/B pointing to same EJB in version B), the clients will start pointing to version B.
So, if there is a way to add multiple JNDIs to a resource I should be good. If you have any other idea this can be acheieved, please let me know.
You would have to deploy the same EJB class with a different JNDI name - thus there will be 2 running deployments of the EJB with 2 different JNDI names.
I think this is a bad idea - I dont see why the JNDI name has to change from A to B in the first place?
Clients are using EJB A with JNDI A , you now have the different EJB version called B. Can't you just change the JNDI A to point to EJB B?
I want to start/stop a deployment in weblogic 9 server.
I prefer to use JMX to talk to a weblogic MBean. I already use this to start/stop a server, but I cannot find the MBean for starting/stopping deployments/applications.
In weblogic server 11g there is a AppDeploymentRuntimeMBean which can stop/start deployments. That is described here:
http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e13951/mbeans/AppDeploymentRuntimeMBean.html
But I cannot find a simular MBean in weblogic 9
http://download.oracle.com/docs/cd/E13222_01/wls/docs92/wlsmbeanref/core/index.html
Is there a way to start/stop a weblogic 9 deployment using jmx or wlst?
BTW, when I record a WLST-script during start/stop of a deployment the pyton-script is empty.
Well actually AppDeploymentRuntimeMBean was first introduced in WLS 10.3 version. And this bean along with DeploymentManagerMBean were created to replace DeployerRuntimeMBean (it is considered deprecated since 9.0.0.0 version). As for me it seems that there is no way to start\stop applications with JMX on WLS 9 unless you decide to use deprecated API. And also consider the fact that you need Administration Server running in order to access Domain Runtime MBean Server that will provide an entry point to DeployerRuntimeMBean.