With this combination, I seem to solve the problem a while back:

JBoss 4.0.3 RCx or JBoss 4.0.4 CR2;
Default standardjbosscmp-jdbc.xml setting for Sybase;
Table column type: binary(16);


  On the field annotation:

    @Embedded 
    @AttributeOverrides ([EMAIL PROTECTED](name="ip", [EMAIL 
PROTECTED](name="ip"))})
    public IpAddress getIp()
    {
        return ip;
    }
    public void setIp(IpAddress addr)
    {
        ip = addr;
    }


On the embeddable class:

@Embeddable
public class IpAddress implements Serializable {
    private InetAddress ip; 

    public void setIp(byte[] b) throws UnknownHostException
    {
        ip = InetAddress.getByAddress(b);
    }
    
    public byte[] getIp()
    {
        return ip.getAddress();
    }
}


You can see that eventually I still use the byte[] mapping.  Though in my 
specific case, I used another type.   I don't think the embeddable type solves 
this problem.  But showing it here as what I have.  Hope this will help.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3943063#3943063

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3943063


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to