Hi Brandon!!!
If you only read from the database, unique indentifiers shouldn't be a
problem. Storage of the beans (using CMP) on the other hand is at the
moment quite impossible. This is because the database produces the unique
and there is currently no way that the EJB Server can retrieve that value.
To this problem, there is one solution as I see it, rewrite a persistence
manager yourself. This, however, takes *some* time. Then you can use the
system variable @@identity (in MS SQL Server)J as return value of a stored
procedure (so you would have to use stored procedures).
Regards,
Fredrik...
On Thu, 25 May 2000, Brandon Campbell wrote:
> I am having problems with a MSSQL datatype called uniqueidentifier. When the
>container-managed bean tries to retreive the bean the following exception is thrown.
>
> [JAWS] Load SQL:SELECT cat_master_flag,cat_ct_id,cat_id,cat_display_flag,cat_name
>FROM categories WHERE cat_id=?
> at java.lang.reflect.Field.set(Native Method)
> at
>org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager.java:692)
> at
>org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:240)
> at
>org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:82)
> at
>org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:88)
> at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:151)
> at
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:129)
> at java.lang.reflect.Method.invoke(Native Method)
> at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
> at sun.rmi.transport.Transport$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Unknown Source)
> at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> [Default] java.rmi.ServerException: Load failed; nested exception is:
>
>
> When I use JDBC and do a select statement I have to use the convert() function to
>get a String object.
>
> I need to know if I can do any of the following
>
> 1. Modify the select statement that JAWS produces?
> 2. Workaround this weird datatype?
>
> Any help would be appreciated.
>
> Thanks
>
> Brandon Campbell
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]