# Setting a Virtual Server type to "Performance (Layer 4)" with Java

**URL:** <https://community.f5.com/t/setting-a-virtual-server-type-to-performance-layer-4-with-java/9112>\
**Category:** Technical Forums\
**Tags:** icontrol, dev, devops\
**Created:** [November 6, 2006, 8:50am UTC](https://community.f5.com/t/setting-a-virtual-server-type-to-performance-layer-4-with-java/9112 "2006-11-06T08:50:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chun\_Kit\_Cheng\_1](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@Chun\_Kit\_Cheng\_1](https://community.f5.com/u/Chun_Kit_Cheng_1)\
**Post date:** [November 6, 2006, 8:50am UTC](https://community.f5.com/t/setting-a-virtual-server-type-to-performance-layer-4-with-java/9112/1 "2006-11-06T08:50:51Z")

</div>

Is there a (simple) way to set a virtual server to type “Performance (Layer 4)” with iControl/Java?

I’ve tried doing something like this…

```tcl
LocalLBVirtualServerBindingStub vss = ...; /* initialization etc */
  vss.set_type(new String[] { "myFastL4VS" }, new LocalLBVirtualServerVirtualServerType[] { LocalLBVirtualServerVirtualServerType.RESOURCE_TYPE_FAST_L4 });

```

without success - after executing the above code the GUI still shows it as a “Standard” type virtual server. If this has to be set via adding profile, is there an enumeration somewhere to be referred as the fast layer 4 profile?

By the way, the call

```tcl
LocalLBVirtualServerVirtualServerType types[] = vss.get_type(new String[] { "fastL4VSFromGUI" });
  System.out.println(types[0]);

```

returns “RESOURCE\_TYPE\_POOL” as well, even I manually set it to be “Performance (Layer 4)” in the GUI.

---

<div class="post-metadata">

**Author:** ![ilya\_f\_132450](https://avatars.discourse-cdn.com/v4/letter/i/49beb7/32.png) [@ilya\_f\_132450](https://community.f5.com/u/ilya_f_132450)\
**Post date:** [September 7, 2013, 1:22am UTC](https://community.f5.com/t/setting-a-virtual-server-type-to-performance-layer-4-with-java/9112/2 "2013-09-07T01:22:05Z")

</div>

I faced the same problem, with difference that I was needed to set it during server creation and in C. I fixed it with setting profile name:

LocalLBVirtualServerVirtualServerProfile vsProfile = new LocalLBVirtualServerVirtualServerProfile(); vsProfile.profile\_name=“fastL4”;

Hope this helps, Ilya.
