Question: I have a Windows Phone 7 project that connects to a .NET web service to fetch data on demand. Both the WP7 project and the web service use a copy of the same c# class library. Part of this library is an enum of `EmployeeType`:

```
Public enum EmployeeType
{
    Standard = 0,
    TeamLeader = 105
}

```

Since the app was released, the web service class library has had a change made to it - adding a new enum value. (`SeniorManager = 110`)

Therefore, when I receive an object on the phone with a property containing the new enum value, I get a `SerializationException` when attempting to add it to IsolatedStorage. This is because the new enum value cannot be serialized, as the WP7 class library has not had the same update made to it and the enum value does not exist.

What I would like to achieve is to still be able to serialize the object, but *ignore* the invalid enum value, *or replace it* with a valid one (ideally `Standard = 0`). 

This will enable me to handle any future additions made to the web service enum, without breaking the functionality of the app.

Notes:

* The enum/values above are contrived for the purposes of the question and not the actual enum in question.
* The fact that the value would be serialized with an incorrect value is unimportant for the purposes of the app.

Thanks!

Answer: 
Jboss application server java.naming.factory.initial not defined.

```
InitialContext ic = new InitialContext();
System.out.println((String)ic.getEnvironment().get("java.naming.factory.url.pkgs"));

```
If I understand your problem correctly, your client app as well as the EJB app are deployed on the same app server?
So both are either Weblogic or both are JBoss?

If so, on the client app you can look up the environment property `java.naming.factory.initial`

```
InitialContext ic = new InitialContext();
System.out.println((String)ic.getEnvironment().get("java.naming.factory.initial"));

```

On weblogic this returns,

`weblogic.jndi.WLInitialContextFactory`