[Installation, Configuration & DEPLOYMENT] - bind ( two ip addresses)
by poporopo
Hi,
I am running Jboss and I need to be able to access it on my local network and over a VPN.
Here is my setup:
local network
192.168.2.x
255.255.255.0
The VPN (OpenVPN) although uses virtual tunnels and so I fall into a different network when I connect over the vpn.
The network becomes
10.8.0.x
255.255.255.0
So if I bind Jboss to the ip 192.168.2.x then I am able to access it from the machines in the local network but not from home.
I bound Jboss to my server's hostname (server-01) but I still cannot connect from the vpn client at home.
I have added the following in my /etc/hosts file on the server where jboss runs:
192.168.2.12 server-01
10.8.0.1 server-01
192.168.2.12 is my servers ip in the local network
10.8.0.1 is my server's ip when I connect from home over a vpn.
I have also added to the hosts file at home (my vpn client) the following:
10.8.0.1 server-01
In searching a solution I setup jboss through an apche proxy. I was able to see jboss this way but I was not able to run my application.
Any hints on this issue will be appreciated
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095357#4095357
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095357
18Â years, 9Â months
[JBoss Seam] - Re: coerceToType / javaassist error
by paulkossler
Many of us have come across this error. It seems to be caused by a flaw in the Directions for the JPA (which is Based on Hibernate) and Hibernate. They all assume you can use the proxy directly. You can't! The problem is direct use of a proxy object fails the GoF Pattern for proxies. Proxies REQUIRE an interface.
The issue is "Subject isNotA SubjectProxy".
Its not an EL issue. The AspectGenerated Proxy is following the GoF Proxy definition. The flaw is that everyone seems to be using the Proxy wrong. (Even his highness, Gavin King.) Read the books on the subject and the documentation and the forums. It is assumed that you can directly use the proxy asA subject; by definition this is an incorrect assumption.
Define a proper proxy-pattern it passes the "coerceToType" method from EL. Subj implements ISubj, Proxy implements ISubj. Therefore Subj isA ISubj and Proxy isA ISubj. Then when the coerceToType trys to make reconstitute the values in the ISubj it works because then the Proxy passes the critical isA test (Specifically isAssignableFrom())
ENOUGH TECH PAUL WHATS THE SOLUTION. (I know I say it my head)
QUICK AND DIRTY (REALLY DIRTY)
The quickest solution to this problem is to tell JPA or Hibernate to not use a Proxy. I know this causes serious issues: Less caching, dirty checks, lazy loading and all that lovely stuff.
PROPER SOLUTION:
The proper solution is "Design By Interface" and only reference the interface. Alas the Hibernate implementation has some mapping issues with this approach. (Cross mapping a storage solution via an interface can not be annotated currently, also the XML mappings seem to require double mapping of entities to the interfaces: note I am not sure on the latter)
These may be mitigated by defining the interface as the proxy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095347#4095347
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095347
18Â years, 9Â months