Forum Discussion
HankLiu_159320
Nimbostratus
@Brad Parker
Thanks for taking interest in this post. Duplicate profile was my initial thought as well. But running the code without transactions works fine, which suggests that there is more to it. I think we're on the right track, but the create(serveDef, wMasks, serveRes, serverProf) method does not create* the profiles based on args passed in, it just creates the virtual servers with the profiles passed in as arg according to docs. https://devcentral.f5.com/wiki/iControl.LocalLB__VirtualServer__create.ashx
btw the args in create() were prepared before the transaction began so it occurs real-time and no errors were thrown because of them.
HankLiu_159320
Nov 24, 2014Nimbostratus
I'm not using the TMSH commands. I'm making iControl api call in Java.
The code where it is breaking is as simple as this...
interfaces.getSystemSession().start_transaction();
interfaces.getLocalLBVirtualServer().delete_virtual_server(vServers);
interfaces.getLocalLBVirtualServer().create(serveDef, wMasks, serveRes, serverProf);
interfaces.getSystemSession().submit_transaction();