The answer is "yes" with a "but" at the end.
Yes, you can configure the SRX as a switch. You can put various ports is separate VLANs and route between them. Example:
# connection to other SRX
set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members all
# connections to servers
set interfaces interface-range MyServers member ge-0/0/1
set interfaces interface-range MyServers member ge-0/0/2
set interfaces interface-range MyServers member ge-0/0/3
set interfaces interface-range MyServers member ge-0/0/4
set interfaces interface-range MyServers unit 0 family ethernet-switching vlan members ServerVLAN
set interfaces vlan unit 10 family inet address 172.16.10.1/24
set vlans ServerVLAN l3-interface vlan.10
set security zones security-zone trust interfaces vlan.10
But, keep in mind the SRX240 only supports a max throughput of 1.5 Gbps (1.5G for large packets and 500M for mix). I don't know what your current switch backplane capacity is but you MAY be introducing a bottleneck if you go that route. I would be interested to hear about your results.
Warm regards,
John
JNCIS-ER et al.