Driver implementation in java
Hi,
I am working on a personal project in which i am planning to use a servlet that will call stored procedures from an oracle 9 database.
My questions are :
Is it logical to write and use a driver which is only capable of calling stored procedures, instead of standard JDBC driver for Oracle (to decrease memory requirements of the servlet). If so how can I find information to implement such a driver.
Thanks.
Volkan Erdogan
Unless writing a JDBC driver is the goal of this project, I don't see this as a particularly straightforward task. The network protocol Oracle uses is proprietary, so unless you want to invest a lot of effort in reverse engineering it, you'd have to write a driver that used OCI to communicate with the database. That would require that you install the Oracle client on the application server and delve pretty deeply into the OCI API-- not a trivial task on its own.
Additionally, I doubt that the internal logic required to be able to execute stored procedures is significantly smaller than the code to do both.
Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC
Similar Messages
-
Implementation of java.sql.* abstract methods
Hi to u all,
Can someone tell me where the abstract methods in some interfaces in the java.sql package are implemented?
For example:
-- START CODE --
ResultSet rs = null;
try
ps = db().prepareStatement("select * from aTable where x=?");
ps.setInt(1, aValue);
rs = ps.executeQuery();
ResultSetMetaData md = rs.getMetaData();
-- END CODE --
It's about the getMetaData()-call.
It returns information about the column names in the resultset.
If I open the declaration (eclipse) the abstract method getResultSet() in the interface ResultSet in the java.sql-package is shown.
So where is the actual implementation of the method??
As a collegue told me he suspected the implementation is probably somewhere in the driver-software. If this is the case, how does the JVM know to find it there?
Thx in advance for your time and answer(s)The JDBC driver implements the JDBC API.
The JVM how to know that?
1. The Class.forName("jdbc driver name") will load the driver into memory.
2. The DriverManager.registerDriver(Driver driver) will register the driver for later use.
Check the DriverManager.java for more detail. -
Hi All,
My application needs to connect to a sql database, which provides a partial driver implementation. Means to say that It does not implement either DataSource or XADataSource.
But for my enterprise application, deployed on Sun One Application Server 7, I need to create a pool name, for this database.
What should be done under these circumstances.
Thanks and Regards,
Ravi.
([email protected])Unless writing a JDBC driver is the goal of this project, I don't see this as a particularly straightforward task. The network protocol Oracle uses is proprietary, so unless you want to invest a lot of effort in reverse engineering it, you'd have to write a driver that used OCI to communicate with the database. That would require that you install the Oracle client on the application server and delve pretty deeply into the OCI API-- not a trivial task on its own.
Additionally, I doubt that the internal logic required to be able to execute stored procedures is significantly smaller than the code to do both.
Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC -
Could not create pool connection.The DBMS driver exception was:java.sql.SQLException:
ORA-01017: invalid username/password
Even though I could able to connect to Oracle database using correct userid,password
and HostString using OracleClient, I couldnt able to do with connectionpool. Here
is the error message..
<Jan 21, 2003 2:27:50 AM PST> <Notice> <WebLogicServer> <Starting WebLogic Admin
Server "examplesServer" for domain "examples">
Starting Loading jDriver/Oracle .....
---------- LOGIN ERROR CODE: 1017
---------- LOGIN ERROR CODE: 1017
<Jan 21, 2003 2:28:06 AM PST> <Error> <JDBC> <Cannot startup connection pool "or
aclePool" weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: ORA-01017: invalid username/password; logon denied - (Obj
ectel/********@ora8i)
at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:164)
at weblogic.jdbc.oci.Driver.connect(Driver.java:112)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:193)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:623)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy45.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2761)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:370)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy64.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:209)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:623)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy45.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2761)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:370)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy64.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
>
<Jan 21, 2003 2:28:14 AM PST> <Notice> <Management> <Application Poller started
for development server.>
<Jan 21, 2003 2:28:19 AM PST> <Notice> <WebLogicServer> <ListenThread listening
on port 7001>
<Jan 21, 2003 2:28:19 AM PST> <Notice> <WebLogicServer> <SSLListenThread listeni
ng on port 7002>
<Jan 21, 2003 2:28:20 AM PST> <Notice> <Management> <Starting discovery of Manag
ed Server... This feature is on by default, you may turn this off by passing -Dw
eblogic.management.discover=false>
<Jan 21, 2003 2:28:20 AM PST> <Notice> <WebLogicServer> <Started WebLogic Admin
Server "examplesServer" for domain "examples" running in Development Mode>URL=jdbc:weblogic:oracle:oracle8i(server)
Driver Classname=weblogic.jdbc.oci.Driver
AClname=weblogic.jdbc.connectionPool.oraclePool
intialcapacity=1
MaximumCapacity=10
Capacity Increment=2
Login Delay Seconds=1sec
Refresh Period=15 Minutes
Supports Local Transaction=No
Allow Shrinking=No
Shrink Period=15
Prepared Statement Cache Size=10
TargetServer=ExamplesServer
Properties
user=Objectel
password=superman
Test table=yes
Test Reserved Connections=yes
Test Released Connections=Yes
I could able to connect to oracledataBase if I use
user=scott
password=tiger
with any other database user Iam getting the following error
Could not create pool connection. The DBMS driver exception was:java.sql.SQLException:
ORA-01017: invalid username/password
"Neo Gigs" <[email protected]> wrote:
By end of the error you shown:
<Jan 21, 2003 2:28:20 AM PST> <Notice> <WebLogicServer> <Started WebLogicAdmin
Server "examplesServer" for domain "examples" running in DevelopmentMode>
You are running the Examples application shipped with WLS, which I guest
the
correct DB to connect with is Cloudscape yet to Oracle, unless you make
changes to the original ConnectionPool in the examples. Anyhow, please
show
us your configuration of the ConnectionPool used when this error pops.
"Raj" <[email protected]> wrote in message
news:[email protected]...
Could not create pool connection.The DBMS driver exceptionwas:java.sql.SQLException:
ORA-01017: invalid username/password
Even though I could able to connect to Oracle database using correctuserid,password
and HostString using OracleClient, I couldnt able to do withconnectionpool. Here
is the error message..
<Jan 21, 2003 2:27:50 AM PST> <Notice> <WebLogicServer> <Starting WebLogicAdmin
Server "examplesServer" for domain "examples">
Starting Loading jDriver/Oracle .....
---------- LOGIN ERROR CODE: 1017
---------- LOGIN ERROR CODE: 1017
<Jan 21, 2003 2:28:06 AM PST> <Error> <JDBC> <Cannot startup connectionpool "or
aclePool" weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: ORA-01017: invalid username/password; logondenied - (Obj
ectel/********@ora8i)
atweblogic.db.oci.OciConnection.getLDAException(OciConnection.java:164)
at weblogic.jdbc.oci.Driver.connect(Driver.java:112)
atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:193)
atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
atweblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:698)
atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
atweblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:623)
atweblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
atweblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(DeploymentTarget.java:233)
atweblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:621)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy45.updateDeployments(Unknown Source)
atweblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2761)
atweblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:370)
atweblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:621)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy64.start(Unknown Source)
atweblogic.management.configuration.ApplicationManagerMBean_CachingStub
start(ApplicationManagerMBean_CachingStub.java:480)
atweblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:209)
atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
atweblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:698)
atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
atweblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:623)
atweblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
atweblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(DeploymentTarget.java:233)
atweblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:621)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy45.updateDeployments(Unknown Source)
atweblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2761)
atweblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:370)
atweblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:621)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy64.start(Unknown Source)
atweblogic.management.configuration.ApplicationManagerMBean_CachingStub
start(ApplicationManagerMBean_CachingStub.java:480)
atweblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
>
<Jan 21, 2003 2:28:14 AM PST> <Notice> <Management> <Application Pollerstarted
for development server.>
<Jan 21, 2003 2:28:19 AM PST> <Notice> <WebLogicServer> <ListenThreadlistening
on port 7001>
<Jan 21, 2003 2:28:19 AM PST> <Notice> <WebLogicServer> <SSLListenThreadlisteni
ng on port 7002>
<Jan 21, 2003 2:28:20 AM PST> <Notice> <Management> <Starting discoveryof
Manag
ed Server... This feature is on by default, you may turn this off bypassing -Dw
eblogic.management.discover=false>
<Jan 21, 2003 2:28:20 AM PST> <Notice> <WebLogicServer> <Started WebLogicAdmin
Server "examplesServer" for domain "examples" running in DevelopmentMode> -
Design patterns implemented in java API
Hi,
I have some questions on design patterns implemented in core java class or in general in java API.
1)Whether
java.util.Collections, the checkedXXX(), synchronizedXXX() and unmodifiableXXX() methods.
can be considered as a decorator pattern?
2) Whether
LinkedHashMap(LinkedHashSet<K>, List<V>) which returns an unmodifiable linked map which doesn't clone the items, but uses them
can be considered as a Bridge pattern?
3) Whether Facade pattern is implemented in java ? If so which API uses it?
4) Whether
• All non-abstract methods of java.io.InputStream, java.io.OutputStream, java.io.Reader and java.io.Writer.
• All non-abstract methods of java.util.AbstractList, java.util.AbstractSet and java.util.AbstractMap
can be considered as a Template method pattern?
5) Whether
• java.util.Comparator#compare(), executed by among others Collections#sort()
can be considered as a Stratergy pattern?
6)
Whether State pattern is implemented in java ? If so which API uses it?
7)
All implementations of java.lang.Runnable are considered as a Command pattern.
8)
Whether
• java.io.InputStreamReader(InputStream) (returns a Reader)
• java.io.OutputStreamWriter(OutputStream) (returns a Writer)
can be considered as an Adapter pattern?
Please clarify.
Thanks.What do you think, and why?
-
How to implement a java application in Portal
Hello,
I was asked if it is possible to implement a java (not a web application / not java web dynpro) to implement into the portal. Is this possible with something like the java web start? Is someone using something like that in the real world?
Thanks a lot,
VanessaHi Vanessa.
Yes, it is possible to integrate Java applets into portal. Have a look at XML Form Buider or SAP Management console (http://portalhost.domain:5xx13).
Best regards,
Aliaksandr Zhukau -
Can I develop a driver mouse with Java?
Hi,
Can you tell me, if I can develop a driver mouse with Java and if not why and with which programming software?
And do you have a web site or forum reference about driver mouse?
Best regards,
Dimnet2000Aren't you all a little too hasty with your NOs?
If the task is to develop a standard plugged-in mouse driver you see and use everyday and that loads together with the bootup process of Linux, Windows... the answer propably is "No" or "better not".
Other than that... You can draw on the screen and you can communicate with the Serial Port. I think you could very well build your own mouse driver for a non standard Mouse to make it work in all Java applications. If you don't need 100% platform independancy you might think about building modules to trigger OS-Events via JNI.
For standard use this might not seem a sensible thing to do, but imagine if you are in some way handicapped and need a very special mouse that you want to carry around and use across several platforms without compiling and instaling drivers everywhere... -
How resource files(.rc) are implemented in java
I want to know how resource files are implemented in java. I am using a window98 as OS.
Thank you
Abu_ramlaI wonder if this might help:
ResourceBundle rbd = ResourceBundle.getBundle("Filename");
to get a property out of the resourceBundle use:
String varname = (String) prb.getObject("propName");
As allways, check the API
Hope this helps
Elouiza -
Has anyone tried implementing a JCA Resource Manager the would integrate into a J2EE server for communication with a remote server?
I'm thinking about implementing one for connectivity with an Http server....
Has anyone tried something of this sort?mkx wrote:
Hi,
we are currently implementing a Java connector for the X11 windowing system and we're running into trouble with event handling.
What we are doing is to fork a thread from the main application that will then invoke a native event handling loop that will listen for X11 events. Whenever such an event occurs, it will call back to a Java object to report that event.
While receiving and reporting events works fine, any successive calls from the main thread to the native windowing functions will block the program.
Let me outline the call order again:
1. Java application is started, main thread created
2. New Java thread is started that invokes a native method that itself runs in a while loop
3. Normal program flow continues in the main Java thread
4. Main Java thread now calls some native method, and locks up
Any idea why this is happening? Is it not possible to invoke the same native code within two distinct Java threads? I have looked into the JNI functions AttachCurrentThread and DetachCurrentThread, but they only seem to handle the problem that two native threads share the same JVM, but that's not what we need. We have two Java threads that need to share the same native code.Are you sure its not a problem with the something in the X11 code being non-reentrant?
http://www.gnu.org/software/libc/manual/html_node/Nonreentrancy.html#Nonreentrancy
Jim S. -
Hi all,
Has anybody implemented vCard in java....
If yes, could you please explain how it can be implemented,
thanks
ybajajThere exists a publically available vCard implementation in Java. It is available under a BSD style license, and can be found at
http://jpim.sourceforge.net
It reads 2.1 and 3.0 cards (into a business object model) and is able to write 3.0 cards (from the business object model).
Regards,
Wimpi -
ESB Implementation in Java to connect various services
Hi,
I am looking to use ESB to integrate various webservices running in differenr platforms like one in Java,PHP and .NET.
I am using Oracle SOA Suite. Is there any examples in the internet how to do this? I am not able to find any? It will be really great if some can provide some light into this for the below points:-
1) Setting up the ESB infrastructure
2) ESB implementation in java
3) To implement ESB we need to use only the JMS?
Please do provide some helping hand which will help me to understand it and complete the process.
Thanks in advance.I decompiled HttpClient and ConsoleClientImpl and this is what I found --- The following URL is what is constructed,
http://localhost:80/esb/j_security_check and these parameters are passed as POST - j_username=oc4jadmin&j_password=welcome1
I tried
http://localhost:80/esb/j_security_check?j_username=oc4jadmin&j_password=welcome1
and got 404 error.
However, this exercise confirmed that hostname=localhost and port=80 is just fine.. the problem seems to lie somewhere else -
Firewall implementation in java
Need help about firewall implementation in java,Is it possible to develop application level firewall in java?how?
No.
You can control a firewall in C or such from Java. But you must have native codes in part of it.
This question is asked repeatedly.. you really should have searched because the answer is always the same. You can't do it directly in Java. -
Can be implemented with Java 2D?
Could anyone tell me what kind of effect in this flash animation? it can be implemented with Java 2D?
http://www.echt-wahnsinn.de/liebesgesichtflash.htmThanks for your answer.
so it's not only just for fun but the part of our semester project. :-)
Could you explian it more in detail, I mean "manipulate the color/brightness values"
please tell me if the step is right:
1. load a new image as background pic and another new pic as the small image (using BufferedImage)
because I will scale(maybe scale = 0.5) the both pics in my UI window.
. img_org . img_min . img_result .
2. create the background pic in third ImagePanel automatically and finish the image manipulations.
at the same time to get the size of img_org, img_min, and color/brightness values, pixels.
here I am not sure how to implement it effectively. image clipping?
any suggestion and help are welcome!!
laue -
dear friends
i use forms6i server and oracle 9i server edition,under windows 2000 server
i try to implement a java class for a bean area. i do the following :
from the property palette i write the class name in implementaion class property . the class name is 'arc.class' and it is located in <oracle_home>/forms60/java
but the fellowing error appears
frm-13008 cannot find javabean with name 'arc.class'
would any one help pleaseDear Grant Ronald
thank you very much for helping me . now i undersatand how to implement a class. but i have another question ,and i wish you ccould help me .
i try to import a java class, i do the following:
From the program menue i choose Import Java Class
but the following error appears
(pde-uji001 faild to create JVM)
by the way i use forms6i server and oracle 9i server under windows 2000 server
thanks in advance
tarek -
Can I have my own implementation of java.awt.EventQueue
Hi guys,
Can I "override" the default implementation of java.awt.EventQueue? Some JVM/CVM tricks?
For any tips, Thanks!I think what you're looking for is EventQueue#push(EventQueue).
public static void main(String[] args) {
final EventQueue queue = new EventQueue() {
public void postEvent(final AWTEvent theEvent) {
super.postEvent(theEvent);
System.out.println("postEvent "+theEvent);
Toolkit.getDefaultToolkit().getSystemEventQueue().push(queue);
final JFrame frame = new JFrame();
frame.setContentPane(new JButton("Click Me"));
frame.setSize(300, 300);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
Maybe you are looking for
-
Quick Look copies attachments to Mail Downloads folder!
Holy maloly, I just discovered why my MacBook Pro was slowly losing disk space! Every time I use Quick Look to check an attachment in Mail, a copy of the attachment is placed in the Mail Downloads folder of my user Library. My writing work entails qu
-
How do I set the Http Header POST URL in SAAJ?
Hi , I am a newbie in the field of web services. I was trying to create a SOAP request with Http Header POST information having a POST url like the following: POST /OMASTI.xml HTTP/1.1 Content-Type: multipart/related; boundary="eladeladeladeladeladel
-
NEED URGENT NEW SOFTWARE UPDATE FOR NOKIA X2..
The Nokia X2 runs under S40 6th Edition, which does not allow the user to hide items on the gallery or file manager. If the feature is like this then what is the use of having 16 GB card??/ All the confidencial photos which I doesn't want to share wi
-
How to add files from ftp??
Hello, I am hoping that someone can help me out with this (probably easy) question. Here is the scenario. I have a website that I am getting a friend to help me update. I am getting him to add new images to dozens of pages on my site. I have uploaded
-
My iPad Air has the latest software version(iOS 7.1.2) update, since that update the location services have stopped working. have a solution?