RMI or plain JDBC???

I'm in the planning stages for an application that will be run on client machines via Java Web Start. These applications are going to need to have access to a MS SQL Server, located on a separate machine, and I'm wondering if I should use RMI for all my database connections, queries, updates, etc., or should I just use JWS to launch my application, and include the location of the JDBC drivers in the .jnlp file, and handle all database calls and such on the client end. There are of course benefits and drawbacks to both. I would tend to lean towards RMI as it offers more security, but I'm new to the concept of RMI, and am clueless as to how to implement it, being the app is on a client machine and it needs access to the server. Don't know how to do that, but I'm searching the forums and Google for other cases of people doing the same thing I am looking at, and seeing how they implemented it. I'm not trolling for free code, just looking for examples that will help me create my own way of doing it. So, should I use RMI, or does my situation not warrant it and I can go with straight JDBC calls to the database. Thanks for any advice...
James

Unless there is a firewall between your client and server machines, or you anticipate being able to make significant use of server-side cacheing, then go with JDBC.
If security is a really big deal (specifically you want to encrypt communications between clients & the server) then RMI offers some options that aren't available with JDBC, but an external solution such as IPSec is probably going to be easier to implement.
D.

Similar Messages

  • Old plain JDBC connection managed by JEE container?

    Hi,
    I wonder, if there is an option to tell the JEE container to manage my old plain JDBC connection.
    My current way
    @Stateless
    public class MyClass {
       @Resource(name = "jdbc/my-database")
       private DataSource dataSource;
       public void doSomething() {
          Connection conn = dataSource.getConnection();
          try {
              // Some stuff
          } finally {
             DatabaseUtils.closeSilent(conn);
       }Is there a way to get a connection instead of a data source?
    Thanks a lot

    Yes you're right.
    What I mean, if there a way that the JEE container will open and close the connection I need.
    If I use the datasource, I've to open a connection and I've to ensure that this connection will be "closed", so the pool manager can reuse this connection.
    But I think, there is no way for something like this, or not:
    @Resource
    private Connection connection;

  • How to load data in plain-text file into database by using EJB?

    Hi,
    We need to develop an on-line application which requires us to load input data
    from a selected plain-text file on the Web server (iplanet server) into the backend
    oracle database. How could I use EJB to make it happen? it seems like using Entity
    EJB is not feasible.
    Really appreciate your help!
    Corona

    Hi Corona,
    "Corona Fang" <[email protected]> wrote in message
    news:3f3b0ea3$[email protected]..
    We need to develop an on-line application which requires us to load inputdata
    from a selected plain-text file on the Web server (iplanet server) intothe backend
    oracle database. How could I use EJB to make it happen? it seems likeusing Entity
    EJB is not feasible.If you are talking about loading thousands of records,
    the preferable way is using plain JDBC calls utilizing
    batch methods.
    Regards,
    Slava Imeshev

  • URGENT: index not used from jdbc

    Hi,
    This is for java app and sybase database.
    I have a 'select' query for which index is properly created. If I use plain jdbc connection, index is used and result comes pretty fast. but if I use connection from my app, it does not use index and takes long time.
    I am using PreparedStatement in both cases. I have compared all connection properties for both cases and they are exactly same. also, if I run that query using any sql tool like isql, result comes out pretty fast.
    Am I missing any other parameter related to connection?

    akshay_crest wrote:
    I have a 'select' query for which index is properly created. If I use plain jdbc connection, index is used and result comes pretty fast. but if I use connection from my app, it does not use index and takes long time."Plain" meaning like a little test application that runs the same query?
    Most likely reasons.
    1. If the answer to the above is yes, then you probably are not running the same query.
    2. You are not timing them in the same way and something else is slowing it down.
    3. Network problem.
    4. Not connecting to the same database/table.

  • Servlet that implements RMI

    Hi Everyone,
    I m planning to implement RMI with servlet. The architecture is as follows:
    --> Http request to the server(tomcat) where the servlet will accept the request. It will get the header request and the post request and on the basis of this post request it will invoke RMI to process specific functionality like fetching image from database.
    --> RMI then uses JDBC to interact with the database and get required results.
    --> The servlet then returns this image back to the client.
    Now, I have seen some examples for servlet and RMI but I havent seen a concrete tutorial explaining this situation.
    Is my architecture correct ? Is there anything that I m missing ?
    Please guide me.
    Thank you.

    Hi DrClap,
    Thanks for your reply.
    Well, I did that ! I pasted RMI Client code to Servlets doGet method but it wont compile and gives me 2 errors.
    symbol  : class HelloInterface
    location: class HelloWorld
    HelloInterface hello = (HelloInterface) Naming.lookup ("//xxx.xxx.xxx/Hello"
    ^
    HelloWorld.java:14: cannot find symbol
    symbol  : class HelloInterface
    location: class HelloWorld
    HelloInterface hello = (HelloInterface) Naming.lookup ("//xxx.xxx.xxx/Hello"
                            ^
    2 errorsI have the Stub and Interface in web-inf/classes folder but I dont know whats happening over here. I have checked the interface and everything but it wont work.
    And my servlet :
    try
    HelloInterface hello = (HelloInterface) Naming.lookup ("//xxx.xxx.xxx/Hello");
    System.out.println("IP Address: "+hello.showIPAddress());
    System.out.println("User Name: "+hello.getUsernames());
    }catch(Exception e)
    System.out.println("Error from hello world: "+e);
    }Message was edited by:
    siddhsdesai

  • How to use JDBC to access "returning " clause

    I think it is important to note here that you DO NOT have to use SQLJ for this. You can achieve the same result in plain JDBC. You must put the PL/SQL block in a CallableStatement object.
    e.g.
    CallableStatement cs = conn.prepareCall("declare myReturnValue table_name.field_name%type; begin insert into table_name (field1, field2, ... fieldn) values (?, ?, ... ?) returning fieldx into ?; end;");
    To get hold of the "returning" parameter, register it as an OUT parameter (method 'registerOutParameter').
    That should do it!! Email me if you need further explanation,
    regards,
    Alex

    I think it is important to note here that you DO NOT have to use SQLJ for this. You can achieve the same result in plain JDBC. You must put the PL/SQL block in a CallableStatement object.
    e.g.
    CallableStatement cs = conn.prepareCall("declare myReturnValue table_name.field_name%type; begin insert into table_name (field1, field2, ... fieldn) values (?, ?, ... ?) returning fieldx into ?; end;");
    To get hold of the "returning" parameter, register it as an OUT parameter (method 'registerOutParameter').
    That should do it!! Email me if you need further explanation,
    regards,
    Alex
    null

  • How to use jdbc in struts ?

    i want to connect to database and fire insert, select etc queries but my code should be in struts framework

    Struts is only a view-controller framework. MVC implemented properly places the database operations in the model tier. So, I would advise against doing something that seems quick and simple initially (such as firing off JDBC from a JSP).
    Rather, use Struts to simply be your VC. Within your model tier, create data access objects. These can use an ORM such as JPA (Hibernate, Toplink, etc.) or vanilla JDBC. My assumption since you are using Struts is that you at least have a Servlet container, likely Tomcat or Jetty. If so, there is documentation for each of those containers on how to set-up a JDBC data source. You can use JNDI within your model tier to access the DataSource (if you are using plain JDBC) or to supply the connection information for your EntityManagerFactory (if using JPA).
    If you are not sure how to even perform database access, I would recommend taking a JDBC tutorial. Do so standalone and not bothering with Struts or even Servlets. Once you have JDBC down, you can proceed to JPA and/or then integrate with Struts.
    - Saish

  • IAnywhere JDBC vs. jConnect 5.5 / RowSet Control Functionality

    (First, I apologize for this enourmous post)
    First, my specs:
    I am using WebLogic Platform 8.1 SP4 on Windows 2000 Professional. I am using iAnywhere's (a Sybase company) Adaptive Server Anywhere 9.0.2 using jConnect 5.5 in one domain and iAnywhere JDBC driver in another.
    Second, my problem:
    I am using WL Workshop 8.1 to create a RowSet control within a Web Project. I'm then creating a JPF from the RowSet control. I'm following directions from the documentation from the Rapid Application Development class that I took where it references "creating a CRUD application". I'm having different problems depending on the driver I'm using.
    With jConnect: When I create the RowSet control, this outputs on my Admin Console:
    <May 3, 2005 12:09:47 PM EDT> <Warning> <RMI> <BEA-080003> <RuntimeException thr
    own by rmi server: weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getTableName
    (I)
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.j
    dbc2.tds.RowFormatToken.getTableName has not been completed and should not be ca
    lled..
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.jd
    bc2.tds.RowFormatToken.getTableName has not been completed and should not be cal
    led.
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseRuntimeException(Ljava.lang.S
    tring;[Ljava.lang.String;)V(ErrorMessage.java:773)
    at com.sybase.jdbc2.utils.Debug.notImplemented(Ljava.lang.Object;Ljava.l
    ang.String;)V(Debug.java:387)
    at com.sybase.jdbc2.tds.RowFormatToken.getTableName(I)Ljava.lang.String;
    (RowFormatToken.java:523)
    at weblogic.jdbc.wrapper.ResultSetMetaData_com_sybase_jdbc2_tds_RowForma
    tToken.getTableName(I)Ljava.lang.String;(Unknown Source)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getTableName(I)Ljava
    .lang.String;(ResultSetMetaDataImpl.java:132)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl_WLSkel.invoke(ILwebl
    ogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object
    ;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic.rmi.extensions.
    server.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.sp
    i.OutboundResponse;)V(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run()Ljava.lang.Object;(BasicS
    erverRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
    curity.subject.AbstractSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.l
    ang.Object;(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
    l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
    ject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(SecurityManage
    r.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(Lweblogic.rmi.spi.
    InboundRequest;)V(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(Lweblogic.kernel.Ex
    ecuteThread;)V(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
    ;)V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
    e)
    >
    <May 3, 2005 12:09:47 PM EDT> <Warning> <RMI> <BEA-080003> <RuntimeException thr
    own by rmi server: weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getCatalogNa
    me(I)
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.j
    dbc2.tds.RowFormatToken.getCatalogName has not been completed and should not be
    called..
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.jd
    bc2.tds.RowFormatToken.getCatalogName has not been completed and should not be c
    alled.
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseRuntimeException(Ljava.lang.S
    tring;[Ljava.lang.String;)V(ErrorMessage.java:773)
    at com.sybase.jdbc2.utils.Debug.notImplemented(Ljava.lang.Object;Ljava.l
    ang.String;)V(Debug.java:387)
    at com.sybase.jdbc2.tds.RowFormatToken.getCatalogName(I)Ljava.lang.Strin
    g;(RowFormatToken.java:540)
    at weblogic.jdbc.wrapper.ResultSetMetaData_com_sybase_jdbc2_tds_RowForma
    tToken.getCatalogName(I)Ljava.lang.String;(Unknown Source)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getCatalogName(I)Lja
    va.lang.String;(ResultSetMetaDataImpl.java:140)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl_WLSkel.invoke(ILwebl
    ogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object
    ;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic.rmi.extensions.
    server.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.sp
    i.OutboundResponse;)V(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run()Ljava.lang.Object;(BasicS
    erverRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
    curity.subject.AbstractSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.l
    ang.Object;(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
    l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
    ject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(SecurityManage
    r.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(Lweblogic.rmi.spi.
    InboundRequest;)V(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(Lweblogic.kernel.Ex
    ecuteThread;)V(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
    ;)V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
    e)
    >
    <May 3, 2005 12:09:47 PM EDT> <Warning> <RMI> <BEA-080003> <RuntimeException thr
    own by rmi server: weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getSchemaNam
    e(I)
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.j
    dbc2.tds.RowFormatToken.getSchemaName has not been completed and should not be c
    alled..
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.jd
    bc2.tds.RowFormatToken.getSchemaName has not been completed and should not be ca
    lled.
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseRuntimeException(Ljava.lang.S
    tring;[Ljava.lang.String;)V(ErrorMessage.java:773)
    at com.sybase.jdbc2.utils.Debug.notImplemented(Ljava.lang.Object;Ljava.l
    ang.String;)V(Debug.java:387)
    at com.sybase.jdbc2.tds.RowFormatToken.getSchemaName(I)Ljava.lang.String
    ;(RowFormatToken.java:499)
    at weblogic.jdbc.wrapper.ResultSetMetaData_com_sybase_jdbc2_tds_RowForma
    tToken.getSchemaName(I)Ljava.lang.String;(Unknown Source)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getSchemaName(I)Ljav
    a.lang.String;(ResultSetMetaDataImpl.java:108)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl_WLSkel.invoke(ILwebl
    ogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object
    ;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic.rmi.extensions.
    server.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.sp
    i.OutboundResponse;)V(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run()Ljava.lang.Object;(BasicS
    erverRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
    curity.subject.AbstractSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.l
    ang.Object;(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
    l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
    ject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(SecurityManage
    r.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(Lweblogic.rmi.spi.
    InboundRequest;)V(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(Lweblogic.kernel.Ex
    ecuteThread;)V(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
    ;)V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
    e)
    >
    I have created the "stored procedures" in my database by running the sql_asa.sql script as directed by the jConnect 5.5 documentation. The weird thing though is that when I run my test browser, everything seems to be working despite the errors above. Are these errors something to be concerned about?
    Now, with the iAnywhere JDBC driver, when I do the same thing, I get no errors on my console during the RowSet control creation, but when I run the application with the test browser and start navigating the JPF, I eventually get two errors in the browser itself:
    When I click Insert (from the grid) and then click Cancel, my browser gives this error:
    An error has occurred:
    An exception occurred in the action begin
    [Microsoft][ODBC Driver Manager] Invalid argument value
    Afterwards, I click the Back button twice on the test browser and it gives this error:
    An error has occurred:
    An exception occurred in the action begin
    [Sybase][ODBC Driver]Invalid cursor state
    The Console reads like this:
    <May 17, 2005 4:12:05 PM EDT> <Warning> <WLW> <000000> <Id=top-level; Method=con
    trols.Newjcx11.getAllEmployee04(); Failure=java.sql.SQLException: [Microsoft][OD
    BC Driver Manager] Invalid argument value [ServiceException]>
    WARNING: The primary key map could not find a primary key parameter under the re
    quest key "_autoscope__rowId".
    <May 17, 2005 4:16:55 PM EDT> <Warning> <WLW> <000000> <Id=top-level; Method=con
    trols.Newjcx11.getAllEmployee04(); Failure=java.sql.SQLException: [Sybase][ODBC
    Driver]Invalid cursor state [ServiceException]>
    In addition, using both drivers, I get similar errors on my console when I run the application and while I navigate the JPF:
    <May 17, 2005 2:31:17 PM EDT> <Error> <WLW> <000000> <unknown database type foun
    d. datbase name = Adaptive Server Anywhere, database driver name = jConnect (TM)
    for JDBC (TM)>
    (SAME ERROR ABOVE OUTPUTS WITH THE iAnywhere JDBC driver, the values are just different)
    AND...
    WARNING: The primary key map could not find a primary key parameter under the re
    quest key "_autoscope__rowId".
    Any feedback on this would be appreciated... I've done a lot of newsgroup searching and google'ing and really haven't found any help...
    Anthony

    Hi. I'm sorry to say the problem is that the RowSet implementation
    assumes the driver has implemented all the JDBC 2.0 methods, and
    the Sybase ASA driver hasn't so it blows chunks when we call them.
    If you can use the ASE jconnect type-4 driver for ASA, maybe it will
    work?
    Joe
    Anthony Mangione wrote:
    (First, I apologize for this enourmous post)
    First, my specs:
    I am using WebLogic Platform 8.1 SP4 on Windows 2000 Professional. I am using iAnywhere's (a Sybase company) Adaptive Server Anywhere 9.0.2 using jConnect 5.5 in one domain and iAnywhere JDBC driver in another.
    Second, my problem:
    I am using WL Workshop 8.1 to create a RowSet control within a Web Project. I'm then creating a JPF from the RowSet control. I'm following directions from the documentation from the Rapid Application Development class that I took where it references "creating a CRUD application". I'm having different problems depending on the driver I'm using.
    With jConnect: When I create the RowSet control, this outputs on my Admin Console:
    <May 3, 2005 12:09:47 PM EDT> <Warning> <RMI> <BEA-080003> <RuntimeException thr
    own by rmi server: weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getTableName
    (I)
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.j
    dbc2.tds.RowFormatToken.getTableName has not been completed and should not be ca
    lled..
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.jd
    bc2.tds.RowFormatToken.getTableName has not been completed and should not be cal
    led.
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseRuntimeException(Ljava.lang.S
    tring;[Ljava.lang.String;)V(ErrorMessage.java:773)
    at com.sybase.jdbc2.utils.Debug.notImplemented(Ljava.lang.Object;Ljava.l
    ang.String;)V(Debug.java:387)
    at com.sybase.jdbc2.tds.RowFormatToken.getTableName(I)Ljava.lang.String;
    (RowFormatToken.java:523)
    at weblogic.jdbc.wrapper.ResultSetMetaData_com_sybase_jdbc2_tds_RowForma
    tToken.getTableName(I)Ljava.lang.String;(Unknown Source)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getTableName(I)Ljava
    .lang.String;(ResultSetMetaDataImpl.java:132)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl_WLSkel.invoke(ILwebl
    ogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object
    ;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic.rmi.extensions.
    server.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.sp
    i.OutboundResponse;)V(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run()Ljava.lang.Object;(BasicS
    erverRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
    curity.subject.AbstractSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.l
    ang.Object;(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
    l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
    ject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(SecurityManage
    r.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(Lweblogic.rmi.spi.
    InboundRequest;)V(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(Lweblogic.kernel.Ex
    ecuteThread;)V(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
    ;)V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
    e)
    <May 3, 2005 12:09:47 PM EDT> <Warning> <RMI> <BEA-080003> <RuntimeException thr
    own by rmi server: weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getCatalogNa
    me(I)
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.j
    dbc2.tds.RowFormatToken.getCatalogName has not been completed and should not be
    called..
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.jd
    bc2.tds.RowFormatToken.getCatalogName has not been completed and should not be c
    alled.
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseRuntimeException(Ljava.lang.S
    tring;[Ljava.lang.String;)V(ErrorMessage.java:773)
    at com.sybase.jdbc2.utils.Debug.notImplemented(Ljava.lang.Object;Ljava.l
    ang.String;)V(Debug.java:387)
    at com.sybase.jdbc2.tds.RowFormatToken.getCatalogName(I)Ljava.lang.Strin
    g;(RowFormatToken.java:540)
    at weblogic.jdbc.wrapper.ResultSetMetaData_com_sybase_jdbc2_tds_RowForma
    tToken.getCatalogName(I)Ljava.lang.String;(Unknown Source)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getCatalogName(I)Lja
    va.lang.String;(ResultSetMetaDataImpl.java:140)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl_WLSkel.invoke(ILwebl
    ogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object
    ;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic.rmi.extensions.
    server.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.sp
    i.OutboundResponse;)V(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run()Ljava.lang.Object;(BasicS
    erverRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
    curity.subject.AbstractSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.l
    ang.Object;(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
    l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
    ject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(SecurityManage
    r.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(Lweblogic.rmi.spi.
    InboundRequest;)V(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(Lweblogic.kernel.Ex
    ecuteThread;)V(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
    ;)V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
    e)
    <May 3, 2005 12:09:47 PM EDT> <Warning> <RMI> <BEA-080003> <RuntimeException thr
    own by rmi server: weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getSchemaNam
    e(I)
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.j
    dbc2.tds.RowFormatToken.getSchemaName has not been completed and should not be c
    alled..
    com.sybase.jdbc2.utils.UnimplementedOperationException: The method com.sybase.jd
    bc2.tds.RowFormatToken.getSchemaName has not been completed and should not be ca
    lled.
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseRuntimeException(Ljava.lang.S
    tring;[Ljava.lang.String;)V(ErrorMessage.java:773)
    at com.sybase.jdbc2.utils.Debug.notImplemented(Ljava.lang.Object;Ljava.l
    ang.String;)V(Debug.java:387)
    at com.sybase.jdbc2.tds.RowFormatToken.getSchemaName(I)Ljava.lang.String
    ;(RowFormatToken.java:499)
    at weblogic.jdbc.wrapper.ResultSetMetaData_com_sybase_jdbc2_tds_RowForma
    tToken.getSchemaName(I)Ljava.lang.String;(Unknown Source)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl.getSchemaName(I)Ljav
    a.lang.String;(ResultSetMetaDataImpl.java:108)
    at weblogic.jdbc.rmi.internal.ResultSetMetaDataImpl_WLSkel.invoke(ILwebl
    ogic.rmi.spi.InboundRequest;Lweblogic.rmi.spi.OutboundResponse;Ljava.lang.Object
    ;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic.rmi.extensions.
    server.RuntimeMethodDescriptor;Lweblogic.rmi.spi.InboundRequest;Lweblogic.rmi.sp
    i.OutboundResponse;)V(BasicServerRef.java:477)
    at weblogic.rmi.internal.BasicServerRef$1.run()Ljava.lang.Object;(BasicS
    erverRef.java:420)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
    curity.subject.AbstractSubject;Ljava.security.PrivilegedExceptionAction;)Ljava.l
    ang.Object;(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
    l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
    ject;Ljava.security.PrivilegedExceptionAction;)Ljava.lang.Object;(SecurityManage
    r.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(Lweblogic.rmi.spi.
    InboundRequest;)V(BasicServerRef.java:415)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(Lweblogic.kernel.Ex
    ecuteThread;)V(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
    ;)V(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
    at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Sourc
    e)
    I have created the "stored procedures" in my database by running the sql_asa.sql script as directed by the jConnect 5.5 documentation. The weird thing though is that when I run my test browser, everything seems to be working despite the errors above. Are these errors something to be concerned about?
    Now, with the iAnywhere JDBC driver, when I do the same thing, I get no errors on my console during the RowSet control creation, but when I run the application with the test browser and start navigating the JPF, I eventually get two errors in the browser itself:
    When I click Insert (from the grid) and then click Cancel, my browser gives this error:
    An error has occurred:
    An exception occurred in the action begin
    [Microsoft][ODBC Driver Manager] Invalid argument value
    Afterwards, I click the Back button twice on the test browser and it gives this error:
    An error has occurred:
    An exception occurred in the action begin
    [Sybase][ODBC Driver]Invalid cursor state
    The Console reads like this:
    <May 17, 2005 4:12:05 PM EDT> <Warning> <WLW> <000000> <Id=top-level; Method=con
    trols.Newjcx11.getAllEmployee04(); Failure=java.sql.SQLException: [Microsoft][OD
    BC Driver Manager] Invalid argument value [ServiceException]>
    WARNING: The primary key map could not find a primary key parameter under the re
    quest key "_autoscope__rowId".
    <May 17, 2005 4:16:55 PM EDT> <Warning> <WLW> <000000> <Id=top-level; Method=con
    trols.Newjcx11.getAllEmployee04(); Failure=java.sql.SQLException: [Sybase][ODBC
    Driver]Invalid cursor state [ServiceException]>
    In addition, using both drivers, I get similar errors on my console when I run the application and while I navigate the JPF:
    <May 17, 2005 2:31:17 PM EDT> <Error> <WLW> <000000> <unknown database type foun
    d. datbase name = Adaptive Server Anywhere, database driver name = jConnect (TM)
    for JDBC (TM)>
    (SAME ERROR ABOVE OUTPUTS WITH THE iAnywhere JDBC driver, the values are just different)
    AND...
    WARNING: The primary key map could not find a primary key parameter under the re
    quest key "_autoscope__rowId".
    Any feedback on this would be appreciated... I've done a lot of newsgroup searching and google'ing and really haven't found any help...
    Anthony

  • How to use the type 4 of DBF JDBC 2.0 Driver?

    Hi,
    I download the "DBF JDBC 2.0 Driver package" from http://memebers.tripod.com/~ZYH/jdbc.html and copy it into my classpath.
    But I cannot find its Driver name string using in Class.forName(<DriverName>). And I also need the Connection String in Con.getConnection(<ConnectionString>).
    It will be great appreciated if you can give me any information.
    Thans a lot in advance!
    Jane

    Dear Jiehua Huang,
    First, you need to download JDK1.2, 1.3 or 1.4 from www.javasoft.com if
    you use DBF JDBC 2.0 package(DBF_JDBC20.jar). You can download JDK1.1.X
    too if you use DBF JDBC 1.2 package(DBF_JDBC12.jar).
    Secondly, please add DBF_JDBC20.jar (or DBF_JDBC12.jar) to your Java
    class path, for instance, "SET
    CLASSPATH=c:\javalib\DBF_JDBC2.0.jar;%classpath". You can also use "java
    -classpath c:\javalib\dbf.jar yourDBFclass" to run your class. More
    information about classpath, please read the "Setting the Classpath"
    topic in file:///yourdriver|/jdk1.2/docs/tooldocs/tools.html . You can
    use "java -classpath c:\javalib\DBF_JDBC20.jar yourDBFclass" or "java
    -classpath c:\javalib\DBF_JDBC12.jar yourDBFclass" too.
    Thirdly, you can use
    'Class.forName("com.hxtt.sql.dbf.DBFDriver").newInstance();' or
    Class.forName("com.hxtt.sql.dbf.DBFDriver");' to load this driver.
    Fourth, if you have used other JDBC driver, you only need to know the
    correct URL format for DriverManager.getConnection(url,"",""); You can
    find the URL format from "testDBF.java". If you were a Java novice,
    please read also other Java examples code in JDBC20demo.zip or
    JDBC12demo.zip.
    DBF URL format:
    Direct Access:
    jdbc:dbf:[/]/[DatabasePath] (You can omit that "//"
    characters)
    For example:
    "jdbc:dbf:/."
    "jdbc:dbf:/c:/dbffiles"
    "jdbc:DBF:////usr/data" for unix or linux:
    "jdbc:DBF:/./data"
    Access by DBF Server: Skip it if you don't use RMI or JINI.
    jdbc:DBF://hostname:port/[DatabasePath]
    For example:
    "jdbc:DBF://domain.com:3099/dbffiles" if
    one DBFServer is run on the 3099 port of domain.com
    Last, DBF driver is a standard JDBC driver so that you will find most of
    valuable information at
    file:///yourdrive|/jdk1.2/docs/api/java/sql/package-frame.html .
    DBF supports SQL Minimum Grammar, which is a subset of the Entry level
    syntax of SQL-92.
    The major syntax is listed below:
    CREATE TABLE base-table-name (column-identifier data-type
    [,column-identifier data-type]...)
    DROP TABLE base-table-name
    DELETE FROM table-name [WHERE search-condition]
    INSERT INTO table [ ( column [, ...] ) ] { VALUES ( expression [,
    ...] ) | SELECT query }
    UPDATE table-name SET column-identifier = {expression | NULL }[,
    column-identifier = {expression | NULL}]... [WHERE search-condition]
    SELECT [ALL | DISTINCT ]select-list FROM table-reference-list
    [WHERE search-condition] [group-by-clause] [order-by-clause]
    CREATE [UNIQUE] INDEX indexName[(keylength)][,...] [OF
    indexFileName] ON tableName (expression UNIQUE ASC
    [FOR lExpression][,...])
    DROP INDEX {ALL | indexName[,indexName2,...]} [of indexFileName]
    ON table-name
    REINDEX {ALL | indexFileName[,indexfiLEName2,...]} ON table-name
    DBF driver will use index to speed up the query which contains some
    index expressions. If a table has a structural .CDX or .IDX file, the
    file is opened automatically when the table is opened. You have to run
    the DBFIndex once to supply the necessary index file information for the
    nonstructural index file which hasn't the same file name as its table
    name and is created by other xbase applications. Then DBF will create a
    special table.INDICES file and maintain the index files automatically.
    You can use "java com.hxtt.sql.dbf.DBFIndex" to find out how to supply
    existent index files. Useage: java com.hxtt.sql.dbf.DBFIndex
    dbfTablePath tableName indexFileFullName1 [indexFileFullName2 ...]. For
    instance, you have a legacy 'product.dbf' file with prodname.idx,
    prodprice.idx and orderdate.idx on "c:\proudct\data" directory, you can
    run "java com.hxtt.sql.dbf.DBFIndex c:\proudct\data product prodname.idx
    prodprice.idx orderdate.idx" once. Then DBF will create a special
    product.INDICES file and maintain the index files automatically. All
    operations of update, insert and delete will update the .IDX files that
    are related to the DBF file. DBF driver doesn't index all deleted records.
    File name is case sensitive on unix OS. For unix or linux, DBF will try
    to seek acquiescently dbf files with the suffixs like ".DBF" for the
    first time, and ".dbf" for the second time. If it failed to find out a
    suitable dbf file, it will try other mixture method. You can also use
    the full table name to quote your table. For instance, 'select * from
    "Test.dBf"'.
    Any question or problem? Please don't hesitate to let me know.
    With best regards,
    Zhao Yonghong
    System Analyst
    [email protected]

  • How to capture the remot desktop using RMI?

    Hi friends..
    I am doing a mini project to capture the remot desktop using RMI. I am very new with this subject. So 'm waiting for the help of experts...

    You can't. RMI doesn't do that. After you have captured it, some other way, you can transmit it via RMI, or plain Sockets, or several other ways.

  • How to use third party jdbc drivers ?

    Hi,
    Im new to sun one app server.i have some existing CMP
    bean (currently testing under J2EE RI).database used is
    SQL server 2000 and using a 3 rd party JDBC Driver.
    my question is. if i switch to sun one app server, do i need
    anyother third party stuff to support CMP using SQL
    Server? (other than the exisiting jdbc driver andSQL Server).
    I read somewhere that in sun one we need to get a
    persistance manger from the 3 rd part. is it necessary?
    can i use my plain jdbc driver with the builtin persistance
    manager of sun one app server?. how can i do that ?
    thanks in advance
    -mr ex

    Hi,
    Persistence manager from 3rd party is not required.You
    can use the built in persistence manager of Sun one application server.
    You can refer the following link for creating new persistence manager
    http://docs.sun.com/source/816-7156-10/agj2eres.html#47595
    Get back in case of issues

  • Oracle deadlock - how to use "synchronised" keyword in a transaction?

    Hi,
    I use WL6.1 SP4, Oracle 8.1.6, with some Java objects which execute a
    lot
    of SQL queries (mixed update, insert and select) using plain JDBC
    calls,
    and Weblogic connection pools. These objects are called by servlets.
    I experienced recently deadlocks when two users call the object at the
    same
    time (See error below).
    I execute the queries using "synchronized" keyword in the following
    way:
    synchronized (this)
    conConnection.setAutoCommit(false);
    executeTransaction(myStatement);
    conConnection.commit();
    executeTransaction is overriden in sub-classes and is the method which
    executes
    all the queries.
    It calls methods in other objects. These methods are not declared as
    synchronized.
    1) Should they?
    2) Should I use the keyword "synchronized" in another way?
    3) This part of code is also called when I do only "select"
    statements. I guess
    it should only be synchronized when we do "update" and "insert" which
    could lead
    to a deadlock?
    4) Do you have any idea why this deadlock occurs as I use the
    "synchronized"
    keyword, and one thread should wait until the other one has finished?
    Thanks for any idea,
    Stéphanie
    ----------------- error:
    <ExecuteThread: '4' for queue: 'default'> <> <> <000000> <SQL request
    sent to database: UPDATE PARTICIPANT par SET par.PARTICIPANTLASTRANK =
    4 WHERE par.IDPARTICIPANT = 8983566>
    <ExecuteThread: '11' for queue: 'default'> <> <> <000000> <SQL request
    sent to database: UPDATE PARTICIPANT par SET par.PARTICIPANTLASTRANK =
    6 WHERE par.IDPARTICIPANT = 8983570>
    ORA-00060: deadlock detected while waiting for resource
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:796)
         at weblogic.jdbc.pool.Statement.executeUpdate(Statement.java:872)
         at weblogic.jdbc.rmi.internal.StatementImpl.executeUpdate(StatementImpl.java:89)
         at weblogic.jdbc.rmi.SerialStatement.executeUpdate(SerialStatement.java:100)
         at bfinance.framework.EDBBLBean.executeSQL(EDBBLBean.java:299)

    Hi Stepanie,
    I'd try to group update statement together. Usually it helps.
    Regards,
    Slava Imeshev
    "Stephanie" <[email protected]> wrote in message
    news:[email protected]...
    Thanks for your answer.
    In the case you describe, is there a way to ensure that tx-2 waits for
    tx-1
    to be finished before beginning?
    My transaction which causes the problem is the following (simplified):
    UPDATE tableA SET islast=0 WHERE externalid=myid;
    for (int i=0; i< aVector.size(); i++) {
    INSERT INTO tableA (id, islast, ranking, externalid) (SELECT
    SEQ_tableA.nextval, 1, 0, myid);
    UPDATE tableA SET ranking = /*calculated ranking */
    WHERE externalid=myid AND islast=1;
    UPDATE tableB ....
    commit;
    tx-1 and tx-2 execute this transaction at the same time. tx-1 begins
    The deadlock appears when tx-2 executes the second UPDATE tableA
    query.
    I don't see how I can avoid to execute these two update queries, so if
    I can find another way to prevent deadlock, it would be great!
    Stéphanie
    Joseph Weinstein <[email protected]_this> wrote in message
    news:<[email protected]_this>...
    Stephanie wrote:
    Hi,
    I use WL6.1 SP4, Oracle 8.1.6, with some Java objects which execute a
    lot
    of SQL queries (mixed update, insert and select) using plain JDBC
    calls,
    and Weblogic connection pools. These objects are called by servlets.
    I experienced recently deadlocks when two users call the object at the
    same
    time (See error below).Hi. The error you are getting isn't necessarily from a lack ofsynchronization
    of your java objects. It has to do with the order in which you accessDBMS
    data. You are getting ordinary DBMS deadlocks, which are caused when
    two DBMS connections each have a lock the other wants, in order toproceed.
    The DBMS will quickly discover this and will kill one transaction inorder to
    let the other one proceed:
    time 0: tx-1 and tx-2 have started.....
    time 1: tx-1: update tableA set val = 1 where key = 'A'
    time 2: tx-2: update tableB set val = 2 where key = 'B'
    time 3: tx-1: update tableB set val = 1 where key = 'B' (waitsbecause tx-2 has the row
    locked)
    time 4: tx-2: update tableA set val = 2 where key = 'A' (waitsbecause tx-1 has the row
    locked)
    This is a deadlock. The solution is to organize your application code sothat every
    transaction accesses the data in the same order, eg: update tableAfirst, then update tableB.
    This will prevent deadlocks.
    Joe Weinstein at BEA
    I execute the queries using "synchronized" keyword in the following
    way:
    synchronized (this)
    conConnection.setAutoCommit(false);
    executeTransaction(myStatement);
    conConnection.commit();
    executeTransaction is overriden in sub-classes and is the method which
    executes
    all the queries.
    It calls methods in other objects. These methods are not declared as
    synchronized.
    1) Should they?
    2) Should I use the keyword "synchronized" in another way?
    3) This part of code is also called when I do only "select"
    statements. I guess
    it should only be synchronized when we do "update" and "insert" which
    could lead
    to a deadlock?
    4) Do you have any idea why this deadlock occurs as I use the
    "synchronized"
    keyword, and one thread should wait until the other one has finished?
    Thanks for any idea,
    Stéphanie
    ----------------- error:
    <ExecuteThread: '4' for queue: 'default'> <> <> <000000> <SQL request
    sent to database: UPDATE PARTICIPANT par SET par.PARTICIPANTLASTRANK =
    4 WHERE par.IDPARTICIPANT = 8983566>
    <ExecuteThread: '11' for queue: 'default'> <> <> <000000> <SQL request
    sent to database: UPDATE PARTICIPANT par SET par.PARTICIPANTLASTRANK =
    6 WHERE par.IDPARTICIPANT = 8983570>
    ORA-00060: deadlock detected while waiting for resource
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    atoracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    atoracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
    atoracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047
    atoracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    atoracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
    :2709)
    atoracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:796)
    atweblogic.jdbc.pool.Statement.executeUpdate(Statement.java:872)
    atweblogic.jdbc.rmi.internal.StatementImpl.executeUpdate(StatementImpl.java:89
    atweblogic.jdbc.rmi.SerialStatement.executeUpdate(SerialStatement.java:100)
    at bfinance.framework.EDBBLBean.executeSQL(EDBBLBean.java:299)

  • Problem when using cloudscape on JBoss

    Hi All,
    I try to run Petstore 1.3.2 on JBoss 3.2.3. I used a patch for Petstore 1.3.2 to run on JBoss 3.0.1 RC1. I tested, this patch works on 3.0.1 well. Using database cloudscape, provided by j2eesdk 1.3.1.
    But it doesnt work in 3.2.3.
    link to the patch and doc:
    http://docs.huihoo.com/jboss/petstore.html
    I changed two things of JBoss 3.2.3:
    First, I changed "C:\jboss-3.2.3\server\default\conf\login-config.xml"
    add following lines into it:
    Code:
    <application-policy name = "CloudscapeDbRealm">
           <authentication>
              <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
                 <module-option name = "principal"></module-option>
                 <module-option name = "userName">estoreuser</module-option>
                 <module-option name = "password">estore</module-option>
                 <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=EstoreDataSource</module-option>
              </login-module>
           </authentication>
        </application-policy>
        <application-policy name = "CloudscapeDbRealmInventory">
           <authentication>
              <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
                 <module-option name = "principal"></module-option>
                 <module-option name = "userName">estoreuser</module-option>
                 <module-option name = "password">estore</module-option>
                 <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=InventoryDataSource</module-option>
              </login-module>
           </authentication>
        </application-policy>     --------------------------------------------------------------------
    Second, I copy a file called "cloudscape-service.xml" into "C:\jboss-3.2.3\server\default\deploy"
    The content of this file:
    <server>
      <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=EstoreDataSource">
        <attribute name="SecurityDomainJndiName">CloudscapeDbRealm</attribute>
        <depends optional-attribute-name="ManagedConnectionFactoryName">
          <!--embedded mbean-->
          <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=EstoreDataSource"> <!--DS-->
            <attribute name="JndiName">EstoreDB</attribute>
            <attribute name="ManagedConnectionFactoryProperties">
              <properties>
                <config-property name="ConnectionURL" type="java.lang.String">jdbc:rmi://localhost:1099/jdbc:cloudscape:EstoreDB;create=true</config-property>
                <config-property name="DriverClass" type="java.lang.String">COM.cloudscape.core.RmiJdbcDriver</config-property>
                <!--set these only if you want only default logins, not through JAAS -->
                <config-property name="UserName" type="java.lang.String">estoreuser</config-property>
                <config-property name="Password" type="java.lang.String">estore</config-property>
              </properties>
            </attribute>
            <!--hack-->
            <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
          </mbean>
        </depends>
        <depends optional-attribute-name="ManagedConnectionPool">
          <!--embedded mbean-->
          <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=EstoreDataSource">
            <attribute name="MinSize">0</attribute>
            <attribute name="MaxSize">50</attribute>
            <attribute name="BlockingTimeoutMillis">5000</attribute>
            <attribute name="IdleTimeoutMinutes">15</attribute>
            <attribute name="Criteria">ByContainer</attribute>
          </mbean>
        </depends>
        <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
        <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
        <attribute name="TransactionManager">java:/TransactionManager</attribute>
        <!--make the rar deploy! hack till better deployment-->
        <depends>jboss.jca:service=RARDeployer</depends>
      </mbean>
      <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=InventoryDataSource">
        <!--uncomment out this line if you are using the Informix DbRealm above -->
        <attribute name="SecurityDomainJndiName">CloudscapeDbRealmInventory</attribute>
        <depends optional-attribute-name="ManagedConnectionFactoryName">
          <!--embedded mbean-->
          <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=InventoryDataSource"> <!--DS-->
            <attribute name="JndiName">InventoryDB</attribute>
            <attribute name="ManagedConnectionFactoryProperties">
              <properties>
                <config-property name="ConnectionURL" type="java.lang.String">jdbc:rmi://localhost:1099/jdbc:cloudscape:EstoreDB;create=true</config-property>
                <config-property name="DriverClass" type="java.lang.String">COM.cloudscape.core.RmiJdbcDriver</config-property>
                <!--set these only if you want only default logins, not through JAAS -->
                <config-property name="UserName" type="java.lang.String">estoreuser</config-property>
                <config-property name="Password" type="java.lang.String">estore</config-property>
              </properties>
            </attribute>
            <!--hack-->
            <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
          </mbean>
        </depends>
        <depends optional-attribute-name="ManagedConnectionPool">
          <!--embedded mbean-->
          <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=InventoryDataSource">
            <attribute name="MinSize">0</attribute>
            <attribute name="MaxSize">50</attribute>
            <attribute name="BlockingTimeoutMillis">5000</attribute>
            <attribute name="IdleTimeoutMinutes">15</attribute>
            <attribute name="Criteria">ByContainer</attribute>
          </mbean>
        </depends>
        <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
        <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
        <attribute name="TransactionManager">java:/TransactionManager</attribute>
        <!--make the rar deploy! hack till better deployment-->
        <depends>jboss.jca:service=RARDeployer</depends>
      </mbean>
    </server>
    (I started cloudscape.)
    JBoss 3.2.3 seems has no problem with the modification of "login-config.xml".
    However, JBoss 3.2.3 can't deploy "cloudscape-service.xml". It shows error msg when I start it:
    12:22:18,140 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
    Cause: Incomplete Deployment listing:
    Packages waiting for a deployer:
    Incompletely deployed packages:
    MBeans waiting for classes:
    MBeans waiting for other MBeans:
    [ObjectName: jboss.jca:service=LocalTxCM,name=EstoreDataSource
    state: FAILED
    I Depend On: jboss.jca:service=LocalTxDS,name=EstoreDataSource
    Depends On Me: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=ManagedConnectionFactoryName value=jboss.
    jca:service=LocalTxDS,name=EstoreDataSource on mbean jboss.jca:service=LocalTxCM,name=EstoreDataSource; - nested throwable: (javax.management.AttributeNotFoundException: Writable attribute 'ManagedConnectionFactoryName' not found), ObjectName: jboss.jca:service=LocalTxDS,name=EstoreDataSource
    state: FAILED
    I Depend On:
    Depends On Me: jboss.jca:service=LocalTxCM,name=EstoreDataSource
    org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName, ObjectName:
    jboss.jca:service=LocalTxCM,name=InventoryDataSource
    state: FAILED
    I Depend On: jboss.jca:service=LocalTxDS,name=InventoryDataSource
    Depends On Me: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=ManagedConnectionFactoryName value=jboss.
    jca:service=LocalTxDS,name=InventoryDataSource on mbean jboss.jca:service=LocalTxCM,name=InventoryDataSource; - nested
    throwable: (javax.management.AttributeNotFoundException: Writable attribute 'ManagedConnectionFactoryName' not found), ObjectName: jboss.jca:service=LocalTxDS,name=InventoryDataSource
    state: FAILED
    I Depend On:
    Depends On Me: jboss.jca:service=LocalTxCM,name=InventoryDataSource
    org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName
    The Petstore still can run, but shows "Unable to Connect to Database
    Database Connection is closed: Confirm that you have started your database."
    Could anyone kindly help with this problem, please?
    The reason why I using 3.2.3 is the project I am working on need to use TPTP BTM to monitor Petstore.
    But eclipse seems just support JBoss 3.2.3 and JBoss 4.0.
    I have the same problem with JBoss 4.0.5 GA.
    Thank you very much!

    Hi,
    I am having the same issue with Siebel on Demand web services. I was wondering if you ever solved this issue???

  • Is there any way to map tables in rutime dynamically?

    Hi
    Thank you for reading my post
    My question is mostly technical and i want to know whether with EJB 3.0 (JPA) can do this or not.
    we have an application which we are going to port it to EJB 3.0 from plain JDBC.
    In our application, we have tables which are created after we complete the code,
    Tables are created in customer environment based on thier requirement. we store all details about tables in our metadata system. this details contain table structure and business roles for that tables
    So, We have some tables which we know all of its details but we do not have access to application to recompile it or do mapping procedure again.
    And we need to store records into those tables and also perform EJB Query on them.
    What i want to know is:
    -Is there any way that we could map them dynamically in runtime?
    -How we can query them if we can not map them programically?
    -What will be the query result? it is a collection? if it is a collection, then what are collection elements?
    Thanks

    Thank you for reply.
    We have some tables that are added to our system after we developed the core application.
    Now we need to access those tables using EJB 3.0 .
    We can not predict what kind of tables will be added, when customer add those table they also provide vast amount of metadata that our application need.
    before we think about moving to EJB 3.0, we used JDBC to handle CRUD on those new tables based on metadata that customer file into our core application.
    Now that we thought to move to EJB 3.0, we do not know how to handle those new tables that cutomer define.
    We can not predict what kind of table they will create, so we should find some way to :
    Create all required EJB 3.0 artifacts from
    -A database Table
    -and business metadata that customer file into our core application.
    when we had JDBC, we could create dynamic SQL statement using table name and those meta data. but now with EJB 3.0 we can not find a way to do this because EJB 3.0 need some java class to be present before we could map anything.
    Thanks

  • Re: [SunONE-JATO] Re: Using an object to store and display data

    Personally, I think there is little or no value to creating a "domain"
    object that itself relies on a JATO QueryModel internally, but hides that
    fact and requires use of BeanAdapterModel.
    It would be more appropriate (and much less work, and more scalable) to just
    derive a QueryModel subclass and add the domain-specific behavior to the
    model. In other words, what's the point of creating an object that hides
    JATO inside it when you're running in JATO to begin with? Now if the domain
    object were doing plain JDBC, and thus trying to be JATO independent, that
    would be different. However, you could still implement the Model interface
    on the object (or use BeanAdapterModel) to integrate it seamlessly with the
    View tier.
    Todd
    ----- Original Message -----
    From: "grschroeder" <grschroeder@y...>
    Sent: Wednesday, July 31, 2002 12:00 PM
    Subject: [SunONE-JATO] Re: Using an object to store and display data
    Craig,
    I think it all finally makes sense. First, your assumption is
    correct regarding the process flow. The ViewBean will interact with
    a custom Javabean which will then in turn interact with a SQL Model
    to access the database. So now let me make sure I understand what I
    need to do. Basically the custom Javabean will have a method to get
    the SQLModel. I would then invoke the setValue method on the
    SQLModel and call the appropriate execute method( e.g.,
    executeUpdate, etc. ) just like I would do from a ViewBean. Does
    this sound correct?
    Thanks,
    Greg
    --- In SunONE-JATO@y..., "Craig V. Conover" <craig.conover@s...>
    wrote:
    Greg,
    see below...
    grschroeder wrote:
    Thanks for the help Craig. I looked at the sample code that makes
    use of the BeanAdapterModel. Basically it looks like it allows a
    view to interact with a bean the same way it would interact with
    any
    other model. That part I think I understand.
    This is correct.
    The part I'm a little
    unclear on still is how to interface this BeanAdapterModel( which
    is
    a very basic model ) that I now have with a query model toactually
    interact with the database.
    Not sure what you mean by "interface this BeanAdapterModel ... witha
    query model". Does this mean that you have a ViewBean the interactswith
    a custom JavaBean via the BeanAdpterModel wrapper, and from the
    JavaBean you are interacting with the SQL Model?
    So it looks like this: ViewBean > BeanAdapterModel(Custom JavaBean)
    SQL Model > RDBMS
    That's what I am reading anyway. Please explain this to me.
    Would I need to make direct JDBC calls
    from my custom model instead of letting JATO dynamically create
    the
    calls for me?
    If my assumptions above are correct, then the custom JavaBean cansimply
    use the SQL Model in exactly the same manner as the ViewBean,otherwise,
    if no SQL Model is involved, then yes, you need to handle JDBCdirectly,
    which is fine, if you do it "right" (connection pooling, result set
    handling, etc.).
    Thanks,
    Greg
    --- In SunONE-JATO@y..., "Craig V. Conover" <craig.conover@s...>
    wrote:
    I think the best approach would be to treat your Domain Objects
    (DO) as
    the Database (the enterprise tier) from JATO's perspective. You
    could
    create custom models that interface with our DO's and then the
    JATO
    Views could easily bind to the custom DO models just like anyother
    model. This should eliminate the need for pushing data/objectsfrom
    >
    view
    to model to database.
    There is a JATO class called BeanAdapterModel that might be just
    what
    you need, however, I am not experienced with using it. Maybe
    someone
    else on my team or in the community could better explain how to
    use
    >
    this
    class.
    craig
    grschroeder wrote:
    Venki,
    Thanks for the response. Actually, I'm not sure if I can answer
    all
    of your questions because those are some of the same questions
    that
    we're trying to answer ourselves. Basically, what we're trying
    to
    >do
    is incorporate our domain object model into the JATO framework.
    My
    thinking was that one way we could accomplish this was by
    storing
    >a
    Javabean object in the HTTPSession to represent an object in the
    domain model, and that the Viewbean and JATO Model could get and
    set
    data from there. If you have a better suggestion of how to
    accomplish this, I'm definitely open to hearing it.
    Thanks,
    Greg
    --- In SunONE-JATO@y..., Venki <heyvenki@y...> wrote:
    OK grschroeder , first let me get this straight:
    0. Are you going to pass this object to the model, or are u
    going
    >
    to pass the session object to the model?
    1. Is there any specific reason for this approach you are
    taking?
    2. Will there be a notification from the object u havementioned
    >to
    have the model persist the data?
    3. What about the reverse case, when the model refreshes the
    data,
    how are you going to refresh you object?
    4. The JavaBean Object that u are talking about, is it your own
    object or is it implementation of an existing JATO interface?
    ~Venki
    grschroeder wrote:I'm fairly new to JATO, but I think I now
    have
    >a
    basic understanding
    of how Viewbeans and Models interact. However, I want to
    incorporate
    the use of a Javabean object that will be stored in the HTTP
    session
    and will act as the connection between the Viewbean and Model
    instead
    of having the Viewbean and Model interact directly with each
    other.
    Basically I would like to have the Model set data in the object
    stored in the session so that the Viewbean can pull it out to
    display
    it. And vice versa, once the user modifies the data and is
    ready
    >
    to
    persist it, I would like to have the Viewbean set data in the
    object
    stored in the session so that the Model can pull it out to
    store
    >it
    in the database. I'm not sure what the best approach would be
    to
    accomplish this. Any help you could give would be greatly
    appreciated.
    Thanks,
    Greg
    To download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Service.
    Venki
    IT Solutions
    #6, Pycrofts Garden Road, Nugambakkam, Chennai - 600 006
    91-44-4925740(Home) 91-44-8212877(Work)
    * Luck is what happens when Preparation meets Opportunity.
    To download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >To download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    To download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    Personally, I think there is little or no value to creating a "domain"
    object that itself relies on a JATO QueryModel internally, but hides that
    fact and requires use of BeanAdapterModel.
    It would be more appropriate (and much less work, and more scalable) to just
    derive a QueryModel subclass and add the domain-specific behavior to the
    model. In other words, what's the point of creating an object that hides
    JATO inside it when you're running in JATO to begin with? Now if the domain
    object were doing plain JDBC, and thus trying to be JATO independent, that
    would be different. However, you could still implement the Model interface
    on the object (or use BeanAdapterModel) to integrate it seamlessly with the
    View tier.
    Todd
    ----- Original Message -----
    From: "grschroeder" <grschroeder@y...>
    Sent: Wednesday, July 31, 2002 12:00 PM
    Subject: [SunONE-JATO] Re: Using an object to store and display data
    Craig,
    I think it all finally makes sense. First, your assumption is
    correct regarding the process flow. The ViewBean will interact with
    a custom Javabean which will then in turn interact with a SQL Model
    to access the database. So now let me make sure I understand what I
    need to do. Basically the custom Javabean will have a method to get
    the SQLModel. I would then invoke the setValue method on the
    SQLModel and call the appropriate execute method( e.g.,
    executeUpdate, etc. ) just like I would do from a ViewBean. Does
    this sound correct?
    Thanks,
    Greg
    --- In SunONE-JATO@y..., "Craig V. Conover" <craig.conover@s...>
    wrote:
    Greg,
    see below...
    grschroeder wrote:
    Thanks for the help Craig. I looked at the sample code that makes
    use of the BeanAdapterModel. Basically it looks like it allows a
    view to interact with a bean the same way it would interact with
    any
    other model. That part I think I understand.
    This is correct.
    The part I'm a little
    unclear on still is how to interface this BeanAdapterModel( which
    is
    a very basic model ) that I now have with a query model toactually
    interact with the database.
    Not sure what you mean by "interface this BeanAdapterModel ... witha
    query model". Does this mean that you have a ViewBean the interactswith
    a custom JavaBean via the BeanAdpterModel wrapper, and from the
    JavaBean you are interacting with the SQL Model?
    So it looks like this: ViewBean > BeanAdapterModel(Custom JavaBean)
    SQL Model > RDBMS
    That's what I am reading anyway. Please explain this to me.
    Would I need to make direct JDBC calls
    from my custom model instead of letting JATO dynamically create
    the
    calls for me?
    If my assumptions above are correct, then the custom JavaBean cansimply
    use the SQL Model in exactly the same manner as the ViewBean,otherwise,
    if no SQL Model is involved, then yes, you need to handle JDBCdirectly,
    which is fine, if you do it "right" (connection pooling, result set
    handling, etc.).
    Thanks,
    Greg
    --- In SunONE-JATO@y..., "Craig V. Conover" <craig.conover@s...>
    wrote:
    I think the best approach would be to treat your Domain Objects
    (DO) as
    the Database (the enterprise tier) from JATO's perspective. You
    could
    create custom models that interface with our DO's and then the
    JATO
    Views could easily bind to the custom DO models just like anyother
    model. This should eliminate the need for pushing data/objectsfrom
    >
    view
    to model to database.
    There is a JATO class called BeanAdapterModel that might be just
    what
    you need, however, I am not experienced with using it. Maybe
    someone
    else on my team or in the community could better explain how to
    use
    >
    this
    class.
    craig
    grschroeder wrote:
    Venki,
    Thanks for the response. Actually, I'm not sure if I can answer
    all
    of your questions because those are some of the same questions
    that
    we're trying to answer ourselves. Basically, what we're trying
    to
    >do
    is incorporate our domain object model into the JATO framework.
    My
    thinking was that one way we could accomplish this was by
    storing
    >a
    Javabean object in the HTTPSession to represent an object in the
    domain model, and that the Viewbean and JATO Model could get and
    set
    data from there. If you have a better suggestion of how to
    accomplish this, I'm definitely open to hearing it.
    Thanks,
    Greg
    --- In SunONE-JATO@y..., Venki <heyvenki@y...> wrote:
    OK grschroeder , first let me get this straight:
    0. Are you going to pass this object to the model, or are u
    going
    >
    to pass the session object to the model?
    1. Is there any specific reason for this approach you are
    taking?
    2. Will there be a notification from the object u havementioned
    >to
    have the model persist the data?
    3. What about the reverse case, when the model refreshes the
    data,
    how are you going to refresh you object?
    4. The JavaBean Object that u are talking about, is it your own
    object or is it implementation of an existing JATO interface?
    ~Venki
    grschroeder wrote:I'm fairly new to JATO, but I think I now
    have
    >a
    basic understanding
    of how Viewbeans and Models interact. However, I want to
    incorporate
    the use of a Javabean object that will be stored in the HTTP
    session
    and will act as the connection between the Viewbean and Model
    instead
    of having the Viewbean and Model interact directly with each
    other.
    Basically I would like to have the Model set data in the object
    stored in the session so that the Viewbean can pull it out to
    display
    it. And vice versa, once the user modifies the data and is
    ready
    >
    to
    persist it, I would like to have the Viewbean set data in the
    object
    stored in the session so that the Model can pull it out to
    store
    >it
    in the database. I'm not sure what the best approach would be
    to
    accomplish this. Any help you could give would be greatly
    appreciated.
    Thanks,
    Greg
    To download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Service.
    Venki
    IT Solutions
    #6, Pycrofts Garden Road, Nugambakkam, Chennai - 600 006
    91-44-4925740(Home) 91-44-8212877(Work)
    * Luck is what happens when Preparation meets Opportunity.
    To download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >To download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    To download the latest version of JATO, please visit:
    http://www.sun.com/software/download/developer/5102.html
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

Maybe you are looking for

  • Problem on 9 pin Din cable

    I had bought a Inspire 5700 for few years. However, in last christmas, the 9 pin din digital cable had broken. Now I can only use the analog cable to connect my audigy to I5700. Where can I buy this cable?I had e-mail to Creative CS but they just sai

  • ITunes 10.5.2 upgrade snafu, error 13019

    I successfully synched my updated iTunes library to my iPhone today. Just a little while later, I downloaded the 10.5.2 iTunes update, and now I cannot sync my 5th generation Nano to iTunes. I have tried multiple suggested fixes found in these forums

  • Lightroom 3 catalog question (newbie)

    I have been using bridge but recently installed lightroom 3. I wish to make one overall catalog containing all the images in my Images folder,a large C drive folder with numerous sub-folders. I restarted LR with alt key down (PC) and specified this f

  • Survey Suite process steps

    Hi Can you post the process steps involved in configuring survey suite. Thx

  • ALV Grid Selection

    Hi All, Can any one give suggestion for this multiple row selection in ALV grid without using CTRL key Thanks Surendra